public interface Metadata extends Mapping
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
getIdentifierGeneratorFactory, getIdentifierPropertyName, getIdentifierType, getReferencedPropertyTypeSessionFactoryBuilder getSessionFactoryBuilder()
Get the builder for SessionFactory instances based on this metamodel,
SessionFactory instances.SessionFactory buildSessionFactory()
Short-hand form of building a SessionFactory through the builder without any additional
option overrides.
Database getDatabase()
Retrieve the database model.
Collection<PersistentClass> getEntityBindings()
Retrieves the PersistentClass entity metadata representation for known all entities.
Returned collection is immutable
PersistentClass getEntityBinding(String entityName)
Retrieves the PersistentClass entity mapping metadata representation for the given entity name.
entityName - The entity name for which to retrieve the metadata.null if no matching entity found.Collection<Collection> getCollectionBindings()
Retrieves the Collection metadata representation for known all collections.
Returned collection is immutable
Collection getCollectionBinding(String role)
Retrieves the collection mapping metadata for the given collection role.
role - The collection role for which to retrieve the metadata.null if no matching collection found.Map<String,String> getImports()
Retrieves all defined imports (class renames).
NamedQueryDefinition getNamedQueryDefinition(String name)
Retrieve named query metadata by name.
name - The query namenull.Collection<NamedQueryDefinition> getNamedQueryDefinitions()
NamedSQLQueryDefinition getNamedNativeQueryDefinition(String name)
Retrieve named SQL query metadata.
name - The SQL query name.nullCollection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()
Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()
ResultSetMappingDefinition getResultSetMapping(String name)
Retrieve the metadata for a named SQL result set mapping.
name - The mapping name.null if none found.Map<String,ResultSetMappingDefinition> getResultSetMappingDefinitions()
TypeDefinition getTypeDefinition(String typeName)
Retrieve a type definition by name.
typeName - The name of the type definition to retrieve.nullMap<String,FilterDefinition> getFilterDefinitions()
Retrieves the complete map of filter definitions.
Returned map is immutable
FilterDefinition getFilterDefinition(String name)
Retrieves a filter definition by name.
name - The name of the filter definition to retrieve
.null.FetchProfile getFetchProfile(String name)
Collection<FetchProfile> getFetchProfiles()
NamedEntityGraphDefinition getNamedEntityGraph(String name)
Map<String,NamedEntityGraphDefinition> getNamedEntityGraphs()
IdentifierGeneratorDefinition getIdentifierGenerator(String name)
Collection<Table> collectTableMappings()
Map<String,SQLFunction> getSqlFunctionMap()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.