org.jpox.metadata.annotations
Class JPAAnnotationReader

java.lang.Object
  extended by org.jpox.metadata.annotations.AbstractAnnotationReader
      extended by org.jpox.metadata.annotations.JPAAnnotationReader
All Implemented Interfaces:
AnnotationReader

public class JPAAnnotationReader
extends AbstractAnnotationReader

Implementation for Annotation Reader for JDK 1.5 annotations using JPA's definition. This reader also accepts certain JPOX extensions where the JPA annotations dont provide full definition of the data required.

Version:
$Revision: 1.36.2.1 $

Field Summary
 
Fields inherited from class org.jpox.metadata.annotations.AbstractAnnotationReader
LOCALISER
 
Constructor Summary
JPAAnnotationReader(org.jpox.metadata.MetaDataManager mgr)
          Constructor.
 
Method Summary
protected  boolean isClassPersistenceCapable(java.lang.Class cls)
          Check if class is persistence capable, by looking at annotations
protected  org.jpox.metadata.ClassMetaData processClassAnnotations(org.jpox.metadata.PackageMetaData pmd, java.lang.Class cls, AnnotationObject[] annotations)
          Method to process the "class" level annotations and create the outline ClassMetaData object
protected  org.jpox.metadata.FieldMetaData processFieldAnnotations(org.jpox.metadata.ClassMetaData cmd, java.lang.reflect.Field field, AnnotationObject[] annotations)
          Convenience method to process the annotations for a field.
protected  void processMethodAnnotations(org.jpox.metadata.ClassMetaData cmd, java.lang.reflect.Method method)
          Method to take the passed in outline ClassMetaData and process the annotations for method adding any necessary MetaData to the ClassMetaData.
 
Methods inherited from class org.jpox.metadata.annotations.AbstractAnnotationReader
getAnnotationObjectsForAnnotations, getClassAnnotationsForClass, getFieldAnnotationsForClass, getGettersAnnotationsForClass, getMetaDataForClass, getMethodAnnotationsForClass, getSupportedAnnotationPackages, isSupportedAnnotation, setSupportedAnnotationPackages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAAnnotationReader

public JPAAnnotationReader(org.jpox.metadata.MetaDataManager mgr)
Constructor.

Parameters:
mgr - MetaData manager
Method Detail

processClassAnnotations

protected org.jpox.metadata.ClassMetaData processClassAnnotations(org.jpox.metadata.PackageMetaData pmd,
                                                                  java.lang.Class cls,
                                                                  AnnotationObject[] annotations)
Method to process the "class" level annotations and create the outline ClassMetaData object

Specified by:
processClassAnnotations in class AbstractAnnotationReader
Parameters:
pmd - Parent PackageMetaData
cls - The class
annotations - Annotations for this class
Returns:
The ClassMetaData (or null if no annotations)

processFieldAnnotations

protected org.jpox.metadata.FieldMetaData processFieldAnnotations(org.jpox.metadata.ClassMetaData cmd,
                                                                  java.lang.reflect.Field field,
                                                                  AnnotationObject[] annotations)
Convenience method to process the annotations for a field. The passed annotations may have been specified on the field or on setter/getter methods for the field.

Specified by:
processFieldAnnotations in class AbstractAnnotationReader
Parameters:
cmd - The ClassMetaData to update
field - The field
annotations - The annotations for the field/method
Returns:
The FieldMetaData (if created)

processMethodAnnotations

protected void processMethodAnnotations(org.jpox.metadata.ClassMetaData cmd,
                                        java.lang.reflect.Method method)
Method to take the passed in outline ClassMetaData and process the annotations for method adding any necessary MetaData to the ClassMetaData.

Specified by:
processMethodAnnotations in class AbstractAnnotationReader
Parameters:
cmd - The ClassMetaData (to be updated)
method - The method

isClassPersistenceCapable

protected boolean isClassPersistenceCapable(java.lang.Class cls)
Check if class is persistence capable, by looking at annotations

Parameters:
cls - the Class
Returns:
true if the class has Entity annotation


Copyright © 2003-2008 Java Persistent Objects (JPOX). All Rights Reserved.