Direct Known Subclasses:
EntityAccessor

public class MappedSuperclassAccessor extends ClassAccessor
INTERNAL: A mapped superclass accessor. When adding new metadata objects, be sure to include their initialization in initXMLObject. This sets the accessible object and the location of the ORMetadata which is used when merging. Also new member metadata variables need to be added to the merge method. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - any metadata mapped from XML to this class must be handled in the merge method. (merging is done at the accessor/mapping level) - any metadata mapped from XML to this class must be initialized in the initXMLObject method. - methods should be preserved in alphabetical order.
Since:
TopLink EJB 3.0 Reference Implementation
  • Constructor Details

  • Method Details

    • excludeDefaultListeners

      public boolean excludeDefaultListeners()
      INTERNAL: Used for OX mapping.
    • excludeSuperclassListeners

      public boolean excludeSuperclassListeners()
      INTERNAL: Used for OX mapping.
    • getAdditionalCriteria

      public AdditionalCriteriaMetadata getAdditionalCriteria()
      INTERNAL: Used for OX mapping.
    • getCache

      public CacheMetadata getCache()
      INTERNAL: Used for OX mapping.
    • getCacheIndexes

      public List<CacheIndexMetadata> getCacheIndexes()
      INTERNAL: Used for OX mapping.
    • getCacheable

      public Boolean getCacheable()
      INTERNAL: Used for OX mapping.
    • getCacheInterceptor

      public CacheInterceptorMetadata getCacheInterceptor()
      INTERNAL: Used for OX mapping.
    • getEntityListeners

      public List<EntityListenerMetadata> getEntityListeners()
      INTERNAL: Used for OX mapping.
    • getExcludeDefaultListeners

      public Boolean getExcludeDefaultListeners()
      INTERNAL: Used for OX mapping.
    • getExcludeSuperclassListeners

      public Boolean getExcludeSuperclassListeners()
      INTERNAL: Used for OX mapping.
    • getExistenceChecking

      public String getExistenceChecking()
      INTERNAL: Used for OX mapping.
    • getFetchGroups

      public List<FetchGroupMetadata> getFetchGroups()
      INTERNAL: Used for OX mapping.
    • getIdClass

      protected MetadataClass getIdClass()
      INTERNAL:
    • getIdClassName

      public String getIdClassName()
      INTERNAL: Used for OX mapping.
    • getMultitenant

      public MultitenantMetadata getMultitenant()
      INTERNAL: Used for OX mapping.
    • getNamedNativeQueries

      public List<NamedNativeQueryMetadata> getNamedNativeQueries()
      INTERNAL: Used for OX mapping.
    • getNamedPLSQLStoredFunctionQueries

      public List<NamedPLSQLStoredFunctionQueryMetadata> getNamedPLSQLStoredFunctionQueries()
      INTERNAL: Used for OX mapping.
    • getNamedPLSQLStoredProcedureQueries

      public List<NamedPLSQLStoredProcedureQueryMetadata> getNamedPLSQLStoredProcedureQueries()
      INTERNAL: Used for OX mapping.
    • getNamedQueries

      public List<NamedQueryMetadata> getNamedQueries()
      INTERNAL: Used for OX mapping.
    • getNamedStoredFunctionQueries

      public List<NamedStoredFunctionQueryMetadata> getNamedStoredFunctionQueries()
      INTERNAL: Used for OX mapping.
    • getNamedStoredProcedureQueries

      public List<NamedStoredProcedureQueryMetadata> getNamedStoredProcedureQueries()
      INTERNAL: Used for OX mapping.
    • getOptimisticLocking

      public OptimisticLockingMetadata getOptimisticLocking()
      INTERNAL: Used for OX mapping.
    • getPostLoad

      public String getPostLoad()
      INTERNAL: Used for OX mapping.
    • getPostPersist

      public String getPostPersist()
      INTERNAL: Used for OX mapping.
    • getPostRemove

      public String getPostRemove()
      INTERNAL: Used for OX mapping.
    • getPostUpdate

      public String getPostUpdate()
      INTERNAL: Used for OX mapping.
    • getPrePersist

      public String getPrePersist()
      INTERNAL: Used for OX mapping.
    • getPreRemove

      public String getPreRemove()
      INTERNAL: Used for OX mapping.
    • getPreUpdate

      public String getPreUpdate()
      INTERNAL: Used for OX mapping.
    • getPrimaryKey

      public PrimaryKeyMetadata getPrimaryKey()
      INTERNAL: Used for OX mapping.
    • getQueryRedirectors

      public QueryRedirectorsMetadata getQueryRedirectors()
      INTERNAL: Used for OX mapping.
    • getReadOnly

      public Boolean getReadOnly()
      INTERNAL: Used for OX mapping.
    • getSequenceGenerator

      public SequenceGeneratorMetadata getSequenceGenerator()
      INTERNAL: Used for OX mapping.
    • getSqlResultSetMappings

      public List<SQLResultSetMappingMetadata> getSqlResultSetMappings()
      INTERNAL: Used for OX mapping.
    • getSerializedObjectPolicy

      public SerializedObjectPolicyMetadata getSerializedObjectPolicy()
      INTERNAL: Used for OX mapping.
    • getTableGenerator

      public TableGeneratorMetadata getTableGenerator()
      INTERNAL: Used for OX mapping.
    • getUuidGenerator

      public UuidGeneratorMetadata getUuidGenerator()
      INTERNAL: Used for OX mapping.
    • hasObjectRelationalFieldMappingAnnotationsDefined

      protected boolean hasObjectRelationalFieldMappingAnnotationsDefined()
      INTERNAL: Return true if any given field defines object relational persistence mapping annotations. This method is used when determining the access type of this accessor. Note: Through the annotation target, it is invalid to specify a lifecycle annotation on a field so we don't need to check as we do when checking the methods.
      See Also:
    • hasObjectRelationalMethodMappingAnnotationsDefined

      protected boolean hasObjectRelationalMethodMappingAnnotationsDefined()
      INTERNAL: Return true if any given method defines object relational persistence mapping annotations. This method is used when determining the access type of this accessor. Note: life cycle annotations are NOT object relational mappings therefore should not influence the decision.
      See Also:
    • initIdClass

      protected void initIdClass()
      INTERNAL: This method is called in the pre-processing stage since we want to gather a list of id classes used throughout the persistence unit. This will help us build accessors, namely, mappedById accessors that can reference an id class type.
    • initXMLObject

      public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
      INTERNAL:
      Overrides:
      initXMLObject in class ClassAccessor
    • isMappedSuperclass

      public boolean isMappedSuperclass()
      INTERNAL: Return whether this accessor represents a MappedSuperclass
      Overrides:
      isMappedSuperclass in class ClassAccessor
    • merge

      public void merge(ORMetadata metadata)
      INTERNAL: Mapped-superclass level merging details. Merging is only done on accessors from XML. Since entities and embeddables are initialized before merging, for any class name specifications we can not only merge the class names but must also merge the initialized classes since we do not re-initialize class accessors after a merge. Mapped superclasses are not initialized till they are reloaded therefore merging only the class names is needed, however merging their respective MetadataClasses will do nothing since merging null with null yields null.
      Overrides:
      merge in class ClassAccessor
    • preProcess

      public void preProcess()
      INTERNAL: The pre-process method is called during regular deployment and metadata processing. This method will pre-process the items of interest on this mapped superclass for each entity class that inherits from it. The order of processing is important, care must be taken if changes must be made.
      Overrides:
      preProcess in class ClassAccessor
    • process

      public void process()
      INTERNAL: Process the items of interest on a mapped superclass.
      Overrides:
      process in class ClassAccessor
    • processAdditionalCriteria

      protected void processAdditionalCriteria()
      INTERNAL: Process the additional criteria metadata specified on an entity or mapped superclass. Once the additional criteria are processed from XML process the additional criteria from annotations. This order of processing must be maintained.
    • processAccessType

      public void processAccessType()
      INTERNAL: Process the accessType for a MappedSuperclass. This function is referenced by MetadataProject.addMetamodelMappedSuperclass(). The overridden function on the subclass must be used in all other cases.
      Specified by:
      processAccessType in class ClassAccessor
      Since:
      EclipseLink 1.2 for the JPA 2.0 Reference Implementation
    • processCache

      protected void processCache()
      INTERNAL: Process a cache metadata.
    • processCacheable

      protected void processCacheable()
      INTERNAL: Called in pre-process. It is called from an entity accessor and in turn is called on the mapped-superclasses of that entity.
    • processCacheInterceptor

      protected void processCacheInterceptor()
      INTERNAL: Process a cache interceptor metadata.
    • processCaching

      protected void processCaching()
      INTERNAL: Process a caching metadata. This method will be called on an entity's mapped superclasses (bottom --> up). We go through the mapped superclasses to not only apply a cache setting but log ignore messages.
    • processCachingMetadata

      protected void processCachingMetadata()
      INTERNAL: Process a caching metadata. These are the items we process to configure the entity's cache settings.
    • processCacheIndexes

      protected void processCacheIndexes()
      INTERNAL: Process cache index information for the given metadata descriptor.
    • processDefaultRedirectors

      protected void processDefaultRedirectors()
      INTERNAL: Process a default redirector metadata.
    • processEntityListeners

      public void processEntityListeners(ClassLoader loader)
      INTERNAL: Process the entity listeners for this class accessor. Entity listeners defined in XML will override those specified on the class.
    • processExcludeDefaultListeners

      protected void processExcludeDefaultListeners()
      INTERNAL: Process the exclude-default-listeners value.
    • processExcludeSuperclassListeners

      protected void processExcludeSuperclassListeners()
      INTERNAL: Process the ExcludeSuperclassListeners value if one is specified (taking metadata-complete into consideration).
    • processExistenceChecking

      protected void processExistenceChecking()
      INTERNAL: Process the ExistenceChecking value if one is specified (taking metadata-complete into consideration).
    • processFetchGroup

      protected void processFetchGroup(FetchGroupMetadata fetchGroup, Map<String,FetchGroupMetadata> fetchGroups)
      INTERNAL:
    • processFetchGroups

      protected void processFetchGroups()
      INTERNAL: Process the fetch groups for this class. We need to go through both the XML list and those defined in annotations. Must look for multiple same named fetch groups within XML and annotations and XML named fetch groups must override a similar named fetch group defined within an annotation. This method will be called from both Entity And MappedSuperclass. The fetch groups from the entity are added first followed by those from its mapped superclass(es).
    • processIdClass

      protected void processIdClass()
      INTERNAL: Process an IdClass metadata. It is used to specify composite primary keys. The primary keys will be processed and stored from the PK class so that they may be validated against the fields or properties of the entity bean. The access type of a primary key class is determined by the access type of the entity for which it is the primary key.
    • processMetamodelDescriptor

      public void processMetamodelDescriptor()
      INTERNAL: Used to process mapped superclasses when creating descriptors for a metamodel. The MappedSuperclass Descriptors here are separate from non-MappedSuperclass Descriptors.
      Since:
      EclipseLink 1.2 for the JPA 2.0 Reference Implementation
    • processMultitenant

      protected void processMultitenant()
      INTERNAL: Process the multitenant metadata specified on a mapped superclass and apply it to a sub-entity that has no multitenant metadata specified.
    • processNamedNativeQueries

      protected void processNamedNativeQueries()
      INTERNAL: Process/collect the named native queries on this accessor and add them to the project for later processing.
    • processNamedPLSQLStoredFunctionQueries

      protected void processNamedPLSQLStoredFunctionQueries()
      INTERNAL: Process/collect the named PLSQL stored function queries on this accessor and add them to the project for later processing.
    • processNamedPLSQLStoredProcedureQueries

      protected void processNamedPLSQLStoredProcedureQueries()
      INTERNAL: Process/collect the named PLSQL stored procedure queries on this accessor and add them to the project for later processing.
    • processNamedQueries

      protected void processNamedQueries()
      INTERNAL: Process/collect the named queries on this accessor and add them to the project for later processing.
    • processNamedStoredFunctionQueries

      protected void processNamedStoredFunctionQueries()
      INTERNAL: Process/collect the named stored procedure queries on this accessor and add them to the project for later processing.
    • processNamedStoredProcedureQueries

      protected void processNamedStoredProcedureQueries()
      INTERNAL: Process/collect the named stored function queries on this accessor and add them to the project for later processing.
    • processOptimisticLocking

      protected void processOptimisticLocking()
      INTERNAL: Process an OptimisticLockingMetadata.
    • processReadOnly

      protected void processReadOnly()
      INTERNAL: Process a read only setting.
    • processPrimaryKey

      protected void processPrimaryKey()
      INTERNAL: Process the primary key annotation.
    • processSequenceGenerator

      protected void processSequenceGenerator()
      INTERNAL: Process a SequenceGenerator annotation into a common metadata sequence generator and add it to the project.
    • processSerializedObjectPolicy

      protected void processSerializedObjectPolicy()
      INTERNAL: Process a SerializedObjectPolicyMetadata.
    • processSqlResultSetMappings

      protected void processSqlResultSetMappings()
      INTERNAL: Process the sql result set mappings for the given class which could be an entity or a mapped superclass.
    • processTableGenerator

      protected void processTableGenerator()
      INTERNAL: Process a TableGenerator annotation into a common metadata table generator and add it to the project.
    • processUuidGenerator

      protected void processUuidGenerator()
      INTERNAL: Process a TableGenerator annotation into a common metadata table generator and add it to the project.
    • setAdditionalCriteria

      public void setAdditionalCriteria(AdditionalCriteriaMetadata additionalCriteria)
      INTERNAL: Used for OX mapping.
    • setCache

      public void setCache(CacheMetadata cache)
      INTERNAL: Used for OX mapping.
    • setCacheIndexes

      public void setCacheIndexes(List<CacheIndexMetadata> indexes)
      INTERNAL: Used for OX mapping.
    • setCacheable

      public void setCacheable(Boolean cacheable)
      INTERNAL: Used for OX mapping.
    • setCacheInterceptor

      public void setCacheInterceptor(CacheInterceptorMetadata cacheInterceptor)
      INTERNAL: Used for OX mapping.
    • setEntityListeners

      public void setEntityListeners(List<EntityListenerMetadata> entityListeners)
      INTERNAL: Used for OX mapping.
    • setExcludeDefaultListeners

      public void setExcludeDefaultListeners(Boolean excludeDefaultListeners)
      INTERNAL: Used for OX mapping.
    • setExcludeSuperclassListeners

      public void setExcludeSuperclassListeners(Boolean excludeSuperclassListeners)
      INTERNAL: Used for OX mapping
    • setExistenceChecking

      public void setExistenceChecking(String checking)
      INTERNAL: Used for OX mapping.
    • setFetchGroups

      public void setFetchGroups(List<FetchGroupMetadata> fetchGroups)
      INTERNAL: Used for OX mapping.
    • setIdClass

      protected void setIdClass(MetadataClass idClass)
      INTERNAL:
    • setIdClassName

      public void setIdClassName(String idClassName)
      INTERNAL: Used for OX mapping.
    • setMultitenant

      public void setMultitenant(MultitenantMetadata multitenant)
      INTERNAL: Used for OX mapping.
    • setNamedNativeQueries

      public void setNamedNativeQueries(List<NamedNativeQueryMetadata> namedNativeQueries)
      INTERNAL: Used for OX mapping.
    • setNamedPLSQLStoredFunctionQueries

      public void setNamedPLSQLStoredFunctionQueries(List<NamedPLSQLStoredFunctionQueryMetadata> namedPLSQLStoredFunctionQueries)
      INTERNAL: Used for OX mapping.
    • setNamedPLSQLStoredProcedureQueries

      public void setNamedPLSQLStoredProcedureQueries(List<NamedPLSQLStoredProcedureQueryMetadata> namedPLSQLStoredProcedureQueries)
      INTERNAL: Used for OX mapping.
    • setNamedQueries

      public void setNamedQueries(List<NamedQueryMetadata> namedQueries)
      INTERNAL: Used for OX mapping.
    • setNamedStoredFunctionQueries

      public void setNamedStoredFunctionQueries(List<NamedStoredFunctionQueryMetadata> namedStoredFunctionQueries)
      INTERNAL: Used for OX mapping.
    • setNamedStoredProcedureQueries

      public void setNamedStoredProcedureQueries(List<NamedStoredProcedureQueryMetadata> namedStoredProcedureQueries)
      INTERNAL: Used for OX mapping.
    • setOptimisticLocking

      public void setOptimisticLocking(OptimisticLockingMetadata optimisticLocking)
      INTERNAL: Used for OX mapping.
    • setPostLoad

      public void setPostLoad(String postLoad)
      INTERNAL: Used for OX mapping.
    • setPostPersist

      public void setPostPersist(String postPersist)
      INTERNAL:
    • setPostRemove

      public void setPostRemove(String postRemove)
      INTERNAL:
    • setPostUpdate

      public void setPostUpdate(String postUpdate)
      INTERNAL:
    • setPrePersist

      public void setPrePersist(String prePersist)
      INTERNAL:
    • setPreRemove

      public void setPreRemove(String preRemove)
      INTERNAL:
    • setPreUpdate

      public void setPreUpdate(String preUpdate)
      INTERNAL:
    • setPrimaryKey

      public void setPrimaryKey(PrimaryKeyMetadata primaryKey)
      INTERNAL: Used for OX mapping.
    • setQueryRedirectors

      public void setQueryRedirectors(QueryRedirectorsMetadata redirectors)
      INTERNAL: Used for OX mapping.
    • setReadOnly

      public void setReadOnly(Boolean readOnly)
      INTERNAL: Used for OX mapping.
    • setSequenceGenerator

      public void setSequenceGenerator(SequenceGeneratorMetadata sequenceGenerator)
      INTERNAL: Used for OX mapping.
    • setSerializedObjectPolicy

      public void setSerializedObjectPolicy(SerializedObjectPolicyMetadata serializedObjectPolicy)
      INTERNAL: Used for OX mapping.
    • setSqlResultSetMappings

      public void setSqlResultSetMappings(List<SQLResultSetMappingMetadata> sqlResultSetMappings)
      INTERNAL: Used for OX mapping.
    • setTableGenerator

      public void setTableGenerator(TableGeneratorMetadata tableGenerator)
      INTERNAL: Used for OX mapping.
    • setUuidGenerator

      public void setUuidGenerator(UuidGeneratorMetadata uuidGenerator)
      INTERNAL: Used for OX mapping.