Class XMLEntityMappings


  • public class XMLEntityMappings
    extends ORMetadata
    Object to hold onto the XML entity mappings metadata.
    Since:
    EclipseLink 1.0
    Author:
    Guy Pelletier
    • Constructor Detail

      • XMLEntityMappings

        public XMLEntityMappings()
        INTERNAL:
    • Method Detail

      • equals

        public boolean equals​(Object objectToCompare)
        INTERNAL:
        Specified by:
        equals in class ORMetadata
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getAccess

        public String getAccess()
        INTERNAL: Used for OX mapping.
      • getCatalog

        public String getCatalog()
        INTERNAL: Used for OX mapping.
      • getDefaultCatalog

        protected String getDefaultCatalog()
        INTERNAL: Returns the default catalog. Either from entity-mappings or persistence unit defaults. Note, null could be returned.
      • getDefaultSchema

        protected String getDefaultSchema()
        INTERNAL: Returns the default schema. Either from entity-mappings or persistence unit defaults. Note, null could be returned.
      • getDescription

        public String getDescription()
        INTERNAL: Used for OX mapping.
      • getPackageQualifiedClassName

        public String getPackageQualifiedClassName​(String className)
        INTERNAL: This convenience method will attempt to fully qualify a class name if required. This assumes that the className value is non-null, and a "qualified" class name contains at least one '.' Future: What about Enum support? Employee.Enum currently would not qualify with the package since there is a dot.
      • getMappingFileOrURL

        public String getMappingFileOrURL()
        INTERNAL:
      • getPackage

        public String getPackage()
        INTERNAL: Used for OX mapping.
      • getSchema

        public String getSchema()
        INTERNAL: Used for OX mapping.
      • getVersion

        public String getVersion()
        INTERNAL: Used for OX mapping.
      • isEclipseLinkORMFile

        public boolean isEclipseLinkORMFile()
        INTERNAL:
      • loadedForCanonicalModel

        public boolean loadedForCanonicalModel()
        INTERNAL:
      • newXMLEntityMappingsObject

        protected XMLEntityMappings newXMLEntityMappingsObject()
        INTERNAL: Return a new XMLEntityMappings instance. Used for reloading entities and mapped superclasses.
      • process

        public void process()
        INTERNAL: Process the metadata from the <entity-mappings> level except for the classes themselves. They will be processed afterwards and controlled by the MetadataProcessor. Note: this method does a few things of interest. It not only adds metadata to the project but it will also override (that is EclipseLink-ORM-XML-->JPA-XML && JPA-XML-->Annotation) the necessary metadata and log messages to the user. A validation exception could also be thrown. See the related processing methods for more details. Any XML metadata of the types processed below should call these methods. That is, as an example, a converter can be found at the entity-mappings and entity level. Therefore you must ensure that those from levels other than the entity-mappings call these methods as well to ensure consistent metadata processing (and behavior).
      • processEntityMappingsDefaults

        public void processEntityMappingsDefaults​(ClassAccessor accessor)
        INTERNAL: Set any entity-mappings defaults if specified. Do not blindly set them since a global setting from the persistence-unit-metadata/defaults may have been set and you do not want to risk removing the global value.
      • processPersistenceUnitMetadata

        public void processPersistenceUnitMetadata()
        INTERNAL: Process the persistence metadata if specified. Any conflicts in elements defined in multiple documents will cause an exception to be thrown (unless an override needs to occur from an eclipselink-orm.xml file). The one exception to this rule is default listeners: all default listeners found will be added to a list in the order that they are read from the instance document(s).
      • setAccess

        public void setAccess​(String access)
        INTERNAL: Used for OX mapping.
      • setAccessMethods

        public void setAccessMethods​(AccessMethodsMetadata accessMethods)
        INTERNAL: Used for OX mapping.
      • setCatalog

        public void setCatalog​(String catalog)
        INTERNAL: Used for OX mapping.
      • setConverterAccessors

        public void setConverterAccessors​(List<ConverterAccessor> converterAccessors)
        INTERNAL:
      • setDescription

        public void setDescription​(String description)
        INTERNAL: Used for OX mapping.
      • setEmbeddables

        public void setEmbeddables​(List<EmbeddableAccessor> embeddables)
        INTERNAL: Used for OX mapping.
      • setEntities

        public void setEntities​(List<EntityAccessor> entities)
        INTERNAL: Used for OX mapping.
      • setIsEclipseLinkORMFile

        public void setIsEclipseLinkORMFile​(boolean isEclipseLinkORMFile)
        INTERNAL:
      • setLoadedForCanonicalModel

        public void setLoadedForCanonicalModel​(boolean loadedForCanonicalModel)
        INTERNAL:
      • setLoader

        public void setLoader​(ClassLoader loader)
        INTERNAL:
      • setMappedSuperclasses

        public void setMappedSuperclasses​(List<MappedSuperclassAccessor> mappedSuperclasses)
        INTERNAL: Used for OX mapping.
      • setMappingFile

        public void setMappingFile​(String mappingFileNameOrURL)
        INTERNAL:
      • setMetadataFactory

        public void setMetadataFactory​(MetadataFactory factory)
        INTERNAL:
      • setMixedConverters

        public void setMixedConverters​(List<MixedConverterMetadata> mixedConverters)
        INTERNAL: Used for OX mapping.
      • setNamedNativeQueries

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

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

        public void setPackage​(String pkg)
        INTERNAL: Used for OX mapping.
      • setPartitioning

        public void setPartitioning​(List<PartitioningMetadata> partitioning)
        INTERNAL: Used for OX mapping.
      • setPersistenceUnitMetadata

        public void setPersistenceUnitMetadata​(XMLPersistenceUnitMetadata persistenceUnitMetadata)
        INTERNAL: Used for OX mapping.
      • setPLSQLRecords

        public void setPLSQLRecords​(List<PLSQLRecordMetadata> records)
        INTERNAL: Used for OX mapping.
      • setPLSQLTables

        public void setPLSQLTables​(List<PLSQLTableMetadata> tables)
        INTERNAL: Used for OX mapping.
      • setProject

        public void setProject​(MetadataProject project)
        INTERNAL: Set the project reference for this EntityMappings object.
        Overrides:
        setProject in class ORMetadata
      • setSchema

        public void setSchema​(String schema)
        INTERNAL: Used for OX mapping.
      • setSequenceGenerators

        public void setSequenceGenerators​(List<SequenceGeneratorMetadata> sequenceGenerators)
        INTERNAL: Used for OX mapping.
      • setStructConverters

        public void setStructConverters​(List<StructConverterMetadata> structConverters)
        INTERNAL: Used for OX mapping.
      • setTableGenerators

        public void setTableGenerators​(List<TableGeneratorMetadata> tableGenerators)
        INTERNAL: Used for OX mapping.
      • setTypeConverters

        public void setTypeConverters​(List<TypeConverterMetadata> typeConverters)
        INTERNAL: Used for OX mapping.
      • setUuidGenerators

        public void setUuidGenerators​(List<UuidGeneratorMetadata> uuidGenerators)
        INTERNAL: Used for OX mapping.
      • setVersion

        public void setVersion​(String version)
        INTERNAL: Used for OX mapping.