Package org.hibernate.cfg
Class Configuration.MappingsImpl
java.lang.Object
org.hibernate.cfg.Configuration.MappingsImpl
- All Implemented Interfaces:
Serializable,ExtendedMappings,Mappings
- Direct Known Subclasses:
AnnotationConfiguration.ExtendedMappingsImpl
- Enclosing class:
Configuration
Internal implementation of the Mappings interface giving access to the Configuration's internal
metadata repository state (
Configuration.classes, Configuration.tables, etc).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.cfg.Mappings
Mappings.PropertyReference -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnyMetaDef(AnyMetaDef defAnn) voidaddAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject) Add metadata pertaining to an auxiliary database object to this repository.voidaddClass(PersistentClass persistentClass) Add entity mapping metadata.addClassType(XClass clazz) FIXME should be private but will this break things? Add a class type.voidaddCollection(Collection collection) Add collection mapping metadata to this repository.voidaddColumnBinding(String logicalName, Column physicalColumn, Table table) Binds the given 'physicalColumn' to the give 'logicalName' within the given 'table'.voidaddDefaultGenerator(IdGenerator generator) Adds a default id generator.voidaddDefaultQuery(String name, NamedQueryDefinition query) voidaddDefaultResultSetMapping(ResultSetMappingDefinition definition) voidaddDefaultSQLQuery(String name, NamedSQLQueryDefinition query) addDenormalizedTable(String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable) Adds a 'denormalized table' to this repository.voidaddFilterDefinition(FilterDefinition definition) Adds a filter definition to this repository.voidaddGenerator(IdGenerator generator) Add a generator.voidaddGeneratorTable(String name, Properties params) Add a generator table properties.voidAdds an import (HQL entity rename) to the repository.voidaddJoins(PersistentClass persistentClass, Map<String, Join> joins) Add join metadata for a persistent entity.voidaddMappedBy(String entityName, String propertyName, String inversePropertyName) voidaddMappedSuperclass(Class type, MappedSuperclass mappedSuperclass) add a new MappedSuperclass This should not be called if the MappedSuperclass already exists (it would be erased)voidaddPropertyAnnotatedWithMapsId(XClass entityType, PropertyData property) voidaddPropertyAnnotatedWithMapsIdSpecj(XClass entityType, PropertyData property, String mapsIdValue) voidaddPropertyReference(String referencedClass, String propertyName) Adds a property reference binding to this repository.voidaddPropertyReferencedAssociation(String entityName, String propertyName, String propertyRef) voidaddQuery(String name, NamedQueryDefinition query) Adds metadata for a named query to this repository.voidaddResultSetMapping(ResultSetMappingDefinition sqlResultSetMapping) Adds the metadata for a named SQL result set mapping to this repository.voidAdds a second-pass to the end of the current queue.voidaddSecondPass(SecondPass sp, boolean onTopOfTheQueue) Adds a second pass.voidaddSQLQuery(String name, NamedSQLQueryDefinition query) Adds metadata for a named SQL query to this repository.Adds table metadata to this repository returning the created metadata instance.voidaddTableBinding(String schema, String catalog, String logicalName, String physicalName, Table denormalizedSuperTable) Adds a table binding to this repository.voidAdds an entry to the extends queue queue.voidaddToOneAndIdProperty(XClass entityType, PropertyData property) voidaddTypeDef(String typeName, String typeClass, Properties paramMap) Adds a type definition to this metadata repository.voidaddUniqueConstraintHolders(Table table, List<UniqueConstraintHolder> uniqueConstraintHolders) voidaddUniqueConstraints(Table table, List uniqueConstraints) voidaddUniquePropertyReference(String referencedClass, String propertyName) Adds a property reference binding to this repository where said proeprty reference is marked as unique.voidapplyResultSetMapping(ResultSetMappingDefinition sqlResultSetMapping) findOrCreateFetchProfile(String name, MetadataSource source) Retrieves a fetch profile by either finding one currently in this repository matching the given name or by creating one (and adding it).getAnyMetaDef(String name) Returns the currently bound default catalog name.Retrieves the entity mapping metadata for the given entity name.getClassType(XClass clazz) Get and maintain a cache of class type.getCollection(String role) Retrieves the collection mapping metadata for the given collection role.Retrieve the configuration properties currently in effect.Get the current default property access style.Get the current default cascade style.Get the currently bound default package name.getFilterDefinition(String name) Retrieves a filter definition by name.Retrieves the copmplete map of filter definitions.getFromMappedBy(String entityName, String propertyName) getGenerator(String name) Retrieve the id-generator by name.getGenerator(String name, Map<String, IdGenerator> localGenerators) Try to find the generator from the localGenerators and then from the global generator listgetGeneratorTableProperties(String name, Map<String, Properties> localGeneratorTables) Retrieve the properties related to a generator table.Retrieve the IdentifierGeneratorFactory in effect for this mapping.Retrieve join metadata for a particular persistent entity.getLogicalColumnName(String physicalName, Table table) Find the logical column name against whcih the given physical column name was bound within the given table.getLogicalTableName(Table table) Get the logical table name mapped for the given physical table.getMappedSuperclass(Class type) Get a MappedSuperclass or null if not mappedGet the current naming strategy.Retrieve the database identifier normalizer for this context.Get the current persister class provider implementationgetPhysicalColumnName(String logicalName, Table table) Find the physical column name for the given logical column name within the given table.getPropertyAnnotatedWithIdAndToOne(XClass entityType, String propertyName) Return the property annotated with @ToOne and @Id if any.getPropertyAnnotatedWithMapsId(XClass entityType, String propertyName) Return the property annotated with @MapsId("propertyName") if any.getPropertyReferencedAssociation(String entityName, String propertyName) Get named query metadata by name.getResultSetMapping(String name) Get the metadata for a named SQL result set mapping.Returns the currently bound default schema name.getSQLQuery(String name) Get named SQL query metadata.Returns the named table metadata.getTypeDef(String typeName) Retrieve a type definition by name.Retrieve the type resolver in effect.booleanDetermine whether auto importing of entity names is currently enabled.booleanDetermine whether default laziness is currently enabled.booleanbooleanRetrieves an iterator over the metadata pertaining to all auxiliary database objects int this repository.Same asMappings.iterateAuxiliaryDatabaseObjects()except that here the iterator is reversed.Retrieves an iterator over the entity metadata present in this repository.Returns an iterator over collection metadata.Returns an iterator over table metadata.locatePersistentClassByEntityName(String entityName) Retrieves the entity mapping metadata for the given entity name, potentially accounting for imports.protected voidremoveResultSetMapping(String name) voidsetAutoImport(boolean autoImport) Set whether to enable auto importing of entity names.voidsetCatalogName(String catalogName) Sets the currently bound default catalog name.voidsetDefaultAccess(String defaultAccess) Sets the current default property access style.voidsetDefaultCascade(String defaultCascade) Sets the current default cascade style.voidsetDefaultLazy(boolean defaultLazy) Set whether to enable default laziness.voidsetDefaultPackage(String defaultPackage) Set the current default package name.voidsetNamingStrategy(NamingStrategy namingStrategy) Set the current naming strategy.voidsetPersisterClassProvider(PersisterClassProvider persisterClassProvider) Set the current persister class provider implementationvoidsetSchemaName(String schemaName) Sets the currently bound default schema name.booleanShould we use the new generator strategy mappings.
-
Constructor Details
-
MappingsImpl
protected MappingsImpl()
-
-
Method Details
-
getSchemaName
Description copied from interface:MappingsReturns the currently bound default schema name.- Specified by:
getSchemaNamein interfaceMappings- Returns:
- The currently bound schema name
-
setSchemaName
Description copied from interface:MappingsSets the currently bound default schema name.- Specified by:
setSchemaNamein interfaceMappings- Parameters:
schemaName- The schema name to bind as the current default.
-
getCatalogName
Description copied from interface:MappingsReturns the currently bound default catalog name.- Specified by:
getCatalogNamein interfaceMappings- Returns:
- The currently bound catalog name, or null if none.
-
setCatalogName
Description copied from interface:MappingsSets the currently bound default catalog name.- Specified by:
setCatalogNamein interfaceMappings- Parameters:
catalogName- The catalog name to use as the current default.
-
getDefaultPackage
Description copied from interface:MappingsGet the currently bound default package name.- Specified by:
getDefaultPackagein interfaceMappings- Returns:
- The currently bound default package name
-
setDefaultPackage
Description copied from interface:MappingsSet the current default package name.- Specified by:
setDefaultPackagein interfaceMappings- Parameters:
defaultPackage- The package name to set as the current default.
-
isAutoImport
public boolean isAutoImport()Description copied from interface:MappingsDetermine whether auto importing of entity names is currently enabled.- Specified by:
isAutoImportin interfaceMappings- Returns:
- True if currently enabled; false otherwise.
-
setAutoImport
public void setAutoImport(boolean autoImport) Description copied from interface:MappingsSet whether to enable auto importing of entity names.- Specified by:
setAutoImportin interfaceMappings- Parameters:
autoImport- True to enable; false to diasable.- See Also:
-
isDefaultLazy
public boolean isDefaultLazy()Description copied from interface:MappingsDetermine whether default laziness is currently enabled.- Specified by:
isDefaultLazyin interfaceMappings- Returns:
- True if enabled, false otherwise.
-
setDefaultLazy
public void setDefaultLazy(boolean defaultLazy) Description copied from interface:MappingsSet whether to enable default laziness.- Specified by:
setDefaultLazyin interfaceMappings- Parameters:
defaultLazy- True to enable, false to disable.
-
getDefaultCascade
Description copied from interface:MappingsGet the current default cascade style.- Specified by:
getDefaultCascadein interfaceMappings- Returns:
- The current default cascade style.
-
setDefaultCascade
Description copied from interface:MappingsSets the current default cascade style. .- Specified by:
setDefaultCascadein interfaceMappings- Parameters:
defaultCascade- The cascade style to set as the current default.
-
getDefaultAccess
Description copied from interface:MappingsGet the current default property access style.- Specified by:
getDefaultAccessin interfaceMappings- Returns:
- The current default property access style.
-
setDefaultAccess
Description copied from interface:MappingsSets the current default property access style.- Specified by:
setDefaultAccessin interfaceMappings- Parameters:
defaultAccess- The access style to use as the current default.
-
getNamingStrategy
Description copied from interface:MappingsGet the current naming strategy.- Specified by:
getNamingStrategyin interfaceMappings- Returns:
- The current naming strategy.
-
setNamingStrategy
Description copied from interface:MappingsSet the current naming strategy.- Specified by:
setNamingStrategyin interfaceMappings- Parameters:
namingStrategy- The naming strategy to use.
-
getPersisterClassProvider
Description copied from interface:MappingsGet the current persister class provider implementation- Specified by:
getPersisterClassProviderin interfaceMappings
-
setPersisterClassProvider
Description copied from interface:MappingsSet the current persister class provider implementation- Specified by:
setPersisterClassProviderin interfaceMappings
-
getTypeResolver
Description copied from interface:MappingsRetrieve the type resolver in effect.- Specified by:
getTypeResolverin interfaceMappings- Returns:
- The type resolver.
-
iterateClasses
Description copied from interface:MappingsRetrieves an iterator over the entity metadata present in this repository.- Specified by:
iterateClassesin interfaceMappings- Returns:
- Iterator over class metadata.
-
getClass
Description copied from interface:MappingsRetrieves the entity mapping metadata for the given entity name. -
locatePersistentClassByEntityName
Description copied from interface:MappingsRetrieves the entity mapping metadata for the given entity name, potentially accounting for imports.- Specified by:
locatePersistentClassByEntityNamein interfaceMappings- Parameters:
entityName- The entity name for which to retrieve the metadata.- Returns:
- The entity mapping metadata, or null if none found matching given entity name.
-
addClass
Description copied from interface:MappingsAdd entity mapping metadata.- Specified by:
addClassin interfaceMappings- Parameters:
persistentClass- The entity metadata- Throws:
DuplicateMappingException- Indicates there4 was already an extry corresponding to the given entity name.
-
addImport
Description copied from interface:MappingsAdds an import (HQL entity rename) to the repository.- Specified by:
addImportin interfaceMappings- Parameters:
entityName- The entity name being renamed.rename- The rename- Throws:
DuplicateMappingException- If rename already is mapped to another entity name in this repository.
-
getCollection
Description copied from interface:MappingsRetrieves the collection mapping metadata for the given collection role.- Specified by:
getCollectionin interfaceMappings- Parameters:
role- The collection role for which to retrieve the metadata.- Returns:
- The collection mapping metadata, or null if no matching collection role found.
-
iterateCollections
Description copied from interface:MappingsReturns an iterator over collection metadata.- Specified by:
iterateCollectionsin interfaceMappings- Returns:
- Iterator over collection metadata.
-
addCollection
Description copied from interface:MappingsAdd collection mapping metadata to this repository.- Specified by:
addCollectionin interfaceMappings- Parameters:
collection- The collection metadata- Throws:
DuplicateMappingException- Indicates there was already an entry corresponding to the given collection role
-
getTable
Description copied from interface:MappingsReturns the named table metadata. -
iterateTables
Description copied from interface:MappingsReturns an iterator over table metadata.- Specified by:
iterateTablesin interfaceMappings- Returns:
- Iterator over table metadata.
-
addTable
public Table addTable(String schema, String catalog, String name, String subselect, boolean isAbstract) Description copied from interface:MappingsAdds table metadata to this repository returning the created metadata instance.- Specified by:
addTablein interfaceMappings- Parameters:
schema- The named schema in which the table belongs (or null).catalog- The named catalog in which the table belongs (or null).name- The table namesubselect- A select statement which defines a logical table, much like a DB view.isAbstract- Is the table abstract (i.e. not really existing in the DB)?- Returns:
- The created table metadata, or the existing reference.
-
addDenormalizedTable
public Table addDenormalizedTable(String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable) throws DuplicateMappingException Description copied from interface:MappingsAdds a 'denormalized table' to this repository.- Specified by:
addDenormalizedTablein interfaceMappings- Parameters:
schema- The named schema in which the table belongs (or null).catalog- The named catalog in which the table belongs (or null).name- The table nameisAbstract- Is the table abstract (i.e. not really existing in the DB)?subselect- A select statement which defines a logical table, much like a DB view.includedTable- ???- Returns:
- The created table metadata.
- Throws:
DuplicateMappingException- If such a table mapping already exists.
-
getQuery
Description copied from interface:MappingsGet named query metadata by name. -
addQuery
Description copied from interface:MappingsAdds metadata for a named query to this repository.- Specified by:
addQueryin interfaceMappings- Parameters:
name- The namequery- The metadata- Throws:
DuplicateMappingException- If a query already exists with that name.
-
addDefaultQuery
- Specified by:
addDefaultQueryin interfaceMappings
-
getSQLQuery
Description copied from interface:MappingsGet named SQL query metadata.- Specified by:
getSQLQueryin interfaceMappings- Parameters:
name- The named SQL query name.- Returns:
- The meatdata, or null if none found.
-
addSQLQuery
public void addSQLQuery(String name, NamedSQLQueryDefinition query) throws DuplicateMappingException Description copied from interface:MappingsAdds metadata for a named SQL query to this repository.- Specified by:
addSQLQueryin interfaceMappings- Parameters:
name- The namequery- The metadata- Throws:
DuplicateMappingException- If a query already exists with that name.
-
addDefaultSQLQuery
- Specified by:
addDefaultSQLQueryin interfaceMappings
-
getResultSetMapping
Description copied from interface:MappingsGet the metadata for a named SQL result set mapping.- Specified by:
getResultSetMappingin interfaceMappings- Parameters:
name- The mapping name.- Returns:
- The SQL result set mapping metadat, or null if none found.
-
addResultSetMapping
public void addResultSetMapping(ResultSetMappingDefinition sqlResultSetMapping) throws DuplicateMappingException Description copied from interface:MappingsAdds the metadata for a named SQL result set mapping to this repository.- Specified by:
addResultSetMappingin interfaceMappings- Parameters:
sqlResultSetMapping- The metadata- Throws:
DuplicateMappingException- If metadata for another SQL result mapping was already found under the given name.
-
applyResultSetMapping
public void applyResultSetMapping(ResultSetMappingDefinition sqlResultSetMapping) throws DuplicateMappingException - Throws:
DuplicateMappingException
-
addDefaultResultSetMapping
- Specified by:
addDefaultResultSetMappingin interfaceMappings
-
removeResultSetMapping
-
getTypeDef
Description copied from interface:MappingsRetrieve a type definition by name.- Specified by:
getTypeDefin interfaceMappings- Parameters:
typeName- The name of the type definition to retrieve.- Returns:
- The type definition, or null if none found.
-
addTypeDef
Description copied from interface:MappingsAdds a type definition to this metadata repository.- Specified by:
addTypeDefin interfaceMappings- Parameters:
typeName- The type name.typeClass- The class implementing theTypecontract.paramMap- Map of parameters to be used to configure the type after instantiation.
-
getFilterDefinitions
Description copied from interface:MappingsRetrieves the copmplete map of filter definitions.- Specified by:
getFilterDefinitionsin interfaceMappings- Returns:
- The filter definition map.
-
getFilterDefinition
Description copied from interface:MappingsRetrieves a filter definition by name.- Specified by:
getFilterDefinitionin interfaceMappings- Parameters:
name- The name of the filter definition to retrieve.- Returns:
- The filter definition, or null.
-
addFilterDefinition
Description copied from interface:MappingsAdds a filter definition to this repository.- Specified by:
addFilterDefinitionin interfaceMappings- Parameters:
definition- The filter definition to add.
-
findOrCreateFetchProfile
Description copied from interface:MappingsRetrieves a fetch profile by either finding one currently in this repository matching the given name or by creating one (and adding it).- Specified by:
findOrCreateFetchProfilein interfaceMappings- Parameters:
name- The name of the profile.source- The source from which this profile is named.- Returns:
- The fetch profile metadata.
-
iterateAuxliaryDatabaseObjects
- Specified by:
iterateAuxliaryDatabaseObjectsin interfaceMappings
-
iterateAuxiliaryDatabaseObjects
Description copied from interface:MappingsRetrieves an iterator over the metadata pertaining to all auxiliary database objects int this repository.- Specified by:
iterateAuxiliaryDatabaseObjectsin interfaceMappings- Returns:
- Iterator over the auxiliary database object metadata.
-
iterateAuxliaryDatabaseObjectsInReverse
- Specified by:
iterateAuxliaryDatabaseObjectsInReversein interfaceMappings
-
iterateAuxiliaryDatabaseObjectsInReverse
Description copied from interface:MappingsSame asMappings.iterateAuxiliaryDatabaseObjects()except that here the iterator is reversed.- Specified by:
iterateAuxiliaryDatabaseObjectsInReversein interfaceMappings- Returns:
- The reversed iterator.
-
addAuxiliaryDatabaseObject
Description copied from interface:MappingsAdd metadata pertaining to an auxiliary database object to this repository.- Specified by:
addAuxiliaryDatabaseObjectin interfaceMappings- Parameters:
auxiliaryDatabaseObject- The metadata.
-
getLogicalTableName
Description copied from interface:MappingsGet the logical table name mapped for the given physical table.- Specified by:
getLogicalTableNamein interfaceMappings- Parameters:
table- The table for which to determine the logical name.- Returns:
- The logical name.
- Throws:
MappingException- Indicates that no logical name was bound for the given physical table.
-
addTableBinding
public void addTableBinding(String schema, String catalog, String logicalName, String physicalName, Table denormalizedSuperTable) throws DuplicateMappingException Description copied from interface:MappingsAdds a table binding to this repository.- Specified by:
addTableBindingin interfaceMappings- Parameters:
schema- The schema in which the table belongs (may be null).catalog- The catalog in which the table belongs (may be null).logicalName- The logical table name.physicalName- The physical table name.denormalizedSuperTable- ???- Throws:
DuplicateMappingException- Indicates physical table was already bound to another logical name.
-
addColumnBinding
public void addColumnBinding(String logicalName, Column physicalColumn, Table table) throws DuplicateMappingException Description copied from interface:MappingsBinds the given 'physicalColumn' to the give 'logicalName' within the given 'table'.- Specified by:
addColumnBindingin interfaceMappings- Parameters:
logicalName- The logical column name binding.physicalColumn- The physical column metadata.table- The table metadata.- Throws:
DuplicateMappingException- Indicates a duplicate binding for either the physical column name or the logical column name.
-
getPhysicalColumnName
Description copied from interface:MappingsFind the physical column name for the given logical column name within the given table.- Specified by:
getPhysicalColumnNamein interfaceMappings- Parameters:
logicalName- The logical name binding.table- The table metatdata.- Returns:
- The physical column name.
- Throws:
MappingException- Indicates that no such binding was found.
-
getLogicalColumnName
Description copied from interface:MappingsFind the logical column name against whcih the given physical column name was bound within the given table.- Specified by:
getLogicalColumnNamein interfaceMappings- Parameters:
physicalName- The physical column nametable- The table metadata.- Returns:
- The logical column name.
- Throws:
MappingException- Indicates that no such binding was found.
-
addSecondPass
Description copied from interface:MappingsAdds a second-pass to the end of the current queue.- Specified by:
addSecondPassin interfaceMappings- Parameters:
sp- The second pass to add.
-
addSecondPass
Description copied from interface:MappingsAdds a second pass.- Specified by:
addSecondPassin interfaceMappings- Parameters:
sp- The second pass to add.onTopOfTheQueue- True to add to the beginning of the queue; false to add to the end.
-
addPropertyReference
Description copied from interface:MappingsAdds a property reference binding to this repository.- Specified by:
addPropertyReferencein interfaceMappings- Parameters:
referencedClass- The referenced entity name.propertyName- The referenced property name.
-
addUniquePropertyReference
Description copied from interface:MappingsAdds a property reference binding to this repository where said proeprty reference is marked as unique.- Specified by:
addUniquePropertyReferencein interfaceMappings- Parameters:
referencedClass- The referenced entity name.propertyName- The referenced property name.
-
addToExtendsQueue
Description copied from interface:MappingsAdds an entry to the extends queue queue.- Specified by:
addToExtendsQueuein interfaceMappings- Parameters:
entry- The entry to add.
-
getIdentifierGeneratorFactory
Description copied from interface:MappingsRetrieve the IdentifierGeneratorFactory in effect for this mapping.- Specified by:
getIdentifierGeneratorFactoryin interfaceMappings- Returns:
- The IdentifierGeneratorFactory
-
addMappedSuperclass
Description copied from interface:Mappingsadd a new MappedSuperclass This should not be called if the MappedSuperclass already exists (it would be erased)- Specified by:
addMappedSuperclassin interfaceMappings- Parameters:
type- type corresponding to the MappedsuperclassmappedSuperclass- MappedSuperclass
-
getMappedSuperclass
Description copied from interface:MappingsGet a MappedSuperclass or null if not mapped- Specified by:
getMappedSuperclassin interfaceMappings- Parameters:
type- class corresponding to the MappedSuperclass- Returns:
- the MappedSuperclass
-
getObjectNameNormalizer
Description copied from interface:MappingsRetrieve the database identifier normalizer for this context.- Specified by:
getObjectNameNormalizerin interfaceMappings- Returns:
- The normalizer.
-
getConfigurationProperties
Description copied from interface:MappingsRetrieve the configuration properties currently in effect.- Specified by:
getConfigurationPropertiesin interfaceMappings- Returns:
- The configuration properties
-
addDefaultGenerator
Description copied from interface:MappingsAdds a default id generator.- Specified by:
addDefaultGeneratorin interfaceMappings- Parameters:
generator- The id generator
-
isInSecondPass
public boolean isInSecondPass()- Specified by:
isInSecondPassin interfaceMappings
-
getPropertyAnnotatedWithMapsId
Description copied from interface:MappingsReturn the property annotated with @MapsId("propertyName") if any. Null otherwise- Specified by:
getPropertyAnnotatedWithMapsIdin interfaceMappings
-
addPropertyAnnotatedWithMapsId
- Specified by:
addPropertyAnnotatedWithMapsIdin interfaceMappings
-
isSpecjProprietarySyntaxEnabled
public boolean isSpecjProprietarySyntaxEnabled()- Specified by:
isSpecjProprietarySyntaxEnabledin interfaceMappings
-
addPropertyAnnotatedWithMapsIdSpecj
public void addPropertyAnnotatedWithMapsIdSpecj(XClass entityType, PropertyData property, String mapsIdValue) - Specified by:
addPropertyAnnotatedWithMapsIdSpecjin interfaceMappings
-
getPropertyAnnotatedWithIdAndToOne
Description copied from interface:MappingsReturn the property annotated with @ToOne and @Id if any. Null otherwise- Specified by:
getPropertyAnnotatedWithIdAndToOnein interfaceMappings
-
addToOneAndIdProperty
- Specified by:
addToOneAndIdPropertyin interfaceMappings
-
useNewGeneratorMappings
public boolean useNewGeneratorMappings()Description copied from interface:MappingsShould we use the new generator strategy mappings. This is controlled by theConfiguration.USE_NEW_ID_GENERATOR_MAPPINGSsetting.- Specified by:
useNewGeneratorMappingsin interfaceMappings- Returns:
- True if the new generators should be used, false otherwise.
-
getGenerator
Description copied from interface:MappingsRetrieve the id-generator by name.- Specified by:
getGeneratorin interfaceMappings- Parameters:
name- The generator name.- Returns:
- The generator, or null.
-
getGenerator
Description copied from interface:MappingsTry to find the generator from the localGenerators and then from the global generator list- Specified by:
getGeneratorin interfaceMappings- Parameters:
name- generator namelocalGenerators- local generators- Returns:
- the appropriate idgenerator or null if not found
-
addGenerator
Description copied from interface:MappingsAdd a generator.- Specified by:
addGeneratorin interfaceMappings- Parameters:
generator- The generator to add.
-
addGeneratorTable
Description copied from interface:MappingsAdd a generator table properties.- Specified by:
addGeneratorTablein interfaceMappings- Parameters:
name- The generator nameparams- The generator table properties.
-
getGeneratorTableProperties
public Properties getGeneratorTableProperties(String name, Map<String, Properties> localGeneratorTables) Description copied from interface:MappingsRetrieve the properties related to a generator table.- Specified by:
getGeneratorTablePropertiesin interfaceMappings- Parameters:
name- generator namelocalGeneratorTables- local generator tables- Returns:
- The properties, or null.
-
getJoins
Description copied from interface:MappingsRetrieve join metadata for a particular persistent entity. -
addJoins
Description copied from interface:MappingsAdd join metadata for a persistent entity. -
getClassType
Description copied from interface:MappingsGet and maintain a cache of class type.- Specified by:
getClassTypein interfaceMappings- Parameters:
clazz- The XClass mapping- Returns:
- The class type.
-
addClassType
Description copied from interface:MappingsFIXME should be private but will this break things? Add a class type.- Specified by:
addClassTypein interfaceMappings- Parameters:
clazz- The XClass mapping.- Returns:
- The class type.
-
getTableUniqueConstraints
- Specified by:
getTableUniqueConstraintsin interfaceMappings
-
getUniqueConstraintHoldersByTable
- Specified by:
getUniqueConstraintHoldersByTablein interfaceMappings
-
addUniqueConstraints
- Specified by:
addUniqueConstraintsin interfaceMappings
-
addUniqueConstraintHolders
public void addUniqueConstraintHolders(Table table, List<UniqueConstraintHolder> uniqueConstraintHolders) - Specified by:
addUniqueConstraintHoldersin interfaceMappings
-
addMappedBy
- Specified by:
addMappedByin interfaceMappings
-
getFromMappedBy
- Specified by:
getFromMappedByin interfaceMappings
-
addPropertyReferencedAssociation
public void addPropertyReferencedAssociation(String entityName, String propertyName, String propertyRef) - Specified by:
addPropertyReferencedAssociationin interfaceMappings
-
getPropertyReferencedAssociation
- Specified by:
getPropertyReferencedAssociationin interfaceMappings
-
getReflectionManager
- Specified by:
getReflectionManagerin interfaceMappings
-
getClasses
- Specified by:
getClassesin interfaceMappings
-
addAnyMetaDef
- Specified by:
addAnyMetaDefin interfaceMappings- Throws:
AnnotationException
-
getAnyMetaDef
- Specified by:
getAnyMetaDefin interfaceMappings
-