Top Description Fields Constructors Methods
org.hibernate.boot.spi

public abstract Class AbstractDelegatingMetadata

extends Object
implements MetadataImplementor
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.spi.MetadataImplementor, org.hibernate.engine.spi.Mapping, org.hibernate.boot.Metadata
Imports
java.util.Collection, .Map, .Set, .UUID, org.hibernate.MappingException, .SessionFactory, org.hibernate.boot.SessionFactoryBuilder, org.hibernate.boot.model.IdentifierGeneratorDefinition, .TypeDefinition, org.hibernate.boot.model.relational.Database, org.hibernate.cfg.annotations.NamedEntityGraphDefinition, .NamedProcedureCallDefinition, org.hibernate.dialect.function.SQLFunction, org.hibernate.engine.ResultSetMappingDefinition, org.hibernate.engine.spi.FilterDefinition, .NamedQueryDefinition, .NamedSQLQueryDefinition, .SessionFactoryImplementor, org.hibernate.id.factory.IdentifierGeneratorFactory, org.hibernate.internal.SessionFactoryImpl, org.hibernate.mapping.FetchProfile, .MappedSuperclass, .PersistentClass, .Table, org.hibernate.query.spi.NamedQueryRepository, org.hibernate.type.Type, .TypeResolver, org.hibernate.type.spi.TypeConfiguration

Convenience base class for custom implementors of MetadataImplementor using delegation.
Author
Gunnar Morling

Field Summary

Modifier and TypeField and Description
private final MetadataImplementor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public NamedQueryRepository
public SessionFactory
buildSessionFactory()

Implements org.hibernate.boot.Metadata.buildSessionFactory.

Deprecated as a consequence of SessionFactory being deprecated.
Short-hand form of building a org.hibernate.SessionFactory through the builder without any additional option overrides.
public Collection<Table>
protected MetadataImplementor
public Collection
getCollectionBinding(String
The collection role for which to retrieve the metadata.
role
)

Implements org.hibernate.boot.Metadata.getCollectionBinding.

Retrieves the collection mapping metadata for the given collection role.
public Collection<Collection>
getCollectionBindings()

Implements org.hibernate.boot.Metadata.getCollectionBindings.

Retrieves the Collection metadata representation for all known collections.
public Database
getDatabase()

Implements org.hibernate.boot.Metadata.getDatabase.

Retrieve the database model.
public PersistentClass
getEntityBinding(String
The entity name for which to retrieve the metadata.
entityName
)

Implements org.hibernate.boot.Metadata.getEntityBinding.

Retrieves the PersistentClass entity mapping metadata representation for the given entity name.
public Collection<PersistentClass>
getEntityBindings()

Implements org.hibernate.boot.Metadata.getEntityBindings.

Retrieves the PersistentClass entity metadata representation for all known entities.
public FetchProfile
public Collection<FetchProfile>
public FilterDefinition
getFilterDefinition(String
The name of the filter definition to retrieve .
name
)

Implements org.hibernate.boot.Metadata.getFilterDefinition.

Retrieves a filter definition by name.
public Map<String, FilterDefinition>
getFilterDefinitions()

Implements org.hibernate.boot.Metadata.getFilterDefinitions.

Retrieves the complete map of filter definitions.
public IdentifierGeneratorDefinition
public IdentifierGeneratorFactory
getIdentifierGeneratorFactory()

Implements org.hibernate.engine.spi.Mapping.getIdentifierGeneratorFactory.

Allow access to the id generator factory, though this is only needed/allowed from configuration.
public String
public Type
public Map<String, String>
getImports()

Implements org.hibernate.boot.Metadata.getImports.

Retrieves all defined imports (class renames).
public Set<MappedSuperclass>
public MetadataBuildingOptions
getMetadataBuildingOptions()

Implements org.hibernate.boot.spi.MetadataImplementor.getMetadataBuildingOptions.

Access to the options used to build this Metadata
public NamedEntityGraphDefinition
public Map<String, NamedEntityGraphDefinition>
public NamedSQLQueryDefinition
getNamedNativeQueryDefinition(String
The SQL query name.
name
)

Implements org.hibernate.boot.Metadata.getNamedNativeQueryDefinition.

Retrieve named SQL query metadata.
public Collection<NamedSQLQueryDefinition>
public Collection<NamedProcedureCallDefinition>
public NamedQueryDefinition
getNamedQueryDefinition(String
The query name
name
)

