public class ClassAccessor extends NonRelationshipAccessor
Modifier and Type | Field and Description |
---|---|
protected Class |
m_inheritanceParentClass |
protected Boolean |
m_isInheritanceSubclass |
protected List<ClassAccessor> |
m_mappedSuperclasses |
m_accessibleObject, m_descriptor, m_logger, m_processor, m_project, m_validator
Constructor and Description |
---|
ClassAccessor(MetadataAccessibleObject accessibleObject,
MetadataProcessor processor,
MetadataDescriptor descriptor)
INTERNAL:
|
Modifier and Type | Method and Description |
---|---|
protected void |
addMultipleTableKeyFields(MetadataPrimaryKeyJoinColumns primaryKeyJoinColumns,
String PK_CTX,
String FK_CTX)
INTERNAL:
Add multiple fields to the descriptor.
|
protected MetadataAccessor |
buildAccessor(MetadataAccessibleObject accessibleObject)
INTERNAL:
Create and return the appropriate accessor based on the accessible
object given.
|
void |
clearMappedSuperclasses()
INTERNAL:
Clear the mapped supeclasses.
|
protected String |
getDiscriminatorValue()
INTERNAL: (Overridden in XMLClassAccessor)
Return the discriminator value for this accessor.
|
protected String |
getEntityName()
INTERNAL: (Overridden in XMLClassAccessor)
Return the name of this entity class.
|
Class |
getInheritanceParentClass()
INTERNAL:
This method returns the first parnt entity in an inheritance hierarchy
that defines the inheritance strategy.
|
MetadataDescriptor |
getInheritanceParentDescriptor()
INTERNAL:
Store the descriptor metadata for the root of our inheritance hierarchy.
|
protected String |
getInheritanceStrategy()
INTERNAL: (Overridden in XMLClassAccessor)
Return the inheritance strategy.
|
Class |
getJavaClass()
INTERNAL: (OVERRIDE)
Return the java class that defines this accessor.
|
List<ClassAccessor> |
getMappedSuperclasses()
INTERNAL:
Build a list of classes that are decorated with a @MappedSuperclass.
|
protected boolean |
hasEntity(Class cls)
INTERNAL: (Overridden in XMLClassAccessor)
Return true if the class has an @Entity.
|
protected boolean |
hasInheritance()
INTERNAL:
Return true if this class accessor has an inheritance specifications.
|
protected boolean |
hasInheritance(Class entityClass)
INTERNAL: (Overridden in XMLClassAccessor)
Return true if the class has an @Inheritance.
|
boolean |
isClass()
INTERNAL:
|
boolean |
isInheritanceSubclass()
INTERNAL:
|
protected boolean |
isTransient(AnnotatedElement annotatedElement,
int modifier)
INTERNAL:
|
protected boolean |
isValidPersistenceElement(AnnotatedElement annotatedElement,
int modifiers)
INTERNAL:
Return true is this annotated element is not marked transient, static or
abstract.
|
protected boolean |
isValidPersistenceField(Field field)
INTERNAL:
Check to see if this is a valid field to process for persistence.
|
protected boolean |
isValidPersistenceMethod(Method method)
INTERNAL:
Check to see if this is a valid method to process for persistence.
|
void |
process()
INTERNAL:
Process the items of interest on an entity or embeddable class.
|
protected void |
processAccessor(MetadataAccessor accessor)
INTERNAL:
Process an accessor method or field.
|
protected void |
processAccessorFields()
INTERNAL:
Create mappings from the fields directly.
|
protected void |
processAccessorMethods()
INTERNAL:
Create mappings via the class properties.
|
protected void |
processAccessors()
INTERNAL:
Process the accessors for the given class.
|
protected void |
processAssociationOverride(String attributeName,
MetadataJoinColumns joinColumns)
INTERNAL:
Process an @AssociationOverride for an Entity (or MappedSuperclass)
that inherits from a MappedSuperclass.
|
protected void |
processAssociationOverrides()
INTERNAL: (Overriden in XMLClassAccessor)
Process an @AssociationOverrides for an Entity (or MappedSuperclass)
that inherits from a MappedSuperclass.
|
protected void |
processAttributeOverride(MetadataColumn column)
INTERNAL:
Process the @AttributeOverrides and @AttributeOverride for an Entity (or
MappedSuperclass) that inherits from a MappedSuperclass.
|
protected void |
processAttributeOverrides()
INTERNAL: (Overridden in XMLClassAccessor)
Process the @AttributeOverrides and @AttributeOverride for an Entity (or
MappedSuperclass) that inherits from a MappedSuperclass.
|
protected void |
processCallbackMethods(Method[] candidateMethods,
MetadataEntityListener listener)
INTERNAL:
Process the array of methods for lifecyle callback events and set them
on the given event listener.
|
protected void |
processClassMetadata()
INTERNAL:
Process the items of interest on an entity or mapped superclass class.
|
protected void |
processDefaultListeners(ClassLoader loader)
INTERNAL:
Process the default listeners defined in XML.
|
protected void |
processDiscriminatorColumn()
INTERNAL:
Process a @DiscriminatorColumn (if there is one, otherwise default) to
set this classes indication field name for inheritance.
|
protected void |
processDiscriminatorColumn(MetadataDiscriminatorColumn discriminatorColumn)
INTERNAL:
Process a discriminator column to set this class indicatior field name
for inheritance.
|
protected void |
processDiscriminatorValue()
INTERNAL:
Process a discriminator value to set the class indicator on the root
descriptor of the inheritance hierarchy.
|
protected void |
processEntity()
INTERNAL:
Process an entity.
|
MetadataEntityListener |
processEntityEventListener(ClassLoader loader)
INTERNAL: (Overridden in XMLCLassAccessor)
Process the entity class for lifecycle callback event methods.
|
void |
processEntityListeners(Class entityClass,
ClassLoader loader)
INTERNAL: (Overridden in XMLClassAccessor)
Process the @EntityListeners for this class accessor.
|
protected void |
processExcludeDefaultListeners()
INTERNAL: (Overridden in XMLClassAccessor)
Process the @ExcludeDefaultListeners if one is specified (taking
metadata-complete into consideration).
|
protected void |
processExcludeSuperclassListeners()
INTERNAL: (Overridden in XMLClassAccessor)
Process the @ExcludeSuperclassListeners if one is specified (taking
metadata-complete into consideration).
|
protected void |
processIdClass()
INTERNAL: (Overridden in XMLClassAccessor)
Process an @IdClass.
|
protected void |
processIdClass(Class idClass,
String ignoreCtx)
INTERNAL:
Process an @IdClass or id-class element.
|
protected void |
processInheritance()
INTERNAL:
Process the @Inheritance or inheritance tag metadata for a parent of
an inheritance hierarchy.
|
protected void |
processInheritanceSubclass(MetadataDescriptor parentDescriptor)
INTERNAL:
Process the inheritance metadata for an inheritance subclass.
|
protected List<MetadataJoinColumn> |
processJoinColumns(JoinColumn[] joinColumns)
INTERNAL:
Process and array of @JoinColumn into a list of metadata join column.
|
protected void |
processLifecycleEvent(MetadataEntityListener listener,
Node node,
String event,
XMLHelper helper,
Method[] candidateMethods)
INTERNAL:
Process the XML lifecycle event for the given listener.
|
protected void |
processLifecycleEvents(MetadataEntityListener listener,
Node node,
XMLHelper helper,
Method[] candidateMethods)
INTERNAL:
Process the XML lifecycle events for the given listener.
|
void |
processListeners(ClassLoader loader)
INTERNAL:
Process the listeners for this class.
|
protected void |
processMappedSuperclass()
INTERNAL:
Process the @MappedSuperclass(es) if there are any.
|
protected void |
processMappedSuperclasses()
INTERNAL:
Process the @MappedSuperclass(es) if there are any.
|
void |
processMappedSuperclassEventListener(MetadataEntityListener listener,
Class entityClass,
ClassLoader loader)
INTERNAL: (Overridden in XMLCLassAccessor)
Process the mapped superclass class for lifecycle callback event methods.
|
protected void |
processNamedNativeQueries()
INTERNAL: (Overridden in XMLClassAccessor)
Process a @NamedNativeQueries.
|
protected void |
processNamedNativeQuery(MetadataNamedNativeQuery namedNativeQuery)
INTERNAL:
Process a MetadataNamedNativeQuery.
|
protected void |
processNamedQueries()
INTERNAL: (Overridden in XMLClassAccessor)
Process a @NamedQueries.
|
protected void |
processNamedQuery(MetadataNamedQuery namedQuery)
INTERNAL:
Add a metadata named query to the project.
|
protected void |
processSecondaryTable(MetadataSecondaryTable secondaryTable)
INTERNAL:
Process a MetadataSecondaryTable.
|
protected void |
processSecondaryTables()
INTERNAL: (Overridden in XMLClassAccessor)
Process a @SecondaryTables.
|
protected void |
processSqlResultSetMapping(MetadataSQLResultSetMapping sqlResultSetMapping)
INTERNAL:
Process an sql result set mapping metadata into a TopLink
SqlResultSetMapping and store it on the session.
|
protected void |
processSqlResultSetMappings()
INTERNAL:
Process a @SqlResultSetMappings.
|
protected void |
processTable()
INTERNAL: (Overridden in XMLClassAccessor)
Process a @Table annotation.
|
protected void |
processTable(MetadataTable table)
INTERNAL:
Process a MetadataTable.
|
protected void |
processTableAndInheritance()
INTERNAL:
Process any inheritance specifics.
|
protected void |
setPostLoad(Method method,
MetadataEntityListener listener)
INTERNAL:
Set the post load event method on the listener.
|
protected void |
setPostPersist(Method method,
MetadataEntityListener listener)
INTERNAL:
Set the post persist event method on the listener.
|
protected void |
setPostRemove(Method method,
MetadataEntityListener listener)
INTERNAL:
Set the post remove event method on the listener.
|
protected void |
setPostUpdate(Method method,
MetadataEntityListener listener)
INTERNAL:
* Set the post update event method on the listener.
|
protected void |
setPrePersist(Method method,
MetadataEntityListener listener)
INTERNAL:
Set the pre persist event method on the listener.
|
protected void |
setPreRemove(Method method,
MetadataEntityListener listener)
INTERNAL:
Set the pre remove event method on the listener.
|
protected void |
setPreUpdate(Method method,
MetadataEntityListener listener)
INTERNAL:
Set the pre update event method on the listener.
|
protected void |
validatePrimaryKey()
INTERNAL:
Call this method after a primary key should have been found.
|
processSequenceGenerator, processSequenceGenerator, processTableGenerator, processTableGenerator
getAnnotatedElement, getAnnotation, getAnnotation, getAttributeName, getDescriptor, getFetchType, getJavaClassName, getLogger, getMapKeyClass, getName, getName, getName, getPrimaryKeyJoinColumns, getProcessor, getProject, getRawClass, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getRelationType, getSetMethodName, getUpperCaseAttributeName, getUpperCaseShortJavaClassName, getValidator, hasColumn, hasPrimaryKeyJoinColumns, isAnnotationPresent, isAnnotationPresent, isBasic, isEmbedded, isEmbeddedId, isManyToMany, isManyToOne, isOneToMany, isOneToOne, isOptional, isProcessed, isRelationship, isXMLAccessor, processAccessor, processPrimaryKeyJoinColumns, processTable, setAccessorMethods, setAnnotatedElement, setIndirectionPolicy, setIsProcessed, usesIndirection
protected Class m_inheritanceParentClass
protected Boolean m_isInheritanceSubclass
protected List<ClassAccessor> m_mappedSuperclasses
public ClassAccessor(MetadataAccessibleObject accessibleObject, MetadataProcessor processor, MetadataDescriptor descriptor)
protected void addMultipleTableKeyFields(MetadataPrimaryKeyJoinColumns primaryKeyJoinColumns, String PK_CTX, String FK_CTX)
protected MetadataAccessor buildAccessor(MetadataAccessibleObject accessibleObject)
public void clearMappedSuperclasses()
protected String getDiscriminatorValue()
protected String getEntityName()
public Class getInheritanceParentClass()
public MetadataDescriptor getInheritanceParentDescriptor()
protected String getInheritanceStrategy()
public Class getJavaClass()
getJavaClass
in class MetadataAccessor
public List<ClassAccessor> getMappedSuperclasses()
protected boolean hasEntity(Class cls)
protected boolean hasInheritance()
protected boolean hasInheritance(Class entityClass)
public boolean isClass()
isClass
in class MetadataAccessor
public boolean isInheritanceSubclass()
protected boolean isTransient(AnnotatedElement annotatedElement, int modifier)
protected boolean isValidPersistenceElement(AnnotatedElement annotatedElement, int modifiers)
protected boolean isValidPersistenceField(Field field)
protected boolean isValidPersistenceMethod(Method method)
public void process()
process
in class MetadataAccessor
protected void processAccessor(MetadataAccessor accessor)
protected void processAccessorFields()
protected void processAccessorMethods()
protected void processAccessors()
protected void processAssociationOverride(String attributeName, MetadataJoinColumns joinColumns)
protected void processAssociationOverrides()
protected void processAttributeOverride(MetadataColumn column)
protected void processAttributeOverrides()
protected void processCallbackMethods(Method[] candidateMethods, MetadataEntityListener listener)
protected void processClassMetadata()
protected void processDefaultListeners(ClassLoader loader)
protected void processDiscriminatorColumn()
protected void processDiscriminatorColumn(MetadataDiscriminatorColumn discriminatorColumn)
protected void processDiscriminatorValue()
protected void processEntity()
public MetadataEntityListener processEntityEventListener(ClassLoader loader)
public void processEntityListeners(Class entityClass, ClassLoader loader)
protected void processExcludeDefaultListeners()
protected void processExcludeSuperclassListeners()
protected void processIdClass()
protected void processIdClass(Class idClass, String ignoreCtx)
protected void processInheritance()
protected void processInheritanceSubclass(MetadataDescriptor parentDescriptor)
protected List<MetadataJoinColumn> processJoinColumns(JoinColumn[] joinColumns)
protected void processLifecycleEvent(MetadataEntityListener listener, Node node, String event, XMLHelper helper, Method[] candidateMethods)
protected void processLifecycleEvents(MetadataEntityListener listener, Node node, XMLHelper helper, Method[] candidateMethods)
public void processListeners(ClassLoader loader)
protected void processMappedSuperclass()
protected void processMappedSuperclasses()
public void processMappedSuperclassEventListener(MetadataEntityListener listener, Class entityClass, ClassLoader loader)
protected void processNamedNativeQueries()
protected void processNamedNativeQuery(MetadataNamedNativeQuery namedNativeQuery)
protected void processNamedQueries()
protected void processNamedQuery(MetadataNamedQuery namedQuery)
protected void processSecondaryTable(MetadataSecondaryTable secondaryTable)
protected void processSecondaryTables()
protected void processSqlResultSetMapping(MetadataSQLResultSetMapping sqlResultSetMapping)
protected void processSqlResultSetMappings()
protected void processTable()
protected void processTable(MetadataTable table)
protected void processTableAndInheritance()
protected void setPostLoad(Method method, MetadataEntityListener listener)
protected void setPostPersist(Method method, MetadataEntityListener listener)
protected void setPostRemove(Method method, MetadataEntityListener listener)
protected void setPostUpdate(Method method, MetadataEntityListener listener)
protected void setPrePersist(Method method, MetadataEntityListener listener)
protected void setPreRemove(Method method, MetadataEntityListener listener)
protected void setPreUpdate(Method method, MetadataEntityListener listener)
protected void validatePrimaryKey()
Copyright © 2021. All rights reserved.