Class JakartaAnnotationReader
- java.lang.Object
- 
- org.datanucleus.metadata.annotations.AbstractAnnotationReader
- 
- org.datanucleus.api.jakarta.metadata.JakartaAnnotationReader
 
 
- 
- All Implemented Interfaces:
- org.datanucleus.metadata.annotations.AnnotationReader
 
 public class JakartaAnnotationReader extends org.datanucleus.metadata.annotations.AbstractAnnotationReaderImplementation for Annotation Reader for Java annotations using Jakarta Persistence definition. This reader also accepts certain DataNucleus extensions where the Jakarta Persistence annotations don't provide full definition of the data required.
- 
- 
Constructor SummaryConstructors Constructor Description JakartaAnnotationReader(org.datanucleus.metadata.MetaDataManager mgr)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandoesClassHaveConverter(Class cls, org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Check if class has Converter annotation by inspecting its annotations.protected booleandoesClassHaveNamedQueries(org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Check if class has NamedXXXQuery annotations (for classes that are not persistable but provide named query definitions.protected org.datanucleus.metadata.StoredProcQueryParameterMetaDatagetMetaDataForStoredProcParameter(jakarta.persistence.StoredProcedureParameter param)protected org.datanucleus.metadata.annotations.AnnotationObjectisClassPersistable(org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Check if a class is persistable, by looking at its annotations.protected booleanisClassPersistenceAware(org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Check if class is persistence aware, by looking at its annotations.protected org.datanucleus.metadata.AbstractClassMetaDataprocessClassAnnotations(org.datanucleus.metadata.PackageMetaData pmd, Class cls, org.datanucleus.metadata.annotations.AnnotationObject[] annotations, org.datanucleus.ClassLoaderResolver clr)Method to process the "class" level annotations and create the outline ClassMetaData objectprotected voidprocessEmbeddedAttributeOverride(org.datanucleus.metadata.AbstractMemberMetaData mmd, String overriddenName, Class type, jakarta.persistence.Column column)Method to process the override of embedded members.protected org.datanucleus.metadata.AbstractMemberMetaDataprocessMemberAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.metadata.annotations.Member member, org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Convenience method to process the annotations for a field/property.protected voidprocessMethodAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd, Method method)Method to take the passed in outline ClassMetaData and process the annotations for method adding any necessary MetaData to the ClassMetaData.protected voidprocessNamedQueries(org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Convenience method to process NamedQuery, NamedQueries, NamedNativeQuery, NamedNativeQueries, NamedStoredProcedureQueries, NamedStoredProcedureQuery annotations.- 
Methods inherited from class org.datanucleus.metadata.annotations.AbstractAnnotationReaderaddSupportedDuplicateAnnotations, getAnnotationObjectsForAnnotations, getClassAnnotationsForClass, getFieldAnnotationsForClass, getJavaBeanAccessorAnnotationsForClass, getMetaDataForClass, getSupportedAnnotationPackages, isPersistenceContext, isSupportedAnnotation, setSupportedAnnotationPackages
 
- 
 
- 
- 
- 
Method Detail- 
processClassAnnotationsprotected org.datanucleus.metadata.AbstractClassMetaData processClassAnnotations(org.datanucleus.metadata.PackageMetaData pmd, Class cls, org.datanucleus.metadata.annotations.AnnotationObject[] annotations, org.datanucleus.ClassLoaderResolver clr)Method to process the "class" level annotations and create the outline ClassMetaData object- Specified by:
- processClassAnnotationsin class- org.datanucleus.metadata.annotations.AbstractAnnotationReader
- Parameters:
- pmd- Parent PackageMetaData
- cls- The class
- annotations- Annotations for this class
- clr- ClassLoader resolver
- Returns:
- The ClassMetaData (or null if no annotations)
 
 - 
processNamedQueriesprotected void processNamedQueries(org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Convenience method to process NamedQuery, NamedQueries, NamedNativeQuery, NamedNativeQueries, NamedStoredProcedureQueries, NamedStoredProcedureQuery annotations.- Parameters:
- cmd- Metadata for the class
- annotations- Annotations specified on the class
 
 - 
getMetaDataForStoredProcParameterprotected org.datanucleus.metadata.StoredProcQueryParameterMetaData getMetaDataForStoredProcParameter(jakarta.persistence.StoredProcedureParameter param) 
 - 
processMemberAnnotationsprotected org.datanucleus.metadata.AbstractMemberMetaData processMemberAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.metadata.annotations.Member member, org.datanucleus.metadata.annotations.AnnotationObject[] annotations)Convenience method to process the annotations for a field/property. The passed annotations may have been specified on the field or on a getter method.- Specified by:
- processMemberAnnotationsin class- org.datanucleus.metadata.annotations.AbstractAnnotationReader
- Parameters:
- cmd- The ClassMetaData to update
- member- The field/property
- annotations- The annotations for the field/property
- Returns:
- The FieldMetaData/PropertyMetaData that was added (if any)
 
 - 
processEmbeddedAttributeOverrideprotected void processEmbeddedAttributeOverride(org.datanucleus.metadata.AbstractMemberMetaData mmd, String overriddenName, Class type, jakarta.persistence.Column column)Method to process the override of embedded members. Can recurse if the overriddenName uses "dot" syntax.- Parameters:
- mmd- Metadata for this member
- overriddenName- The overridden member within this embedded object
- type- Type of this member
- column- The column details to override it with
 
 - 
processMethodAnnotationsprotected void processMethodAnnotations(org.datanucleus.metadata.AbstractClassMetaData cmd, 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:
- processMethodAnnotationsin class- org.datanucleus.metadata.annotations.AbstractAnnotationReader
- Parameters:
- cmd- The ClassMetaData (to be updated)
- method- The method
 
 - 
isClassPersistableprotected org.datanucleus.metadata.annotations.AnnotationObject isClassPersistable(org.datanucleus.metadata.annotations.AnnotationObject[] annotations) Check if a class is persistable, by looking at its annotations.- Parameters:
- annotations- Annotations for the class
- Returns:
- The annotation marking this class as an entity (or null if none present)
 
 - 
isClassPersistenceAwareprotected boolean isClassPersistenceAware(org.datanucleus.metadata.annotations.AnnotationObject[] annotations) Check if class is persistence aware, by looking at its annotations.- Parameters:
- annotations- Annotations for the class
- Returns:
- true if the class has @PersistenceAware
 
 - 
doesClassHaveNamedQueriesprotected boolean doesClassHaveNamedQueries(org.datanucleus.metadata.annotations.AnnotationObject[] annotations) Check if class has NamedXXXQuery annotations (for classes that are not persistable but provide named query definitions.- Parameters:
- annotations- Annotations for the class
- Returns:
- true if the class has Named query annotations
 
 - 
doesClassHaveConverterprotected boolean doesClassHaveConverter(Class cls, org.datanucleus.metadata.annotations.AnnotationObject[] annotations) Check if class has Converter annotation by inspecting its annotations.- Parameters:
- cls- The class
- annotations- Annotations for the class
- Returns:
- true if the class has Converter annotations
 
 
- 
 
-