Implements org.hibernate.boot.Metadata.getNamedQueryDefinition.

Retrieve named query metadata by name.
public Collection<NamedQueryDefinition>
public Type
public ResultSetMappingDefinition
getResultSetMapping(String
The mapping name.
name
)

Implements org.hibernate.boot.Metadata.getResultSetMapping.

Retrieve the metadata for a named SQL result set mapping.
public Map<String, ResultSetMappingDefinition>
public SessionFactoryBuilder
getSessionFactoryBuilder()

Implements org.hibernate.boot.Metadata.getSessionFactoryBuilder.

Get the builder for org.hibernate.SessionFactory instances based on this metamodel.
public Map<String, SQLFunction>
public TypeConfiguration
public TypeDefinition
getTypeDefinition(String
The name of the type definition to retrieve.
typeName
)

Implements org.hibernate.boot.Metadata.getTypeDefinition.

Retrieve a type definition by name.
public TypeResolver

Returns:

The type resolver
getTypeResolver
()

Implements org.hibernate.boot.spi.MetadataImplementor.getTypeResolver.

Deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
Retrieve the Type resolver associated with this factory.
public UUID
getUUID()

Implements org.hibernate.boot.Metadata.getUUID.

Gets the java.util.UUID for this metamodel.
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final MetadataImplementor delegate

Constructor Detail

AbstractDelegatingMetadataback to summary
public AbstractDelegatingMetadata(MetadataImplementor delegate)

Method Detail

buildNamedQueryRepositoryback to summary
public NamedQueryRepository buildNamedQueryRepository(SessionFactoryImpl sessionFactory)

Implements org.hibernate.boot.spi.MetadataImplementor.buildNamedQueryRepository.

Deprecated

as a consequence of SessionFactoryImpl being deprecated. See corresponding docs for further information.

Annotations
@Override
buildSessionFactoryback to summary
public SessionFactory buildSessionFactory()

Implements org.hibernate.boot.Metadata.buildSessionFactory.

Doc from org.hibernate.boot.Metadata.buildSessionFactory.

Deprecated

as a consequence of SessionFactory being deprecated. See corresponding docs for further information.

Short-hand form of building a org.hibernate.SessionFactory through the builder without any additional option overrides.

Returns:SessionFactory

THe built SessionFactory.

Annotations
@Override
collectTableMappingsback to summary
public Collection<Table> collectTableMappings()

Implements org.hibernate.boot.Metadata.collectTableMappings.

Annotations
@Override
delegateback to summary
protected MetadataImplementor delegate()
getCollectionBindingback to summary
public Collection getCollectionBinding(String role)

Implements org.hibernate.boot.Metadata.getCollectionBinding.

Doc from org.hibernate.boot.Metadata.getCollectionBinding.

Retrieves the collection mapping metadata for the given collection role.

Parameters
role:String

The collection role for which to retrieve the metadata.

Returns:Collection

The collection mapping metadata, or null if no matching collection found.

Annotations
@Override
getCollectionBindingsback to summary
public Collection<Collection> getCollectionBindings()

Implements org.hibernate.boot.Metadata.getCollectionBindings.

Doc from org.hibernate.boot.Metadata.getCollectionBindings.

Retrieves the Collection metadata representation for all known collections. Returned collection is immutable

Returns:Collection<Collection>

All Collection representations.

Annotations
@Override
getDatabaseback to summary
public Database getDatabase()

Implements org.hibernate.boot.Metadata.getDatabase.

Doc from org.hibernate.boot.Metadata.getDatabase.

Retrieve the database model.

Returns:Database

The database model.

Annotations
@Override
getEntityBindingback to summary
public PersistentClass getEntityBinding(String entityName)

Implements org.hibernate.boot.Metadata.getEntityBinding.

Doc from org.hibernate.boot.Metadata.getEntityBinding.

Retrieves the PersistentClass entity mapping metadata representation for the given entity name.

Parameters
entityName:String

The entity name for which to retrieve the metadata.

Returns:PersistentClass

The entity mapping metadata, or null if no matching entity found.

Annotations
@Override
getEntityBindingsback to summary
public Collection<PersistentClass> getEntityBindings()

Implements org.hibernate.boot.Metadata.getEntityBindings.

Doc from org.hibernate.boot.Metadata.getEntityBindings.

Retrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable

Returns:Collection<PersistentClass>

All PersistentClass representations.

Annotations
@Override
getFetchProfileback to summary
public FetchProfile getFetchProfile(String name)

Implements org.hibernate.boot.Metadata.getFetchProfile.

Annotations
@Override
getFetchProfilesback to summary
public Collection<FetchProfile> getFetchProfiles()

Implements org.hibernate.boot.Metadata.getFetchProfiles.

Annotations
@Override
getFilterDefinitionback to summary
public FilterDefinition getFilterDefinition(String name)

Implements org.hibernate.boot.Metadata.getFilterDefinition.

Doc from org.hibernate.boot.Metadata.getFilterDefinition.

Retrieves a filter definition by name.

Parameters
name:String

The name of the filter definition to retrieve .

Returns:FilterDefinition

The filter definition, or null.

Annotations
@Override
getFilterDefinitionsback to summary
public Map<String, FilterDefinition> getFilterDefinitions()

Implements org.hibernate.boot.Metadata.getFilterDefinitions.

Doc from org.hibernate.boot.Metadata.getFilterDefinitions.

Retrieves the complete map of filter definitions. Returned map is immutable

Returns:Map<String, FilterDefinition>

The filter definition map.

Annotations
@Override
getIdentifierGeneratorback to summary
public IdentifierGeneratorDefinition getIdentifierGenerator(String name)

Implements org.hibernate.boot.Metadata.getIdentifierGenerator.

Annotations
@Override
getIdentifierGeneratorFactoryback to summary
public IdentifierGeneratorFactory getIdentifierGeneratorFactory()

Implements org.hibernate.engine.spi.Mapping.getIdentifierGeneratorFactory.

Doc from org.hibernate.engine.spi.Mapping.getIdentifierGeneratorFactory.

Allow access to the id generator factory, though this is only needed/allowed from configuration.

Returns:IdentifierGeneratorFactory

Access to the identifier generator factory

Annotations
@Override
getIdentifierPropertyNameback to summary
public String getIdentifierPropertyName(String className) throws MappingException

Implements org.hibernate.engine.spi.Mapping.getIdentifierPropertyName.

Annotations
@Override
getIdentifierTypeback to summary
public Type getIdentifierType(String className) throws MappingException

Implements org.hibernate.engine.spi.Mapping.getIdentifierType.

Annotations
@Override
getImportsback to summary
public Map<String, String> getImports()

Implements org.hibernate.boot.Metadata.getImports.

Doc from org.hibernate.boot.Metadata.getImports.

Retrieves all defined imports (class renames).

Returns:Map<String, String>

All imports

Annotations
@Override
getMappedSuperclassMappingsCopyback to summary
public Set<MappedSuperclass> getMappedSuperclassMappingsCopy()

Implements org.hibernate.boot.spi.MetadataImplementor.getMappedSuperclassMappingsCopy.

Annotations
@Override
getMetadataBuildingOptionsback to summary
public MetadataBuildingOptions getMetadataBuildingOptions()

Implements org.hibernate.boot.spi.MetadataImplementor.getMetadataBuildingOptions.

Doc from org.hibernate.boot.spi.MetadataImplementor.getMetadataBuildingOptions.

Access to the options used to build this Metadata

Returns:MetadataBuildingOptions

Access to the MetadataBuildingOptions

Annotations
@Override
getNamedEntityGraphback to summary
public NamedEntityGraphDefinition getNamedEntityGraph(String name)

Implements org.hibernate.boot.Metadata.getNamedEntityGraph.

Annotations
@Override
getNamedEntityGraphsback to summary
public Map<String, NamedEntityGraphDefinition> getNamedEntityGraphs()

Implements org.hibernate.boot.Metadata.getNamedEntityGraphs.

Annotations
@Override
getNamedNativeQueryDefinitionback to summary
public NamedSQLQueryDefinition getNamedNativeQueryDefinition(String name)

Implements org.hibernate.boot.Metadata.getNamedNativeQueryDefinition.

Doc from org.hibernate.boot.Metadata.getNamedNativeQueryDefinition.

Retrieve named SQL query metadata.

Parameters
name:String

The SQL query name.

Returns:NamedSQLQueryDefinition

The named query metadata, or null

Annotations
@Override
getNamedNativeQueryDefinitionsback to summary
public Collection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()

