org.apache.openjpa.persistence.meta
Interface MetadataProcessor<T,M>

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 Summary
 int determineMemberAccess(M m)
          Determine the access type of the given member.
 int determineTypeAccess(T t)
          Determine the access type of the given type.
 Set<M> getPersistentMembers(T t)
          Get the persistent members of the given type.
 T getPersistentSupertype(T t)
           
 boolean isMixedAccess(T t)
          Affirms if the members of given type are using both field and property based access.
 List<Exception> validateAccess(T t)
          Gets the violations, if any.
 

Method Detail

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)


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.