Interface MetadataProcessor<T,M>

Record Components:
T - the M2 representation of type based on the nature of the source e.g. TypeElement for annotation processing of *.java files or Class for compiled bytecode.
M - the corresponding M2 representation for member of type T
All Known Implementing Classes:
SourceAnnotationHandler

public interface MetadataProcessor<T,M>
Collection of generic utility functions for extracting persistence related metadata from user specified metadata available in various source environment.
Persistence metadata needs to be acquired from different sources such as annotated source code, compiled class files, XML descriptors or combinations thereof under different invocation and configuration context.
Specific implementation of this interface is distinguished by the nature of the source and the representation available for type system in the source.
Since:
2.0.0
Author:
Pinaki Poddar
  • Method Details

    • determineTypeAccess

      int determineTypeAccess(T t)
      Determine the access type of the given type.
      Returns:
      an integer denoting the type of access. The integer value corresponds to ClassMetaData.getAccessType().
    • determineMemberAccess

      int determineMemberAccess(M m)
      Determine the access type of the given member.
      Returns:
      an integer denoting the type of access. The integer value corresponds to FieldMetaData.getAccessType().
    • getPersistentMembers

      Set<M> getPersistentMembers(T t)
      Get the persistent members of the given type.
    • validateAccess

      List<Exception> validateAccess(T t)
      Gets the violations, if any.
      Returns:
      null or empty list if no exceptions.
    • isMixedAccess

      boolean isMixedAccess(T t)
      Affirms if the members of given type are using both field and property based access.
    • getPersistentSupertype

      T getPersistentSupertype(T t)