public abstract class AbstractDelegatingMetadata extends java.lang.Object implements MetadataImplementor
MetadataImplementor
using delegation.Constructor and Description |
---|
AbstractDelegatingMetadata(MetadataImplementor delegate) |
Modifier and Type | Method and Description |
---|---|
NamedQueryRepository |
buildNamedQueryRepository(SessionFactoryImpl sessionFactory) |
SessionFactory |
buildSessionFactory()
Short-hand form of building a
SessionFactory through the builder without any additional
option overrides. |
java.util.Collection<Table> |
collectTableMappings() |
protected MetadataImplementor |
delegate() |
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 className) |
Type |
getIdentifierType(java.lang.String className) |
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 className,
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 AbstractDelegatingMetadata(MetadataImplementor delegate)
protected MetadataImplementor delegate()
public IdentifierGeneratorFactory getIdentifierGeneratorFactory()
Mapping
getIdentifierGeneratorFactory
in interface Mapping
public Type getIdentifierType(java.lang.String className) throws MappingException
getIdentifierType
in interface Mapping
MappingException
public java.lang.String getIdentifierPropertyName(java.lang.String className) throws MappingException
getIdentifierPropertyName
in interface Mapping
MappingException
public Type getReferencedPropertyType(java.lang.String className, java.lang.String propertyName) throws MappingException
getReferencedPropertyType
in interface Mapping
MappingException
public SessionFactoryBuilder getSessionFactoryBuilder()
Metadata
SessionFactory
instances based on this metamodel,getSessionFactoryBuilder
in interface Metadata
SessionFactory
instances.public SessionFactory buildSessionFactory()
Metadata
SessionFactory
through the builder without any additional
option overrides.buildSessionFactory
in interface Metadata
public java.util.UUID getUUID()
Metadata
UUID
for this metamodel.public Database getDatabase()
Metadata
getDatabase
in interface Metadata
public java.util.Collection<PersistentClass> getEntityBindings()
Metadata
getEntityBindings
in interface Metadata
public PersistentClass getEntityBinding(java.lang.String entityName)
Metadata
getEntityBinding
in interface Metadata
entityName
- The entity name for which to retrieve the metadata.null
if no matching entity found.public java.util.Collection<Collection> getCollectionBindings()
Metadata
getCollectionBindings
in interface Metadata
public Collection getCollectionBinding(java.lang.String role)
Metadata
getCollectionBinding
in interface Metadata
role
- 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()
Metadata
getImports
in interface Metadata
public NamedQueryDefinition getNamedQueryDefinition(java.lang.String name)
Metadata
getNamedQueryDefinition
in interface Metadata
name
- The query namenull
.public java.util.Collection<NamedQueryDefinition> getNamedQueryDefinitions()
getNamedQueryDefinitions
in interface Metadata
public NamedSQLQueryDefinition getNamedNativeQueryDefinition(java.lang.String name)
Metadata
getNamedNativeQueryDefinition
in interface Metadata
name
- The SQL query name.null
public java.util.Collection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()
getNamedNativeQueryDefinitions
in interface Metadata
public java.util.Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()
getNamedProcedureCallDefinitions
in interface Metadata
public ResultSetMappingDefinition getResultSetMapping(java.lang.String name)
Metadata
getResultSetMapping
in interface Metadata
name
- The mapping name.null
if none found.public java.util.Map<java.lang.String,ResultSetMappingDefinition> getResultSetMappingDefinitions()
getResultSetMappingDefinitions
in interface Metadata
public TypeDefinition getTypeDefinition(java.lang.String typeName)
Metadata
getTypeDefinition
in interface Metadata
typeName
- The name of the type definition to retrieve.null
public java.util.Map<java.lang.String,FilterDefinition> getFilterDefinitions()
Metadata
getFilterDefinitions
in interface Metadata
public FilterDefinition getFilterDefinition(java.lang.String name)
Metadata
getFilterDefinition
in interface Metadata
name
- The name of the filter definition to retrieve
.null
.public FetchProfile getFetchProfile(java.lang.String name)
getFetchProfile
in interface Metadata
public java.util.Collection<FetchProfile> getFetchProfiles()
getFetchProfiles
in interface Metadata
public NamedEntityGraphDefinition getNamedEntityGraph(java.lang.String name)
getNamedEntityGraph
in interface Metadata
public java.util.Map<java.lang.String,NamedEntityGraphDefinition> getNamedEntityGraphs()
getNamedEntityGraphs
in interface Metadata
public IdentifierGeneratorDefinition getIdentifierGenerator(java.lang.String name)
getIdentifierGenerator
in interface Metadata
public java.util.Collection<Table> collectTableMappings()
collectTableMappings
in interface Metadata
public java.util.Map<java.lang.String,SQLFunction> getSqlFunctionMap()
getSqlFunctionMap
in interface Metadata
public MetadataBuildingOptions getMetadataBuildingOptions()
MetadataImplementor
getMetadataBuildingOptions
in interface MetadataImplementor
public TypeResolver getTypeResolver()
getTypeResolver
in interface MetadataImplementor
public NamedQueryRepository buildNamedQueryRepository(SessionFactoryImpl sessionFactory)
buildNamedQueryRepository
in interface MetadataImplementor
public void validate() throws MappingException
validate
in interface MetadataImplementor
MappingException
public java.util.Set<MappedSuperclass> getMappedSuperclassMappingsCopy()
getMappedSuperclassMappingsCopy
in interface MetadataImplementor
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.