Top Description Methods
org.hibernate.boot

public Interface Metadata

extends Mapping
Known Direct Subinterfaces
org.hibernate.boot.spi.MetadataImplementor
Imports
java.util.Map, .UUID, org.hibernate.SessionFactory, 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, .Mapping, .NamedQueryDefinition, .NamedSQLQueryDefinition, org.hibernate.mapping.Collection, .FetchProfile, .PersistentClass, .Table

Represents the ORM model as determined from all provided mapping sources. NOTE : for the time being this is essentially a copy of the legacy Mappings contract, split between reading the mapping information exposed here and collecting it via InFlightMetadataCollector
Author
Steve Ebersole
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public SessionFactory

Returns:

THe built SessionFactory.
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>
public Collection

Returns:

The collection mapping metadata, or null if no matching collection found.
getCollectionBinding
(String
The collection role for which to retrieve the metadata.
role
)

Retrieves the collection mapping metadata for the given collection role.

public Collection<Collection>

Returns:

All Collection representations.
getCollectionBindings
()

Retrieves the Collection metadata representation for all known collections.

public Database

Returns:

The database model.
getDatabase
()

Retrieve the database model.

public PersistentClass

Returns:

The entity mapping metadata, or null if no matching entity found.
getEntityBinding
(String
The entity name for which to retrieve the metadata.
entityName
)

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

public Collection<PersistentClass>

Returns:

All PersistentClass representations.
getEntityBindings
()

Retrieves the PersistentClass entity metadata representation for all known entities.

public FetchProfile
public Collection<FetchProfile>
public FilterDefinition

Returns:

The filter definition, or null.
getFilterDefinition
(String
The name of the filter definition to retrieve .
name
)

Retrieves a filter definition by name.

public Map<String, FilterDefinition>

Returns:

The filter definition map.
getFilterDefinitions
()

Retrieves the complete map of filter definitions.

public IdentifierGeneratorDefinition
public Map<String, String>

Returns:

All imports
getImports
()

Retrieves all defined imports (class renames).

public NamedEntityGraphDefinition
public Map<String, NamedEntityGraphDefinition>
public NamedSQLQueryDefinition

Returns:

The named query metadata, or null
getNamedNativeQueryDefinition
(String
The SQL query name.
name
)

Retrieve named SQL query metadata.

public Collection<NamedSQLQueryDefinition>
public Collection<NamedProcedureCallDefinition>
public NamedQueryDefinition

Returns:

The named query metadata, or null.
getNamedQueryDefinition
(String
The query name
name
)

Retrieve named query metadata by name.

public Collection<NamedQueryDefinition>
public ResultSetMappingDefinition

Returns:

The named result set mapping metadata, or null if none found.
getResultSetMapping
(String
The mapping name.
name
)

Retrieve the metadata for a named SQL result set mapping.

public Map<String, ResultSetMappingDefinition>
public SessionFactoryBuilder

Returns:

The builder for org.hibernate.SessionFactory instances.
getSessionFactoryBuilder
()

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

public Map<String, SQLFunction>
public TypeDefinition

Returns:

The named type definition, or null
getTypeDefinition
(String
The name of the type definition to retrieve.
typeName
)

Retrieve a type definition by name.

public UUID

Returns:

the UUID.
getUUID
()

Gets the java.util.UUID for this metamodel.

Inherited from org.hibernate.engine.spi.Mapping:
getIdentifierGeneratorFactorygetIdentifierPropertyNamegetIdentifierTypegetReferencedPropertyType

Method Detail

buildSessionFactoryback to summary
public SessionFactory 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.

collectTableMappingsback to summary
public Collection<Table> collectTableMappings()
getCollectionBindingback to summary
public Collection getCollectionBinding(String role)

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.

getCollectionBindingsback to summary
public Collection<Collection> getCollectionBindings()

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

Returns:Collection<Collection>

All Collection representations.

getDatabaseback to summary
public Database getDatabase()

Retrieve the database model.

Returns:Database

The database model.

getEntityBindingback to summary
public PersistentClass getEntityBinding(String entityName)

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.

getEntityBindingsback to summary
public Collection<PersistentClass> getEntityBindings()

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

Returns:Collection<PersistentClass>

All PersistentClass representations.

getFetchProfileback to summary
public FetchProfile getFetchProfile(String name)
getFetchProfilesback to summary
public Collection<FetchProfile> getFetchProfiles()
getFilterDefinitionback to summary
public FilterDefinition getFilterDefinition(String name)

Retrieves a filter definition by name.

Parameters
name:String

The name of the filter definition to retrieve .

Returns:FilterDefinition

The filter definition, or null.

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

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

Returns:Map<String, FilterDefinition>

The filter definition map.

getIdentifierGeneratorback to summary
public IdentifierGeneratorDefinition getIdentifierGenerator(String name)
getImportsback to summary
public Map<String, String> getImports()

Retrieves all defined imports (class renames).

Returns:Map<String, String>

All imports

getNamedEntityGraphback to summary
public NamedEntityGraphDefinition getNamedEntityGraph(String name)
getNamedEntityGraphsback to summary
public Map<String, NamedEntityGraphDefinition> getNamedEntityGraphs()
getNamedNativeQueryDefinitionback to summary
public NamedSQLQueryDefinition getNamedNativeQueryDefinition(String name)

Retrieve named SQL query metadata.

Parameters
name:String

The SQL query name.

Returns:NamedSQLQueryDefinition

The named query metadata, or null

getNamedNativeQueryDefinitionsback to summary
public Collection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()
getNamedProcedureCallDefinitionsback to summary
public Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()
getNamedQueryDefinitionback to summary
public NamedQueryDefinition getNamedQueryDefinition(String name)

Retrieve named query metadata by name.

Parameters
name:String

The query name

Returns:NamedQueryDefinition

The named query metadata, or null.

getNamedQueryDefinitionsback to summary
public Collection<NamedQueryDefinition> getNamedQueryDefinitions()
getResultSetMappingback to summary
public ResultSetMappingDefinition getResultSetMapping(String name)

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.

getResultSetMappingDefinitionsback to summary
public Map<String, ResultSetMappingDefinition> getResultSetMappingDefinitions()
getSessionFactoryBuilderback to summary
public SessionFactoryBuilder getSessionFactoryBuilder()

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

Returns:SessionFactoryBuilder

The builder for org.hibernate.SessionFactory instances.

getSqlFunctionMapback to summary
public Map<String, SQLFunction> getSqlFunctionMap()
getTypeDefinitionback to summary
public TypeDefinition getTypeDefinition(String typeName)

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

getUUIDback to summary
public UUID getUUID()

Gets the java.util.UUID for this metamodel.

Returns:UUID

the UUID.