|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cfg.Configuration.MappingsImpl org.hibernate.cfg.AnnotationConfiguration.ExtendedMappingsImpl
protected class AnnotationConfiguration.ExtendedMappingsImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.hibernate.cfg.Mappings |
---|
Mappings.PropertyReference |
Constructor Summary | |
---|---|
AnnotationConfiguration.ExtendedMappingsImpl()
|
Method Summary | |
---|---|
void |
addAnnotationConfiguredFetchProfile(FetchProfile fetchProfile)
Add the specified profile to the list of fetch profiles configured via annotations. |
void |
addAnyMetaDef(AnyMetaDef defAnn)
|
AnnotatedClassType |
addClassType(org.hibernate.annotations.common.reflection.XClass clazz)
FIXME should be private but will this break things? Add a class type. |
void |
addDefaultGenerator(IdGenerator generator)
Adds a default id generator. |
void |
addDefaultQuery(String name,
NamedQueryDefinition query)
|
void |
addDefaultResultSetMapping(ResultSetMappingDefinition definition)
|
void |
addDefaultSQLQuery(String name,
NamedSQLQueryDefinition query)
|
void |
addGenerator(IdGenerator generator)
Add a generator. |
void |
addGeneratorTable(String name,
Properties params)
Add a generator table properties. |
void |
addJoins(PersistentClass persistentClass,
Map<String,Join> joins)
Add join metadata for a persistent entity. |
void |
addMappedBy(String entityName,
String propertyName,
String inversePropertyName)
|
void |
addPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass entityType,
PropertyData property)
|
void |
addPropertyReference(String referencedClass,
String propertyName)
Adds a property reference binding to this repository. |
void |
addPropertyReferencedAssociation(String entityName,
String propertyName,
String propertyRef)
|
void |
addQuery(String name,
NamedQueryDefinition query)
Adds metadata for a named query to this repository. |
void |
addResultSetMapping(ResultSetMappingDefinition definition)
Adds the metadata for a named SQL result set mapping to this repository. |
void |
addSQLQuery(String name,
NamedSQLQueryDefinition query)
Adds metadata for a named SQL query to this repository. |
void |
addToOneAndIdProperty(org.hibernate.annotations.common.reflection.XClass entityType,
PropertyData property)
|
void |
addUniqueConstraintHolders(Table table,
List<UniqueConstraintHolder> uniqueConstraintHolders)
|
void |
addUniqueConstraints(Table table,
List uniqueConstraints)
|
void |
addUniquePropertyReference(String referencedClass,
String propertyName)
Adds a property reference binding to this repository where said proeprty reference is marked as unique. |
boolean |
containsAnnotationConfiguredFetchProfile(FetchProfile fetchProfile)
|
AnyMetaDef |
getAnyMetaDef(String name)
|
Map |
getClasses()
|
AnnotatedClassType |
getClassType(org.hibernate.annotations.common.reflection.XClass clazz)
Get and maintain a cache of class type. |
String |
getFromMappedBy(String entityName,
String propertyName)
|
IdGenerator |
getGenerator(String name)
Retrieve the id-generator by name. |
IdGenerator |
getGenerator(String name,
Map<String,IdGenerator> localGenerators)
Try to find the generator from the localGenerators and then from the global generator list |
Properties |
getGeneratorTableProperties(String name,
Map<String,Properties> localGeneratorTables)
Retrieve the properties related to a generator table. |
Map<String,Join> |
getJoins(String entityName)
Retrieve join metadata for a particular persistent entity. |
PropertyData |
getPropertyAnnotatedWithIdAndToOne(org.hibernate.annotations.common.reflection.XClass entityType,
String propertyName)
Return the property annotated with @ToOne and @Id if any. |
PropertyData |
getPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass entityType,
String propertyName)
Return the property annotated with @MapsId("propertyName") if any. |
String |
getPropertyReferencedAssociation(String entityName,
String propertyName)
|
org.hibernate.annotations.common.reflection.ReflectionManager |
getReflectionManager()
|
Map<Table,List<String[]>> |
getTableUniqueConstraints()
|
Map<Table,List<UniqueConstraintHolder>> |
getUniqueConstraintHoldersByTable()
|
boolean |
isInSecondPass()
|
boolean |
useNewGeneratorMappings()
Should we use the new generator strategy mappings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationConfiguration.ExtendedMappingsImpl()
Method Detail |
---|
public void addDefaultGenerator(IdGenerator generator)
ExtendedMappings
addDefaultGenerator
in interface ExtendedMappings
generator
- The id generatorpublic boolean isInSecondPass()
isInSecondPass
in interface ExtendedMappings
public PropertyData getPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass entityType, String propertyName)
ExtendedMappings
getPropertyAnnotatedWithMapsId
in interface ExtendedMappings
public void addPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass entityType, PropertyData property)
addPropertyAnnotatedWithMapsId
in interface ExtendedMappings
public PropertyData getPropertyAnnotatedWithIdAndToOne(org.hibernate.annotations.common.reflection.XClass entityType, String propertyName)
ExtendedMappings
getPropertyAnnotatedWithIdAndToOne
in interface ExtendedMappings
public void addToOneAndIdProperty(org.hibernate.annotations.common.reflection.XClass entityType, PropertyData property)
addToOneAndIdProperty
in interface ExtendedMappings
public boolean useNewGeneratorMappings()
ExtendedMappings
AnnotationConfiguration.USE_NEW_ID_GENERATOR_MAPPINGS
setting.
useNewGeneratorMappings
in interface ExtendedMappings
public IdGenerator getGenerator(String name)
ExtendedMappings
getGenerator
in interface ExtendedMappings
name
- The generator name.
public IdGenerator getGenerator(String name, Map<String,IdGenerator> localGenerators)
ExtendedMappings
getGenerator
in interface ExtendedMappings
name
- generator namelocalGenerators
- local generators
public void addGenerator(IdGenerator generator)
ExtendedMappings
addGenerator
in interface ExtendedMappings
generator
- The generator to add.public void addGeneratorTable(String name, Properties params)
ExtendedMappings
addGeneratorTable
in interface ExtendedMappings
name
- The generator nameparams
- The generator table properties.public Properties getGeneratorTableProperties(String name, Map<String,Properties> localGeneratorTables)
ExtendedMappings
getGeneratorTableProperties
in interface ExtendedMappings
name
- generator namelocalGeneratorTables
- local generator tables
public Map<String,Join> getJoins(String entityName)
ExtendedMappings
getJoins
in interface ExtendedMappings
entityName
- The entity name
public void addJoins(PersistentClass persistentClass, Map<String,Join> joins)
ExtendedMappings
addJoins
in interface ExtendedMappings
persistentClass
- The persistent entity metadata.joins
- The join metadata to add.public AnnotatedClassType getClassType(org.hibernate.annotations.common.reflection.XClass clazz)
ExtendedMappings
getClassType
in interface ExtendedMappings
clazz
- The XClass mapping
public AnnotatedClassType addClassType(org.hibernate.annotations.common.reflection.XClass clazz)
ExtendedMappings
addClassType
in interface ExtendedMappings
clazz
- The XClass mapping.
public Map<Table,List<String[]>> getTableUniqueConstraints()
getTableUniqueConstraints
in interface ExtendedMappings
public Map<Table,List<UniqueConstraintHolder>> getUniqueConstraintHoldersByTable()
getUniqueConstraintHoldersByTable
in interface ExtendedMappings
public void addUniqueConstraints(Table table, List uniqueConstraints)
addUniqueConstraints
in interface ExtendedMappings
public void addUniqueConstraintHolders(Table table, List<UniqueConstraintHolder> uniqueConstraintHolders)
addUniqueConstraintHolders
in interface ExtendedMappings
public void addMappedBy(String entityName, String propertyName, String inversePropertyName)
addMappedBy
in interface ExtendedMappings
public String getFromMappedBy(String entityName, String propertyName)
getFromMappedBy
in interface ExtendedMappings
public void addPropertyReferencedAssociation(String entityName, String propertyName, String propertyRef)
addPropertyReferencedAssociation
in interface ExtendedMappings
public String getPropertyReferencedAssociation(String entityName, String propertyName)
getPropertyReferencedAssociation
in interface ExtendedMappings
public void addUniquePropertyReference(String referencedClass, String propertyName)
Mappings
addUniquePropertyReference
in interface Mappings
addUniquePropertyReference
in class Configuration.MappingsImpl
referencedClass
- The referenced entity name.propertyName
- The referenced property name.public void addPropertyReference(String referencedClass, String propertyName)
Mappings
addPropertyReference
in interface Mappings
addPropertyReference
in class Configuration.MappingsImpl
referencedClass
- The referenced entity name.propertyName
- The referenced property name.public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
getReflectionManager
in interface ExtendedMappings
public void addDefaultQuery(String name, NamedQueryDefinition query)
addDefaultQuery
in interface ExtendedMappings
public void addDefaultSQLQuery(String name, NamedSQLQueryDefinition query)
addDefaultSQLQuery
in interface ExtendedMappings
public void addDefaultResultSetMapping(ResultSetMappingDefinition definition)
addDefaultResultSetMapping
in interface ExtendedMappings
public void addQuery(String name, NamedQueryDefinition query) throws DuplicateMappingException
Mappings
addQuery
in interface Mappings
addQuery
in class Configuration.MappingsImpl
name
- The namequery
- The metadata
DuplicateMappingException
- If a query already exists with that name.public void addResultSetMapping(ResultSetMappingDefinition definition) throws DuplicateMappingException
Mappings
addResultSetMapping
in interface Mappings
addResultSetMapping
in class Configuration.MappingsImpl
definition
- The metadata
DuplicateMappingException
- If metadata for another SQL result mapping was
already found under the given name.public void addSQLQuery(String name, NamedSQLQueryDefinition query) throws DuplicateMappingException
Mappings
addSQLQuery
in interface Mappings
addSQLQuery
in class Configuration.MappingsImpl
name
- The namequery
- The metadata
DuplicateMappingException
- If a query already exists with that name.public Map getClasses()
getClasses
in interface ExtendedMappings
public void addAnyMetaDef(AnyMetaDef defAnn) throws AnnotationException
addAnyMetaDef
in interface ExtendedMappings
AnnotationException
public AnyMetaDef getAnyMetaDef(String name)
getAnyMetaDef
in interface ExtendedMappings
public void addAnnotationConfiguredFetchProfile(FetchProfile fetchProfile)
ExtendedMappings
addAnnotationConfiguredFetchProfile
in interface ExtendedMappings
fetchProfile
- the fetch profilepublic boolean containsAnnotationConfiguredFetchProfile(FetchProfile fetchProfile)
containsAnnotationConfiguredFetchProfile
in interface ExtendedMappings
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |