Module org.eclipse.persistence.jpa
Class MetadataAnnotatedElement
java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotatedElement
- Direct Known Subclasses:
MetadataClass,MetadataField,MetadataMethod
INTERNAL:
Parent object that is used to hold onto a valid JPA decorated method, field
or class.
- Since:
- EclipseLink 1.0
-
Field Summary
FieldsFields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
m_factory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(MetadataAnnotation annotation) INTERNAL:voidaddGenericType(String genericType) INTERNAL:voidaddMetaAnnotation(MetadataAnnotation annotation) INTERNAL:booleanareAnnotationsCompatibleWithTransient(ClassAccessor classAccessor) INTERNAL: Return true if this accessible object has 2 or more declared persistence annotations.booleanINTERNAL:getAnnotation(Class<?> annotation) INTERNAL: Return the annotated element for this accessor.getAnnotation(String annotation) INTERNAL: Return the annotated element for this accessor.protected final MetadataAnnotationgetAnnotation(String annotation, Set<String> names) INTERNAL: Return the annotated element for this accessor.getAnnotation(String annotationClassName, ClassAccessor classAccessor) INTERNAL: Return the annotated element for this accessor.INTERNAL: Return the annotations of this accessible object.INTERNAL:protected intgetDeclaredAnnotationsCount(ClassAccessor classAccessor) INTERNAL:INTERNAL:getMapKeyClass(MetadataDescriptor descriptor) INTERNAL: This should only be called for accessor's of type Map.intINTERNAL:getName()INTERNAL:INTERNAL: If this annotated element was built from java model elements and is a primitive type, this primitive type will be set.getRawClass(MetadataDescriptor descriptor) INTERNAL: Return the raw class for this accessible object.getRawClassWithGenerics(MetadataDescriptor descriptor) INTERNAL: Return the complete raw class with generics for this accessible object.getReferenceClassFromGeneric(MetadataDescriptor descriptor) INTERNAL: Return the reference class from the generic specification on this accessible object.getType()INTERNAL:booleanhasDeclaredAnnotations(ClassAccessor classAccessor) INTERNAL: Return true if this accessible object has 1 or more declared persistence annotations.inthashCode()INTERNAL:booleanisAnnotationNotPresent(Class<?> annotation, ClassAccessor accessor) INTERNAL: Indicates whether the specified annotation is actually not present on this accessible object.booleanisAnnotationNotPresent(String annotation, ClassAccessor accessor) INTERNAL: Indicates whether the specified annotation is actually not present on this accessible object.booleanisAnnotationPresent(Class<?> annotationClass, ClassAccessor accessor) INTERNAL: Indicates whether the specified annotation is present on java class for the given descriptor metadata.booleanisAnnotationPresent(String annotation) INTERNAL: Indicates whether the specified annotation is present on this accessible object.booleanisAnnotationPresent(String annotationName, ClassAccessor accessor) INTERNAL: Indicates whether the specified annotation is present on java class for the given descriptor metadata.booleanisArray(ClassAccessor classAccessor) INTERNAL: Return true if this field accessor represents an array relationship.booleanisBasic(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a basic mapping.booleanisBasicCollection(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a basic collection mapping.booleanisBasicMap(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a basic collection mapping.booleanisDerivedId(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents an id mapping.booleanisDerivedIdClass(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents an id mapping.booleanisElementCollection(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents an element collection mapping.booleanisEmbedded(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents an aggregate mapping.booleanisEmbeddedId(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents an aggregate id mapping.booleanINTERNAL: Method to return whether a collection type is a generic.booleanINTERNAL: Method to return whether a type is a generic.booleanisId(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents an id mapping.booleanisManyToMany(ClassAccessor classAccessor) INTERNAL: Return true if this field accessor represents a m-m relationship.booleanisManyToOne(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a m-1 relationship.booleanisOneToMany(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a 1-m relationship.booleanisOneToOne(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a 1-1 relationship.booleanisStructure(ClassAccessor classAccessor) INTERNAL: Return true if this field accessor represents a structure relationship.booleanisSupportedCollectionClass(MetadataClass metadataClass) INTERNAL: Method to return whether the given class is a supported collection class.booleanisSupportedMapClass(MetadataClass metadataClass) INTERNAL: Method to return whether the given class is a supported map class.booleanisSupportedToManyCollectionClass(MetadataClass metadataClass) INTERNAL: Method to return whether the given class is a supported to many collection class.booleanisTransformation(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents an transformation mapping.protected booleanisValidPersistenceElement(boolean mustBeExplicit, String explicitType, ClassAccessor classAccessor) INTERNAL: When processing the inverse accessors to an explicit access setting, their must be an Access(FIELD) or Access(PROPERTY) present for the element to be processed.protected booleanisValidPersistenceElement(int modifiers) INTERNAL: Return true if the modifiers are not transient, static or abstract.booleanisVariableOneToOne(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a variable 1-1 relationship.booleanisVersion(ClassAccessor classAccessor) INTERNAL: Return true if this accessor represents a version mapping.voidsetAnnotations(Map<String, MetadataAnnotation> annotations) INTERNAL: Set the annotations of this accessible object.voidsetAttributeName(String attributeName) INTERNAL:voidsetGenericType(List<String> genericType) INTERNAL:voidsetModifiers(int modifiers) INTERNAL:voidINTERNAL:voidsetPrimitiveType(Object primitiveType) INTERNAL: If this annotated element was built from java model elements and is a primitive type this method will be called.voidINTERNAL:toString()INTERNAL:Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject
getLogger, getMetadataClass, getMetadataFactory, setMetadataFactory
-
Field Details
-
DEFAULT_RAW_CLASS
- See Also:
-
-
Constructor Details
-
MetadataAnnotatedElement
INTERNAL:
-
-
Method Details
-
addAnnotation
INTERNAL: -
addMetaAnnotation
INTERNAL: -
addGenericType
INTERNAL: -
equals
INTERNAL: -
getAnnotation
INTERNAL: Return the annotated element for this accessor. Note: This method does not check against a metadata complete. -
getAnnotation
INTERNAL: Return the annotated element for this accessor. Note: This method does not check against a meta-data complete.- Parameters:
annotation- annotation name
-
getAnnotation
INTERNAL: Return the annotated element for this accessor. Note: This method does not check against a meta-data complete.- Parameters:
annotation- annotation namenames- meta-annotations names cycle detection set, shall not benull
-
getAnnotation
INTERNAL: Return the annotated element for this accessor. -
getAnnotations
INTERNAL: Return the annotations of this accessible object.- Returns:
- annotations defined for the element, keyed by annotation name.
Never returns
null.
-
getAttributeName
INTERNAL:- Specified by:
getAttributeNamein classMetadataAccessibleObject
-
getDeclaredAnnotationsCount
INTERNAL: -
getGenericType
INTERNAL: -
getMapKeyClass
INTERNAL: This should only be called for accessor's of type Map. It will return the map key type if generics are used, null otherwise. -
getModifiers
public int getModifiers()INTERNAL: -
getName
INTERNAL:- Specified by:
getNamein classMetadataAccessibleObject
-
getPrimitiveType
INTERNAL: If this annotated element was built from java model elements and is a primitive type, this primitive type will be set. -
getRawClass
INTERNAL: Return the raw class for this accessible object. E.g. For an accessible object with a type of java.util.Collection<Employee>, this method will return java.util.Collection.- See Also:
-
getRawClassWithGenerics
INTERNAL: Return the complete raw class with generics for this accessible object. E.g. For an accessible object with a type of java.util.Collection<Employee>, this method will return java.util.CollectionEmployee. Note, the generics are appended to the name of the class.- See Also:
-
getReferenceClassFromGeneric
INTERNAL: Return the reference class from the generic specification on this accessible object. Here is what you will get back from this method given the following scenarios: 1 - public Collection<String> getTasks() => String.class 2 - public Map<String, Integer> getTasks() => Integer.class 3 - public Employee getEmployee() => null 4 - public Collection getTasks() => null 5 - public Map getTasks() => null 6 - public Collection<byte[]> getAudio() => byte[].class 7 - public Map<X,Y> on a MappedSuperclass where Y is defined in the Entity superclass<T> => Void.class (in all bug 266912 cases) -
getType
INTERNAL: -
hasDeclaredAnnotations
INTERNAL: Return true if this accessible object has 1 or more declared persistence annotations. -
hashCode
public int hashCode()INTERNAL: -
areAnnotationsCompatibleWithTransient
INTERNAL: Return true if this accessible object has 2 or more declared persistence annotations. -
isAnnotationNotPresent
INTERNAL: Indicates whether the specified annotation is actually not present on this accessible object. Used for defaulting. Need this check since the isAnnotationPresent calls can return a false when true because of the meta-data complete feature. -
isAnnotationNotPresent
INTERNAL: Indicates whether the specified annotation is actually not present on this accessible object. Used for defaulting. Need this check since the isAnnotationPresent calls can return a false when true because of the meta-data complete feature. -
isAnnotationPresent
INTERNAL: Indicates whether the specified annotation is present on java class for the given descriptor metadata. -
isAnnotationPresent
INTERNAL: Indicates whether the specified annotation is present on this accessible object. NOTE: Calling this method directly does not take any metadata complete flag into consideration. Look at the other isAnnotationPresent methods that takes a class accessor. -
isAnnotationPresent
INTERNAL: Indicates whether the specified annotation is present on java class for the given descriptor metadata. -
isArray
INTERNAL: Return true if this field accessor represents an array relationship. -
isBasic
INTERNAL: Return true if this accessor represents a basic mapping. -
isBasicCollection
INTERNAL: Return true if this accessor represents a basic collection mapping. -
isBasicMap
INTERNAL: Return true if this accessor represents a basic collection mapping. -
isDerivedId
INTERNAL: Return true if this accessor represents an id mapping. -
isDerivedIdClass
INTERNAL: Return true if this accessor represents an id mapping. -
isElementCollection
INTERNAL: Return true if this accessor represents an element collection mapping. -
isEmbedded
INTERNAL: Return true if this accessor represents an aggregate mapping. True is returned if an Embedded annotation is found or if an Embeddable annotation is found on the raw/reference class. -
isEmbeddedId
INTERNAL: Return true if this accessor represents an aggregate id mapping. -
isGenericCollectionType
public boolean isGenericCollectionType()INTERNAL: Method to return whether a collection type is a generic. -
isGenericType
public boolean isGenericType()INTERNAL: Method to return whether a type is a generic. -
isId
INTERNAL: Return true if this accessor represents an id mapping. -
isManyToMany
INTERNAL: Return true if this field accessor represents a m-m relationship. -
isManyToOne
INTERNAL: Return true if this accessor represents a m-1 relationship. -
isOneToMany
INTERNAL: Return true if this accessor represents a 1-m relationship. -
isOneToOne
INTERNAL: Return true if this accessor represents a 1-1 relationship. -
isStructure
INTERNAL: Return true if this field accessor represents a structure relationship. -
isSupportedCollectionClass
INTERNAL: Method to return whether the given class is a supported collection class. -
isSupportedMapClass
INTERNAL: Method to return whether the given class is a supported map class. -
isSupportedToManyCollectionClass
INTERNAL: Method to return whether the given class is a supported to many collection class. -
isTransformation
INTERNAL: Return true if this accessor represents an transformation mapping. -
isValidPersistenceElement
protected boolean isValidPersistenceElement(boolean mustBeExplicit, String explicitType, ClassAccessor classAccessor) INTERNAL: When processing the inverse accessors to an explicit access setting, their must be an Access(FIELD) or Access(PROPERTY) present for the element to be processed. Otherwise, it is ignored. -
isValidPersistenceElement
protected boolean isValidPersistenceElement(int modifiers) INTERNAL: Return true if the modifiers are not transient, static or abstract. -
isVariableOneToOne
INTERNAL: Return true if this accessor represents a variable 1-1 relationship. The method will return true if one of the following conditions is met: - There is a VariableOneToOne annotation present, or - The raw class is an interface and not a collection or map, nor a ValueHolderInterface (and an exclude default mappings flag is not set) -
isVersion
INTERNAL: Return true if this accessor represents a version mapping. -
setAnnotations
INTERNAL: Set the annotations of this accessible object. -
setAttributeName
INTERNAL: -
setGenericType
INTERNAL: -
setModifiers
public void setModifiers(int modifiers) INTERNAL: -
setName
INTERNAL: -
setPrimitiveType
INTERNAL: If this annotated element was built from java model elements and is a primitive type this method will be called. -
setType
INTERNAL: -
toString
INTERNAL:
-