public abstract class AbstractDelegatingMetadata extends Object implements MetadataImplementor
Convenience base class for custom implementors of MetadataImplementor
using delegation.
Constructor and Description |
---|
AbstractDelegatingMetadata(MetadataImplementor delegate) |
public AbstractDelegatingMetadata(MetadataImplementor delegate)
protected MetadataImplementor delegate()
public IdentifierGeneratorFactory getIdentifierGeneratorFactory()
Mapping
Allow access to the id generator factory, though this is only needed/allowed from configuration.
getIdentifierGeneratorFactory
in interface Mapping
public Type getIdentifierType(String className) throws MappingException
getIdentifierType
in interface Mapping
MappingException
public String getIdentifierPropertyName(String className) throws MappingException
getIdentifierPropertyName
in interface Mapping
MappingException
public Type getReferencedPropertyType(String className, String propertyName) throws MappingException
getReferencedPropertyType
in interface Mapping
MappingException
public SessionFactoryBuilder getSessionFactoryBuilder()
Metadata
Get the builder for SessionFactory
instances based on this metamodel,
getSessionFactoryBuilder
in interface Metadata
SessionFactory
instances.public SessionFactory buildSessionFactory()
Metadata
Short-hand form of building a SessionFactory
through the builder without any additional
option overrides.
buildSessionFactory
in interface Metadata
public UUID getUUID()
Metadata
Gets the UUID
for this metamodel.
public Database getDatabase()
Metadata
Retrieve the database model.
getDatabase
in interface Metadata
public Collection<PersistentClass> getEntityBindings()
Metadata
Retrieves the PersistentClass entity metadata representation for known all entities.
Returned collection is immutable
getEntityBindings
in interface Metadata
public PersistentClass getEntityBinding(String entityName)
Metadata
Retrieves the PersistentClass entity mapping metadata representation for the given entity name.
getEntityBinding
in interface Metadata
entityName
- The entity name for which to retrieve the metadata.null
if no matching entity found.public Collection<Collection> getCollectionBindings()
Metadata
Retrieves the Collection metadata representation for known all collections.
Returned collection is immutable
getCollectionBindings
in interface Metadata
public Collection getCollectionBinding(String role)
Metadata
Retrieves the collection mapping metadata for the given collection role.
getCollectionBinding
in interface Metadata
role
- The collection role for which to retrieve the metadata.null
if no matching collection found.public Map<String,String> getImports()
Metadata
Retrieves all defined imports (class renames).
getImports
in interface Metadata
public NamedQueryDefinition getNamedQueryDefinition(String name)
Metadata
Retrieve named query metadata by name.
getNamedQueryDefinition
in interface Metadata
name
- The query namenull
.public Collection<NamedQueryDefinition> getNamedQueryDefinitions()
getNamedQueryDefinitions
in interface Metadata
public NamedSQLQueryDefinition getNamedNativeQueryDefinition(String name)
Metadata
Retrieve named SQL query metadata.
getNamedNativeQueryDefinition
in interface Metadata
name
- The SQL query name.null
public Collection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()
getNamedNativeQueryDefinitions
in interface Metadata
public Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()
getNamedProcedureCallDefinitions
in interface Metadata
public ResultSetMappingDefinition getResultSetMapping(String name)
Metadata
Retrieve the metadata for a named SQL result set mapping.
getResultSetMapping
in interface Metadata
name
- The mapping name.null
if none found.public Map<String,ResultSetMappingDefinition> getResultSetMappingDefinitions()
getResultSetMappingDefinitions
in interface Metadata
public TypeDefinition getTypeDefinition(String typeName)
Metadata
Retrieve a type definition by name.
getTypeDefinition
in interface Metadata
typeName
- The name of the type definition to retrieve.null
public Map<String,FilterDefinition> getFilterDefinitions()
Metadata
Retrieves the complete map of filter definitions.
Returned map is immutable
getFilterDefinitions
in interface Metadata
public FilterDefinition getFilterDefinition(String name)
Metadata
Retrieves a filter definition by name.
getFilterDefinition
in interface Metadata
name
- The name of the filter definition to retrieve
.null
.public FetchProfile getFetchProfile(String name)
getFetchProfile
in interface Metadata
public Collection<FetchProfile> getFetchProfiles()
getFetchProfiles
in interface Metadata
public NamedEntityGraphDefinition getNamedEntityGraph(String name)
getNamedEntityGraph
in interface Metadata
public Map<String,NamedEntityGraphDefinition> getNamedEntityGraphs()
getNamedEntityGraphs
in interface Metadata
public IdentifierGeneratorDefinition getIdentifierGenerator(String name)
getIdentifierGenerator
in interface Metadata
public Collection<Table> collectTableMappings()
collectTableMappings
in interface Metadata
public Map<String,SQLFunction> getSqlFunctionMap()
getSqlFunctionMap
in interface Metadata
public MetadataBuildingOptions getMetadataBuildingOptions()
MetadataImplementor
Access to the options used to build this Metadata
getMetadataBuildingOptions
in interface MetadataImplementor
public TypeResolver getTypeResolver()
getTypeResolver
in interface MetadataImplementor
public NamedQueryRepository buildNamedQueryRepository(org.hibernate.internal.SessionFactoryImpl sessionFactory)
buildNamedQueryRepository
in interface MetadataImplementor
public void validate() throws MappingException
validate
in interface MetadataImplementor
MappingException
public Set<MappedSuperclass> getMappedSuperclassMappingsCopy()
getMappedSuperclassMappingsCopy
in interface MetadataImplementor
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.