Implements org.hibernate.boot.Metadata.getNamedNativeQueryDefinitions.

Annotations
@Override
getNamedProcedureCallDefinitionsback to summary
public Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()

Implements org.hibernate.boot.Metadata.getNamedProcedureCallDefinitions.

Annotations
@Override
getNamedQueryDefinitionback to summary
public NamedQueryDefinition getNamedQueryDefinition(String name)

Implements org.hibernate.boot.Metadata.getNamedQueryDefinition.

Doc from org.hibernate.boot.Metadata.getNamedQueryDefinition.

Retrieve named query metadata by name.

Parameters
name:String

The query name

Returns:NamedQueryDefinition

The named query metadata, or null.

Annotations
@Override
getNamedQueryDefinitionsback to summary
public Collection<NamedQueryDefinition> getNamedQueryDefinitions()

Implements org.hibernate.boot.Metadata.getNamedQueryDefinitions.

Annotations
@Override
getReferencedPropertyTypeback to summary
public Type getReferencedPropertyType(String className, String propertyName) throws MappingException

Implements org.hibernate.engine.spi.Mapping.getReferencedPropertyType.

Annotations
@Override
getResultSetMappingback to summary
public ResultSetMappingDefinition getResultSetMapping(String name)

Implements org.hibernate.boot.Metadata.getResultSetMapping.

Doc from org.hibernate.boot.Metadata.getResultSetMapping.

Retrieve the metadata for a named SQL result set mapping.

Parameters
name:String

The mapping name.

Returns:ResultSetMappingDefinition

The named result set mapping metadata, or null if none found.

Annotations
@Override
getResultSetMappingDefinitionsback to summary
public Map<String, ResultSetMappingDefinition> getResultSetMappingDefinitions()

Implements org.hibernate.boot.Metadata.getResultSetMappingDefinitions.

Annotations
@Override
getSessionFactoryBuilderback to summary
public SessionFactoryBuilder getSessionFactoryBuilder()

Implements org.hibernate.boot.Metadata.getSessionFactoryBuilder.

Doc from org.hibernate.boot.Metadata.getSessionFactoryBuilder.

Get the builder for org.hibernate.SessionFactory instances based on this metamodel.

Returns:SessionFactoryBuilder

The builder for org.hibernate.SessionFactory instances.

Annotations
@Override
getSqlFunctionMapback to summary
public Map<String, SQLFunction> getSqlFunctionMap()

Implements org.hibernate.boot.Metadata.getSqlFunctionMap.

Annotations
@Override
getTypeConfigurationback to summary
public TypeConfiguration getTypeConfiguration()

Implements org.hibernate.boot.spi.MetadataImplementor.getTypeConfiguration.

Doc from org.hibernate.boot.spi.MetadataImplementor.getTypeConfiguration.

Access to the TypeConfiguration

Returns:TypeConfiguration

Access to the TypeConfiguration

Annotations
@Override
getTypeDefinitionback to summary
public TypeDefinition getTypeDefinition(String typeName)

Implements org.hibernate.boot.Metadata.getTypeDefinition.

Doc from org.hibernate.boot.Metadata.getTypeDefinition.

Retrieve a type definition by name.

Parameters
typeName:String

The name of the type definition to retrieve.

Returns:TypeDefinition

The named type definition, or null

Annotations
@Override
getTypeResolverback to summary
public TypeResolver getTypeResolver()

Implements org.hibernate.boot.spi.MetadataImplementor.getTypeResolver.

Deprecated

(since 5.3) No replacement, access to and handling of Types will be much different in 6.0

Retrieve the Type resolver associated with this factory.

Returns:TypeResolver

The type resolver

Annotations
@Deprecated
getUUIDback to summary
public UUID getUUID()

Implements org.hibernate.boot.Metadata.getUUID.

Doc from org.hibernate.boot.Metadata.getUUID.

Gets the java.util.UUID for this metamodel.

Returns:UUID

the UUID.

Annotations
@Override
initSessionFactoryback to summary
public void initSessionFactory(SessionFactoryImplementor sessionFactory)

Implements org.hibernate.boot.spi.MetadataImplementor.initSessionFactory.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Annotations
@Override
validateback to summary
public void validate() throws MappingException

Implements org.hibernate.boot.spi.MetadataImplementor.validate.

Annotations
@Override