public interface SessionFactoryImplementor extends Mapping, SessionFactory, QueryParameterBindingTypeResolver
SessionFactory,
SessionFactoryImpl| Modifier and Type | Interface and Description |
|---|---|
static interface |
SessionFactoryImplementor.DeserializationResolver<T extends SessionFactoryImplementor>
Contract for resolving this SessionFactory on deserialization
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(SessionFactoryObserver observer) |
javax.persistence.EntityGraph |
findEntityGraphByName(java.lang.String name) |
java.util.Map |
getAllSecondLevelCacheRegions()
Deprecated.
(since 5.2) with no direct replacement; use this factory's
getCache() reference
to access cache objects as needed. |
CacheImplementor |
getCache()
Obtain direct access to the underlying cache regions.
|
default CollectionPersister |
getCollectionPersister(java.lang.String role)
Deprecated.
(since 5.2) Use
MetamodelImplementor.collectionPersister(String) instead. |
default java.util.Map<java.lang.String,CollectionPersister> |
getCollectionPersisters()
Deprecated.
(since 5.2) Use
MetamodelImplementor.collectionPersisters() instead. |
default java.util.Set<java.lang.String> |
getCollectionRolesByEntityParticipant(java.lang.String entityName)
Deprecated.
(since 5.2) Use
MetamodelImplementor.collectionPersisters() instead.
Retrieves a set of all the collection roles in which the given entity
is a participant, as either an index or an element. |
CurrentTenantIdentifierResolver |
getCurrentTenantIdentifierResolver() |
CustomEntityDirtinessStrategy |
getCustomEntityDirtinessStrategy() |
SessionFactoryImplementor.DeserializationResolver |
getDeserializationResolver() |
default Dialect |
getDialect()
Deprecated.
(since 5.2) instead, use this factory's {
getServiceRegistry()} ->
JdbcServices.getDialect() |
EntityNotFoundDelegate |
getEntityNotFoundDelegate() |
default EntityPersister |
getEntityPersister(java.lang.String entityName)
Deprecated.
(since 5.2) Use
MetamodelImplementor.entityPersister(Class) instead. |
default java.util.Map<java.lang.String,EntityPersister> |
getEntityPersisters()
Deprecated.
(since 5.2) Use
MetamodelImplementor.entityPersisters() instead. |
FetchProfile |
getFetchProfile(java.lang.String name)
Retrieve fetch profile by name.
|
IdentifierGenerator |
getIdentifierGenerator(java.lang.String rootEntityName)
Get the identifier generator for the hierarchy
|
default java.lang.String[] |
getImplementors(java.lang.String entityName)
Deprecated.
Use
Metamodel.getImplementors(java.lang.String) instead |
default java.lang.String |
getImportedClassName(java.lang.String name)
Deprecated.
Use
Metamodel.getImportedClassName(java.lang.String) instead |
Interceptor |
getInterceptor()
Deprecated.
(since 5.2) if access to the SessionFactory-scoped Interceptor is needed, use
SessionFactoryOptions.getInterceptor() instead. However, generally speaking this access
is not needed. |
JdbcServices |
getJdbcServices()
Get the JdbcServices.
|
MetamodelImplementor |
getMetamodel() |
java.lang.String |
getName()
Access to the name (if one) assigned to the SessionFactory
|
default NamedQueryDefinition |
getNamedQuery(java.lang.String queryName)
Deprecated.
(since 5.2) Use
NamedQueryRepository.getNamedQueryDefinition(java.lang.String) instead. |
NamedQueryRepository |
getNamedQueryRepository()
Deprecated.
(since 5.2) it will be replaced with the new QueryEngine concept introduced in 6.0
|
default NamedSQLQueryDefinition |
getNamedSQLQuery(java.lang.String queryName)
Deprecated.
(since 5.2) Use
NamedQueryRepository.getNamedSQLQueryDefinition(java.lang.String) instead. |
default Region |
getNaturalIdCacheRegion(java.lang.String regionName)
Deprecated.
(since 5.2) Use this factory's
getCache() ->
CacheImplementor.getNaturalIdCacheRegionAccessStrategy(String) ->
NaturalIdRegionAccessStrategy.getRegion() instead. |
default RegionAccessStrategy |
getNaturalIdCacheRegionAccessStrategy(java.lang.String regionName)
Deprecated.
(since 5.2) Use this factory's
getCache() ->
CacheImplementor.getNaturalIdCacheRegionAccessStrategy(String) instead. |
default QueryCache |
getQueryCache()
Deprecated.
Use
CacheImplementor.getDefaultQueryCache() instead |
default QueryCache |
getQueryCache(java.lang.String regionName)
Deprecated.
Use
CacheImplementor.getQueryCache(String) instead |
QueryPlanCache |
getQueryPlanCache()
Deprecated.
(since 5.2) it will be replaced with the new QueryEngine concept introduced in 6.0
|
default ResultSetMappingDefinition |
getResultSetMapping(java.lang.String name)
Deprecated.
(since 5.2) Use
NamedQueryRepository.getResultSetMappingDefinition(java.lang.String) instead. |
default java.lang.String[] |
getReturnAliases(java.lang.String queryString)
Deprecated.
No replacement.
|
default Type[] |
getReturnTypes(java.lang.String queryString)
Deprecated.
No replacement.
|
default Region |
getSecondLevelCacheRegion(java.lang.String regionName)
Deprecated.
(since 5.2) Use this factory's
getCache() reference
to access Region via CacheImplementor.determineEntityRegionAccessStrategy(org.hibernate.mapping.PersistentClass) or
CacheImplementor.determineCollectionRegionAccessStrategy(org.hibernate.mapping.Collection) instead. |
default RegionAccessStrategy |
getSecondLevelCacheRegionAccessStrategy(java.lang.String regionName)
Deprecated.
(since 5.2) Use this factory's
getCache() reference
to access CacheImplementor.determineEntityRegionAccessStrategy(org.hibernate.mapping.PersistentClass) or
CacheImplementor.determineCollectionRegionAccessStrategy(org.hibernate.mapping.Collection) instead. |
ServiceRegistryImplementor |
getServiceRegistry()
Access to the ServiceRegistry for this SessionFactory.
|
Settings |
getSettings()
Deprecated.
since 5.0; use
SessionFactory.getSessionFactoryOptions() instead |
default SQLExceptionConverter |
getSQLExceptionConverter()
Deprecated.
since 5.0; use
JdbcServices.getSqlExceptionHelper() ->
SqlExceptionHelper.getSqlExceptionConverter() instead as obtained from getServiceRegistry() |
default SqlExceptionHelper |
getSQLExceptionHelper()
Deprecated.
since 5.0; use
JdbcServices.getSqlExceptionHelper() instead as
obtained from getServiceRegistry() |
SQLFunctionRegistry |
getSqlFunctionRegistry() |
StatisticsImplementor |
getStatistics()
Retrieve the statistics fopr this factory.
|
default StatisticsImplementor |
getStatisticsImplementor()
Deprecated.
Just use
getStatistics() (with covariant return here as StatisticsImplementor). |
TypeResolver |
getTypeResolver()
Deprecated.
(since 5.2) No replacement, access to and handling of Types will be much different in 6.0
|
default UpdateTimestampsCache |
getUpdateTimestampsCache()
Deprecated.
Use
CacheImplementor.getUpdateTimestampsCache() instead |
java.lang.String |
getUuid()
Get the UUID for this SessionFactory.
|
default java.lang.Iterable<EntityNameResolver> |
iterateEntityNameResolvers()
Deprecated.
(since 5.2) use
getMetamodel() -> MetamodelImplementor.getEntityNameResolvers() |
default EntityPersister |
locateEntityPersister(java.lang.Class byClass)
Deprecated.
(since 5.2) Use
MetamodelImplementor.locateEntityPersister(Class) instead. |
default EntityPersister |
locateEntityPersister(java.lang.String byName)
Deprecated.
(since 5.2) Use
MetamodelImplementor.locateEntityPersister(String) instead. |
Session |
openTemporarySession()
Get a non-transactional "current" session (used by hibernate-envers)
|
default void |
registerNamedQueryDefinition(java.lang.String name,
NamedQueryDefinition definition)
Deprecated.
|
default void |
registerNamedSQLQueryDefinition(java.lang.String name,
NamedSQLQueryDefinition definition)
Deprecated.
|
SessionBuilderImplementor |
withOptions()
Obtain a
Session builder. |
getIdentifierGeneratorFactory, getIdentifierPropertyName, getIdentifierType, getReferencedPropertyTypeclose, containsFetchProfileDefinition, getAllClassMetadata, getAllCollectionMetadata, getClassMetadata, getClassMetadata, getCollectionMetadata, getCurrentSession, getDefinedFilterNames, getFilterDefinition, getSessionFactoryOptions, getTypeHelper, isClosed, openSession, openStatelessSession, openStatelessSession, withStatelessOptionsfindEntityGraphsByType, getEntityTypeByName, getSessionFactoryaddNamedEntityGraph, addNamedQuery, createEntityManager, createEntityManager, createEntityManager, createEntityManager, getCriteriaBuilder, getPersistenceUnitUtil, getProperties, isOpen, unwrapresolveParameterBindType, resolveParameterBindTypejava.lang.String getUuid()
UUID, but kept
as a String.SessionFactoryRegistry.getSessionFactory(java.lang.String)java.lang.String getName()
SessionBuilderImplementor withOptions()
SessionFactorySession builder.withOptions in interface SessionFactorySession openTemporarySession() throws HibernateException
HibernateExceptionCacheImplementor getCache()
SessionFactorygetCache in interface javax.persistence.EntityManagerFactorygetCache in interface SessionFactoryStatisticsImplementor getStatistics()
SessionFactorygetStatistics in interface SessionFactoryServiceRegistryImplementor getServiceRegistry()
@Deprecated Interceptor getInterceptor()
SessionFactoryOptions.getInterceptor() instead. However, generally speaking this access
is not needed.@Deprecated QueryPlanCache getQueryPlanCache()
@Deprecated NamedQueryRepository getNamedQueryRepository()
FetchProfile getFetchProfile(java.lang.String name)
name - The name of the profile to retrieve.@Deprecated TypeResolver getTypeResolver()
Type resolver associated with this factory.IdentifierGenerator getIdentifierGenerator(java.lang.String rootEntityName)
EntityNotFoundDelegate getEntityNotFoundDelegate()
SQLFunctionRegistry getSqlFunctionRegistry()
void addObserver(SessionFactoryObserver observer)
CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
@Deprecated default java.lang.Iterable<EntityNameResolver> iterateEntityNameResolvers()
getMetamodel() -> MetamodelImplementor.getEntityNameResolvers()SessionFactoryImplementor.DeserializationResolver getDeserializationResolver()
@Deprecated default Type[] getReturnTypes(java.lang.String queryString)
@Deprecated default java.lang.String[] getReturnAliases(java.lang.String queryString)
@Deprecated default StatisticsImplementor getStatisticsImplementor()
getStatistics() (with covariant return here as StatisticsImplementor).@Deprecated default NamedQueryDefinition getNamedQuery(java.lang.String queryName)
NamedQueryRepository.getNamedQueryDefinition(java.lang.String) instead.@Deprecated
default void registerNamedQueryDefinition(java.lang.String name,
NamedQueryDefinition definition)
NamedQueryRepository.registerNamedQueryDefinition(java.lang.String, org.hibernate.engine.spi.NamedQueryDefinition) instead.@Deprecated default NamedSQLQueryDefinition getNamedSQLQuery(java.lang.String queryName)
NamedQueryRepository.getNamedSQLQueryDefinition(java.lang.String) instead.@Deprecated
default void registerNamedSQLQueryDefinition(java.lang.String name,
NamedSQLQueryDefinition definition)
NamedQueryRepository.registerNamedSQLQueryDefinition(java.lang.String, org.hibernate.engine.spi.NamedSQLQueryDefinition) instead.@Deprecated default ResultSetMappingDefinition getResultSetMapping(java.lang.String name)
NamedQueryRepository.getResultSetMappingDefinition(java.lang.String) instead.JdbcServices getJdbcServices()
@Deprecated default Dialect getDialect()
getServiceRegistry()} ->
JdbcServices.getDialect()getJdbcServices().getDialect()@Deprecated default SQLExceptionConverter getSQLExceptionConverter()
JdbcServices.getSqlExceptionHelper() ->
SqlExceptionHelper.getSqlExceptionConverter() instead as obtained from getServiceRegistry()@Deprecated default SqlExceptionHelper getSQLExceptionHelper()
JdbcServices.getSqlExceptionHelper() instead as
obtained from getServiceRegistry()@Deprecated Settings getSettings()
SessionFactory.getSessionFactoryOptions() insteadMetamodelImplementor getMetamodel()
getMetamodel in interface javax.persistence.EntityManagerFactorygetMetamodel in interface HibernateEntityManagerFactory@Deprecated default EntityPersister getEntityPersister(java.lang.String entityName) throws MappingException
MetamodelImplementor.entityPersister(Class) instead.MappingException@Deprecated default java.util.Map<java.lang.String,EntityPersister> getEntityPersisters()
MetamodelImplementor.entityPersisters() instead.@Deprecated default CollectionPersister getCollectionPersister(java.lang.String role) throws MappingException
MetamodelImplementor.collectionPersister(String) instead.MappingException@Deprecated default java.util.Map<java.lang.String,CollectionPersister> getCollectionPersisters()
MetamodelImplementor.collectionPersisters() instead.@Deprecated default java.util.Set<java.lang.String> getCollectionRolesByEntityParticipant(java.lang.String entityName)
MetamodelImplementor.collectionPersisters() instead.
Retrieves a set of all the collection roles in which the given entity
is a participant, as either an index or an element.entityName - The entity name for which to get the collection roles.@Deprecated default EntityPersister locateEntityPersister(java.lang.Class byClass)
MetamodelImplementor.locateEntityPersister(Class) instead.@Deprecated default EntityPersister locateEntityPersister(java.lang.String byName)
MetamodelImplementor.locateEntityPersister(String) instead.@Deprecated default java.lang.String[] getImplementors(java.lang.String entityName)
Metamodel.getImplementors(java.lang.String) instead@Deprecated default java.lang.String getImportedClassName(java.lang.String name)
Metamodel.getImportedClassName(java.lang.String) insteadjavax.persistence.EntityGraph findEntityGraphByName(java.lang.String name)
@Deprecated default Region getSecondLevelCacheRegion(java.lang.String regionName)
getCache() reference
to access Region via CacheImplementor.determineEntityRegionAccessStrategy(org.hibernate.mapping.PersistentClass) or
CacheImplementor.determineCollectionRegionAccessStrategy(org.hibernate.mapping.Collection) instead.regionName - The name of the region to retrieve.@Deprecated default RegionAccessStrategy getSecondLevelCacheRegionAccessStrategy(java.lang.String regionName)
getCache() reference
to access CacheImplementor.determineEntityRegionAccessStrategy(org.hibernate.mapping.PersistentClass) or
CacheImplementor.determineCollectionRegionAccessStrategy(org.hibernate.mapping.Collection) instead.regionName - The name of the region@Deprecated default Region getNaturalIdCacheRegion(java.lang.String regionName)
getCache() ->
CacheImplementor.getNaturalIdCacheRegionAccessStrategy(String) ->
NaturalIdRegionAccessStrategy.getRegion() instead.regionName - The name of the region to retrieve.@Deprecated default RegionAccessStrategy getNaturalIdCacheRegionAccessStrategy(java.lang.String regionName)
getCache() ->
CacheImplementor.getNaturalIdCacheRegionAccessStrategy(String) instead.regionName - The region name@Deprecated java.util.Map getAllSecondLevelCacheRegions()
getCache() reference
to access cache objects as needed.Region instances as the values.@Deprecated default QueryCache getQueryCache()
CacheImplementor.getDefaultQueryCache() instead@Deprecated default QueryCache getQueryCache(java.lang.String regionName)
CacheImplementor.getQueryCache(String) insteadregionName - the name of the cache region, or null for the default query cache@Deprecated default UpdateTimestampsCache getUpdateTimestampsCache()
CacheImplementor.getUpdateTimestampsCache() insteadCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.