Interface Metadata

  • All Superinterfaces:
    Mapping
    All Known Subinterfaces:
    InFlightMetadataCollector, MetadataImplementor
    All Known Implementing Classes:
    AbstractDelegatingMetadata

    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
    Since:
    5.0
    • Method Detail

      • buildSessionFactory

        SessionFactory buildSessionFactory()
        Short-hand form of building a SessionFactory through the builder without any additional option overrides.
        Returns:
        THe built SessionFactory.
      • getUUID

        java.util.UUID getUUID()
        Gets the UUID for this metamodel.
        Returns:
        the UUID.
      • getDatabase

        Database getDatabase()
        Retrieve the database model.
        Returns:
        The database model.
      • getEntityBindings

        java.util.Collection<PersistentClass> getEntityBindings()
        Retrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable
        Returns:
        All PersistentClass representations.
      • getEntityBinding

        PersistentClass getEntityBinding​(java.lang.String entityName)
        Retrieves the PersistentClass entity mapping metadata representation for the given entity name.
        Parameters:
        entityName - The entity name for which to retrieve the metadata.
        Returns:
        The entity mapping metadata, or null if no matching entity found.
      • getCollectionBindings

        java.util.Collection<Collection> getCollectionBindings()
        Retrieves the Collection metadata representation for all known collections. Returned collection is immutable
        Returns:
        All Collection representations.
      • getCollectionBinding

        Collection getCollectionBinding​(java.lang.String role)
        Retrieves the collection mapping metadata for the given collection role.
        Parameters:
        role - The collection role for which to retrieve the metadata.
        Returns:
        The collection mapping metadata, or null if no matching collection found.
      • getImports

        java.util.Map<java.lang.String,​java.lang.String> getImports()
        Retrieves all defined imports (class renames).
        Returns:
        All imports
      • getNamedQueryDefinition

        NamedQueryDefinition getNamedQueryDefinition​(java.lang.String name)
        Retrieve named query metadata by name.
        Parameters:
        name - The query name
        Returns:
        The named query metadata, or null.
      • getNamedNativeQueryDefinition

        NamedSQLQueryDefinition getNamedNativeQueryDefinition​(java.lang.String name)
        Retrieve named SQL query metadata.
        Parameters:
        name - The SQL query name.
        Returns:
        The named query metadata, or null
      • getResultSetMapping

        ResultSetMappingDefinition getResultSetMapping​(java.lang.String name)
        Retrieve the metadata for a named SQL result set mapping.
        Parameters:
        name - The mapping name.
        Returns:
        The named result set mapping metadata, or null if none found.
      • getTypeDefinition

        TypeDefinition getTypeDefinition​(java.lang.String typeName)
        Retrieve a type definition by name.
        Parameters:
        typeName - The name of the type definition to retrieve.
        Returns:
        The named type definition, or null
      • getFilterDefinitions

        java.util.Map<java.lang.String,​FilterDefinition> getFilterDefinitions()
        Retrieves the complete map of filter definitions. Returned map is immutable
        Returns:
        The filter definition map.
      • getFilterDefinition

        FilterDefinition getFilterDefinition​(java.lang.String name)
        Retrieves a filter definition by name.
        Parameters:
        name - The name of the filter definition to retrieve .
        Returns:
        The filter definition, or null.
      • getFetchProfile

        FetchProfile getFetchProfile​(java.lang.String name)
      • getFetchProfiles

        java.util.Collection<FetchProfile> getFetchProfiles()
      • collectTableMappings

        java.util.Collection<Table> collectTableMappings()
      • getSqlFunctionMap

        java.util.Map<java.lang.String,​SQLFunction> getSqlFunctionMap()