public class MetadataImpl extends java.lang.Object implements MetadataImplementor, java.io.Serializable
| Constructor and Description |
|---|
MetadataImpl(java.util.UUID uuid,
MetadataBuildingOptions metadataBuildingOptions,
TypeResolver typeResolver,
MutableIdentifierGeneratorFactory identifierGeneratorFactory,
java.util.Map<java.lang.String,PersistentClass> entityBindingMap,
java.util.Map<java.lang.Class,MappedSuperclass> mappedSuperclassMap,
java.util.Map<java.lang.String,Collection> collectionBindingMap,
java.util.Map<java.lang.String,TypeDefinition> typeDefinitionMap,
java.util.Map<java.lang.String,FilterDefinition> filterDefinitionMap,
java.util.Map<java.lang.String,FetchProfile> fetchProfileMap,
java.util.Map<java.lang.String,java.lang.String> imports,
java.util.Map<java.lang.String,IdentifierGeneratorDefinition> idGeneratorDefinitionMap,
java.util.Map<java.lang.String,NamedQueryDefinition> namedQueryMap,
java.util.Map<java.lang.String,NamedSQLQueryDefinition> namedNativeQueryMap,
java.util.Map<java.lang.String,NamedProcedureCallDefinition> namedProcedureCallMap,
java.util.Map<java.lang.String,ResultSetMappingDefinition> sqlResultSetMappingMap,
java.util.Map<java.lang.String,NamedEntityGraphDefinition> namedEntityGraphMap,
java.util.Map<java.lang.String,SQLFunction> sqlFunctionMap,
Database database) |
| Modifier and Type | Method and Description |
|---|---|
NamedQueryRepository |
buildNamedQueryRepository(SessionFactoryImpl sessionFactory) |
java.util.Map<java.lang.String,ProcedureCallMemento> |
buildProcedureCallMementos(SessionFactoryImpl sessionFactory) |
SessionFactory |
buildSessionFactory()
Short-hand form of building a
SessionFactory through the builder without any additional
option overrides. |
java.util.Collection<Table> |
collectTableMappings() |
Collection |
getCollectionBinding(java.lang.String role)
Retrieves the collection mapping metadata for the given collection role.
|
java.util.Collection<Collection> |
getCollectionBindings()
Retrieves the Collection metadata representation for known all collections.
|
Database |
getDatabase()
Retrieve the database model.
|
PersistentClass |
getEntityBinding(java.lang.String entityName)
Retrieves the PersistentClass entity mapping metadata representation for
the given entity name.
|
java.util.Collection<PersistentClass> |
getEntityBindings()
Retrieves the PersistentClass entity metadata representation for known all entities.
|
FetchProfile |
getFetchProfile(java.lang.String name) |
java.util.Collection<FetchProfile> |
getFetchProfiles() |
FilterDefinition |
getFilterDefinition(java.lang.String name)
Retrieves a filter definition by name.
|
java.util.Map<java.lang.String,FilterDefinition> |
getFilterDefinitions()
Retrieves the complete map of filter definitions.
|
IdentifierGeneratorDefinition |
getIdentifierGenerator(java.lang.String name) |
IdentifierGeneratorFactory |
getIdentifierGeneratorFactory()
Allow access to the id generator factory, though this is only needed/allowed from configuration.
|
java.lang.String |
getIdentifierPropertyName(java.lang.String entityName) |
Type |
getIdentifierType(java.lang.String entityName) |
java.util.Map<java.lang.String,java.lang.String> |
getImports()
Retrieves all defined imports (class renames).
|
java.util.Set<MappedSuperclass> |
getMappedSuperclassMappingsCopy() |
MetadataBuildingOptions |
getMetadataBuildingOptions()
Access to the options used to build this Metadata
|
NamedEntityGraphDefinition |
getNamedEntityGraph(java.lang.String name) |
java.util.Map<java.lang.String,NamedEntityGraphDefinition> |
getNamedEntityGraphs() |
NamedSQLQueryDefinition |
getNamedNativeQueryDefinition(java.lang.String name)
Retrieve named SQL query metadata.
|
java.util.Collection<NamedSQLQueryDefinition> |
getNamedNativeQueryDefinitions() |
java.util.Collection<NamedProcedureCallDefinition> |
getNamedProcedureCallDefinitions() |
NamedQueryDefinition |
getNamedQueryDefinition(java.lang.String name)
Retrieve named query metadata by name.
|
java.util.Collection<NamedQueryDefinition> |
getNamedQueryDefinitions() |
Type |
getReferencedPropertyType(java.lang.String entityName,
java.lang.String propertyName) |
ResultSetMappingDefinition |
getResultSetMapping(java.lang.String name)
Retrieve the metadata for a named SQL result set mapping.
|
java.util.Map<java.lang.String,ResultSetMappingDefinition> |
getResultSetMappingDefinitions() |
SessionFactoryBuilder |
getSessionFactoryBuilder()
Get the builder for
SessionFactory instances based on this metamodel, |
java.util.Map<java.lang.String,SQLFunction> |
getSqlFunctionMap() |
TypeDefinition |
getTypeDefinition(java.lang.String typeName)
Retrieve a type definition by name.
|
TypeResolver |
getTypeResolver() |
java.util.UUID |
getUUID()
Gets the
UUID for this metamodel. |
void |
validate() |
public MetadataImpl(java.util.UUID uuid,
MetadataBuildingOptions metadataBuildingOptions,
TypeResolver typeResolver,
MutableIdentifierGeneratorFactory identifierGeneratorFactory,
java.util.Map<java.lang.String,PersistentClass> entityBindingMap,
java.util.Map<java.lang.Class,MappedSuperclass> mappedSuperclassMap,
java.util.Map<java.lang.String,Collection> collectionBindingMap,
java.util.Map<java.lang.String,TypeDefinition> typeDefinitionMap,
java.util.Map<java.lang.String,FilterDefinition> filterDefinitionMap,
java.util.Map<java.lang.String,FetchProfile> fetchProfileMap,
java.util.Map<java.lang.String,java.lang.String> imports,
java.util.Map<java.lang.String,IdentifierGeneratorDefinition> idGeneratorDefinitionMap,
java.util.Map<java.lang.String,NamedQueryDefinition> namedQueryMap,
java.util.Map<java.lang.String,NamedSQLQueryDefinition> namedNativeQueryMap,
java.util.Map<java.lang.String,NamedProcedureCallDefinition> namedProcedureCallMap,
java.util.Map<java.lang.String,ResultSetMappingDefinition> sqlResultSetMappingMap,
java.util.Map<java.lang.String,NamedEntityGraphDefinition> namedEntityGraphMap,
java.util.Map<java.lang.String,SQLFunction> sqlFunctionMap,
Database database)
public MetadataBuildingOptions getMetadataBuildingOptions()
MetadataImplementorgetMetadataBuildingOptions in interface MetadataImplementorpublic TypeResolver getTypeResolver()
getTypeResolver in interface MetadataImplementorpublic SessionFactoryBuilder getSessionFactoryBuilder()
MetadataSessionFactory instances based on this metamodel,getSessionFactoryBuilder in interface MetadataSessionFactory instances.public SessionFactory buildSessionFactory()
MetadataSessionFactory through the builder without any additional
option overrides.buildSessionFactory in interface Metadatapublic java.util.UUID getUUID()
MetadataUUID for this metamodel.public Database getDatabase()
MetadatagetDatabase in interface Metadatapublic IdentifierGeneratorFactory getIdentifierGeneratorFactory()
MappinggetIdentifierGeneratorFactory in interface Mappingpublic java.util.Collection<PersistentClass> getEntityBindings()
MetadatagetEntityBindings in interface Metadatapublic PersistentClass getEntityBinding(java.lang.String entityName)
MetadatagetEntityBinding in interface MetadataentityName - The entity name for which to retrieve the metadata.null if no matching entity found.public java.util.Collection<Collection> getCollectionBindings()
MetadatagetCollectionBindings in interface Metadatapublic Collection getCollectionBinding(java.lang.String role)
MetadatagetCollectionBinding in interface Metadatarole - The collection role for which to retrieve the metadata.null if no matching collection found.public java.util.Map<java.lang.String,java.lang.String> getImports()
MetadatagetImports in interface Metadatapublic NamedQueryDefinition getNamedQueryDefinition(java.lang.String name)
MetadatagetNamedQueryDefinition in interface Metadataname - The query namenull.public java.util.Collection<NamedQueryDefinition> getNamedQueryDefinitions()
getNamedQueryDefinitions in interface Metadatapublic NamedSQLQueryDefinition getNamedNativeQueryDefinition(java.lang.String name)
MetadatagetNamedNativeQueryDefinition in interface Metadataname - The SQL query name.nullpublic java.util.Collection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()
getNamedNativeQueryDefinitions in interface Metadatapublic java.util.Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()
getNamedProcedureCallDefinitions in interface Metadatapublic ResultSetMappingDefinition getResultSetMapping(java.lang.String name)
MetadatagetResultSetMapping in interface Metadataname - The mapping name.null if none found.public java.util.Map<java.lang.String,ResultSetMappingDefinition> getResultSetMappingDefinitions()
getResultSetMappingDefinitions in interface Metadatapublic TypeDefinition getTypeDefinition(java.lang.String typeName)
MetadatagetTypeDefinition in interface MetadatatypeName - The name of the type definition to retrieve.nullpublic java.util.Map<java.lang.String,FilterDefinition> getFilterDefinitions()
MetadatagetFilterDefinitions in interface Metadatapublic FilterDefinition getFilterDefinition(java.lang.String name)
MetadatagetFilterDefinition in interface Metadataname - The name of the filter definition to retrieve
.null.public FetchProfile getFetchProfile(java.lang.String name)
getFetchProfile in interface Metadatapublic java.util.Collection<FetchProfile> getFetchProfiles()
getFetchProfiles in interface Metadatapublic NamedEntityGraphDefinition getNamedEntityGraph(java.lang.String name)
getNamedEntityGraph in interface Metadatapublic java.util.Map<java.lang.String,NamedEntityGraphDefinition> getNamedEntityGraphs()
getNamedEntityGraphs in interface Metadatapublic IdentifierGeneratorDefinition getIdentifierGenerator(java.lang.String name)
getIdentifierGenerator in interface Metadatapublic java.util.Map<java.lang.String,SQLFunction> getSqlFunctionMap()
getSqlFunctionMap in interface Metadatapublic java.util.Collection<Table> collectTableMappings()
collectTableMappings in interface Metadatapublic NamedQueryRepository buildNamedQueryRepository(SessionFactoryImpl sessionFactory)
buildNamedQueryRepository in interface MetadataImplementorpublic java.util.Map<java.lang.String,ProcedureCallMemento> buildProcedureCallMementos(SessionFactoryImpl sessionFactory)
public void validate()
throws MappingException
validate in interface MetadataImplementorMappingExceptionpublic java.util.Set<MappedSuperclass> getMappedSuperclassMappingsCopy()
getMappedSuperclassMappingsCopy in interface MetadataImplementorpublic Type getIdentifierType(java.lang.String entityName) throws MappingException
getIdentifierType in interface MappingMappingExceptionpublic java.lang.String getIdentifierPropertyName(java.lang.String entityName)
throws MappingException
getIdentifierPropertyName in interface MappingMappingExceptionpublic Type getReferencedPropertyType(java.lang.String entityName, java.lang.String propertyName) throws MappingException
getReferencedPropertyType in interface MappingMappingExceptionCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.