Package org.hibernate.boot.spi
Class AbstractDelegatingMetadata
- java.lang.Object
-
- org.hibernate.boot.spi.AbstractDelegatingMetadata
-
- All Implemented Interfaces:
Metadata,MetadataImplementor,Mapping
public abstract class AbstractDelegatingMetadata extends Object implements MetadataImplementor
Convenience base class for custom implementors ofMetadataImplementorusing delegation.
-
-
Constructor Summary
Constructors Constructor Description AbstractDelegatingMetadata(MetadataImplementor delegate)
-
Method Summary
-
-
-
Constructor Detail
-
AbstractDelegatingMetadata
public AbstractDelegatingMetadata(MetadataImplementor delegate)
-
-
Method Detail
-
delegate
protected MetadataImplementor delegate()
-
getIdentifierType
public Type getIdentifierType(String className) throws MappingException
- Specified by:
getIdentifierTypein interfaceMapping- Throws:
MappingException
-
getIdentifierPropertyName
public String getIdentifierPropertyName(String className) throws MappingException
- Specified by:
getIdentifierPropertyNamein interfaceMapping- Throws:
MappingException
-
getReferencedPropertyType
public Type getReferencedPropertyType(String className, String propertyName) throws MappingException
- Specified by:
getReferencedPropertyTypein interfaceMapping- Throws:
MappingException
-
getSessionFactoryBuilder
public SessionFactoryBuilder getSessionFactoryBuilder()
Description copied from interface:MetadataGet the builder forSessionFactoryinstances based on this metamodel.- Specified by:
getSessionFactoryBuilderin interfaceMetadata- Returns:
- The builder for
SessionFactoryinstances.
-
buildSessionFactory
public SessionFactory buildSessionFactory()
Description copied from interface:MetadataShort-hand form of building aSessionFactorythrough the builder without any additional option overrides.- Specified by:
buildSessionFactoryin interfaceMetadata- Returns:
- THe built SessionFactory.
-
getUUID
public UUID getUUID()
Description copied from interface:MetadataGets theUUIDfor this metamodel.
-
getDatabase
public Database getDatabase()
Description copied from interface:MetadataRetrieve the database model.- Specified by:
getDatabasein interfaceMetadata- Returns:
- The database model.
-
getEntityBindings
public Collection<PersistentClass> getEntityBindings()
Description copied from interface:MetadataRetrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable- Specified by:
getEntityBindingsin interfaceMetadata- Returns:
- All PersistentClass representations.
-
getEntityBinding
public PersistentClass getEntityBinding(String entityName)
Description copied from interface:MetadataRetrieves the PersistentClass entity mapping metadata representation for the given entity name.- Specified by:
getEntityBindingin interfaceMetadata- Parameters:
entityName- The entity name for which to retrieve the metadata.- Returns:
- The entity mapping metadata, or
nullif no matching entity found.
-
getCollectionBindings
public Collection<Collection> getCollectionBindings()
Description copied from interface:MetadataRetrieves the Collection metadata representation for all known collections. Returned collection is immutable- Specified by:
getCollectionBindingsin interfaceMetadata- Returns:
- All Collection representations.
-
getCollectionBinding
public Collection getCollectionBinding(String role)
Description copied from interface:MetadataRetrieves the collection mapping metadata for the given collection role.- Specified by:
getCollectionBindingin interfaceMetadata- Parameters:
role- The collection role for which to retrieve the metadata.- Returns:
- The collection mapping metadata, or
nullif no matching collection found.
-
getImports
public Map<String,String> getImports()
Description copied from interface:MetadataRetrieves all defined imports (class renames).- Specified by:
getImportsin interfaceMetadata- Returns:
- All imports
-
getNamedHqlQueryMapping
public NamedHqlQueryDefinition getNamedHqlQueryMapping(String name)
Description copied from interface:MetadataRetrieve named query metadata by name.- Specified by:
getNamedHqlQueryMappingin interfaceMetadata- Returns:
- The named query metadata, or
null.
-
visitNamedHqlQueryDefinitions
public void visitNamedHqlQueryDefinitions(Consumer<NamedHqlQueryDefinition> definitionConsumer)
Description copied from interface:MetadataVisit all named HQL query definitions- Specified by:
visitNamedHqlQueryDefinitionsin interfaceMetadata
-
getNamedNativeQueryMapping
public NamedNativeQueryDefinition getNamedNativeQueryMapping(String name)
Description copied from interface:MetadataRetrieve named SQL query metadata.- Specified by:
getNamedNativeQueryMappingin interfaceMetadata- Returns:
- The named query metadata, or
null
-
visitNamedNativeQueryDefinitions
public void visitNamedNativeQueryDefinitions(Consumer<NamedNativeQueryDefinition> definitionConsumer)
Description copied from interface:MetadataVisit all named native query definitions- Specified by:
visitNamedNativeQueryDefinitionsin interfaceMetadata
-
getNamedProcedureCallMapping
public NamedProcedureCallDefinition getNamedProcedureCallMapping(String name)
Description copied from interface:MetadataRetrieve named procedure metadata.- Specified by:
getNamedProcedureCallMappingin interfaceMetadata- Returns:
- The named procedure metadata, or
null
-
visitNamedProcedureCallDefinition
public void visitNamedProcedureCallDefinition(Consumer<NamedProcedureCallDefinition> definitionConsumer)
Description copied from interface:MetadataVisit all named callable query definitions- Specified by:
visitNamedProcedureCallDefinitionin interfaceMetadata
-
getResultSetMapping
public NamedResultSetMappingDescriptor getResultSetMapping(String name)
Description copied from interface:MetadataRetrieve the metadata for a named SQL result set mapping.- Specified by:
getResultSetMappingin interfaceMetadata- Parameters:
name- The mapping name.- Returns:
- The named result set mapping metadata, or
nullif none found.
-
visitNamedResultSetMappingDefinition
public void visitNamedResultSetMappingDefinition(Consumer<NamedResultSetMappingDescriptor> definitionConsumer)
Description copied from interface:MetadataVisit all named SQL result set mapping definitions- Specified by:
visitNamedResultSetMappingDefinitionin interfaceMetadata
-
getTypeDefinition
public TypeDefinition getTypeDefinition(String typeName)
Description copied from interface:MetadataRetrieve a type definition by name.- Specified by:
getTypeDefinitionin interfaceMetadata- Returns:
- The named type definition, or
null
-
getFilterDefinitions
public Map<String,FilterDefinition> getFilterDefinitions()
Description copied from interface:MetadataRetrieves the complete map of filter definitions. Returned map is immutable- Specified by:
getFilterDefinitionsin interfaceMetadata- Returns:
- The filter definition map.
-
getFilterDefinition
public FilterDefinition getFilterDefinition(String name)
Description copied from interface:MetadataRetrieves a filter definition by name.- Specified by:
getFilterDefinitionin interfaceMetadata- Parameters:
name- The name of the filter definition to retrieve .- Returns:
- The filter definition, or
null.
-
getFetchProfile
public FetchProfile getFetchProfile(String name)
- Specified by:
getFetchProfilein interfaceMetadata
-
getFetchProfiles
public Collection<FetchProfile> getFetchProfiles()
- Specified by:
getFetchProfilesin interfaceMetadata
-
getNamedEntityGraph
public NamedEntityGraphDefinition getNamedEntityGraph(String name)
- Specified by:
getNamedEntityGraphin interfaceMetadata
-
getNamedEntityGraphs
public Map<String,NamedEntityGraphDefinition> getNamedEntityGraphs()
- Specified by:
getNamedEntityGraphsin interfaceMetadata
-
getIdentifierGenerator
public IdentifierGeneratorDefinition getIdentifierGenerator(String name)
- Specified by:
getIdentifierGeneratorin interfaceMetadata
-
collectTableMappings
public Collection<Table> collectTableMappings()
- Specified by:
collectTableMappingsin interfaceMetadata
-
getSqlFunctionMap
public Map<String,SqmFunctionDescriptor> getSqlFunctionMap()
- Specified by:
getSqlFunctionMapin interfaceMetadata
-
getMetadataBuildingOptions
public MetadataBuildingOptions getMetadataBuildingOptions()
Description copied from interface:MetadataImplementorAccess to the options used to build thisMetadata- Specified by:
getMetadataBuildingOptionsin interfaceMetadataImplementor- Returns:
- The
MetadataBuildingOptions
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
Description copied from interface:MetadataImplementorAccess to theTypeConfigurationbelonging to theBootstrapContext- Specified by:
getTypeConfigurationin interfaceMetadataImplementor
-
getFunctionRegistry
public SqmFunctionRegistry getFunctionRegistry()
Description copied from interface:MetadataImplementorAccess to theSqmFunctionRegistrybelonging to theBootstrapContext- Specified by:
getFunctionRegistryin interfaceMetadataImplementor
-
orderColumns
public void orderColumns(boolean forceOrdering)
- Specified by:
orderColumnsin interfaceMetadataImplementor
-
validate
public void validate() throws MappingException- Specified by:
validatein interfaceMetadataImplementor- Throws:
MappingException
-
getMappedSuperclassMappingsCopy
public Set<MappedSuperclass> getMappedSuperclassMappingsCopy()
- Specified by:
getMappedSuperclassMappingsCopyin interfaceMetadataImplementor
-
initSessionFactory
public void initSessionFactory(SessionFactoryImplementor sessionFactory)
- Specified by:
initSessionFactoryin interfaceMetadataImplementor
-
visitRegisteredComponents
public void visitRegisteredComponents(Consumer<Component> consumer)
- Specified by:
visitRegisteredComponentsin interfaceMetadataImplementor
-
getGenericComponent
public Component getGenericComponent(Class<?> componentClass)
- Specified by:
getGenericComponentin interfaceMetadataImplementor
-
buildNamedQueryRepository
public NamedObjectRepository buildNamedQueryRepository(SessionFactoryImplementor sessionFactory)
- Specified by:
buildNamedQueryRepositoryin interfaceMetadataImplementor
-
getContributors
public Set<String> getContributors()
Description copied from interface:MetadataAll of the known model contributors- Specified by:
getContributorsin interfaceMetadata
-
-