接口 SessionFactoryImplementor
-
- 所有超级接口:
AutoCloseable,Closeable,javax.persistence.EntityManagerFactory,HibernateEntityManagerFactory,Mapping,QueryParameterBindingTypeResolver,Referenceable,Serializable,SessionFactory
public interface SessionFactoryImplementor extends Mapping, SessionFactory, QueryParameterBindingTypeResolver
Defines the internal contract between the SessionFactory and other parts of Hibernate such as implementors of Type.- 作者:
- Gavin King, Steve Ebersole
- 另请参阅:
SessionFactory,SessionFactoryImpl
-
-
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static interfaceSessionFactoryImplementor.DeserializationResolver<T extends SessionFactoryImplementor>Contract for resolving this SessionFactory on deserialization
-
方法概要
-
从接口继承的方法 javax.persistence.EntityManagerFactory
addNamedEntityGraph, addNamedQuery, createEntityManager, createEntityManager, createEntityManager, createEntityManager, getCriteriaBuilder, getPersistenceUnitUtil, getProperties, isOpen, unwrap
-
从接口继承的方法 org.hibernate.jpa.HibernateEntityManagerFactory
getEntityManagerFactoryName, getEntityTypeByName, getSessionFactory
-
从接口继承的方法 org.hibernate.engine.spi.Mapping
getIdentifierGeneratorFactory, getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
-
从接口继承的方法 org.hibernate.query.spi.QueryParameterBindingTypeResolver
resolveParameterBindType, resolveParameterBindType
-
从接口继承的方法 javax.naming.Referenceable
getReference
-
从接口继承的方法 org.hibernate.SessionFactory
close, containsFetchProfileDefinition, getAllClassMetadata, getAllCollectionMetadata, getClassMetadata, getClassMetadata, getCollectionMetadata, getCurrentSession, getDefinedFilterNames, getFilterDefinition, getSessionFactoryOptions, getTypeHelper, isClosed, openSession, openStatelessSession, openStatelessSession, withStatelessOptions
-
-
-
-
方法详细资料
-
getUuid
String getUuid()
Get the UUID for this SessionFactory. The value is generated as aUUID, but kept as a String.- 返回:
- The UUID for this SessionFactory.
- 另请参阅:
SessionFactoryRegistry.getSessionFactory(java.lang.String)
-
getName
String getName()
Access to the name (if one) assigned to the SessionFactory- 返回:
- The name for the SessionFactory
-
withOptions
SessionBuilderImplementor withOptions()
从接口复制的说明:SessionFactoryObtain aSessionbuilder.- 指定者:
withOptions在接口中SessionFactory- 返回:
- The session builder
-
openTemporarySession
Session openTemporarySession() throws HibernateException
Get a non-transactional "current" session (used by hibernate-envers)
-
getCache
CacheImplementor getCache()
从接口复制的说明:SessionFactoryObtain direct access to the underlying cache regions.- 指定者:
getCache在接口中javax.persistence.EntityManagerFactory- 指定者:
getCache在接口中SessionFactory- 返回:
- The direct cache access API.
-
getStatistics
StatisticsImplementor getStatistics()
从接口复制的说明:SessionFactoryRetrieve the statistics for this factory.- 指定者:
getStatistics在接口中SessionFactory- 返回:
- The statistics.
-
getServiceRegistry
ServiceRegistryImplementor getServiceRegistry()
Access to the ServiceRegistry for this SessionFactory.- 返回:
- The factory's ServiceRegistry
-
getInterceptor
@Deprecated Interceptor getInterceptor()
已过时。(since 5.2) if access to the SessionFactory-scoped Interceptor is needed, useSessionFactoryOptions.getInterceptor()instead. However, generally speaking this access is not needed.Get the factory scoped interceptor for this factory.- 返回:
- The factory scope interceptor, or null if none.
-
getQueryPlanCache
@Deprecated QueryPlanCache getQueryPlanCache()
已过时。(since 5.2) it will be replaced with the new QueryEngine concept introduced in 6.0Access to the caches of HQL/JPQL and native query plans.- 返回:
- The query plan cache
-
getNamedQueryRepository
@Deprecated NamedQueryRepository getNamedQueryRepository()
已过时。(since 5.2) it will be replaced with the new QueryEngine concept introduced in 6.0Provides access to the named query repository- 返回:
- The repository for named query definitions
-
getFetchProfile
FetchProfile getFetchProfile(String name)
Retrieve fetch profile by name.- 参数:
name- The name of the profile to retrieve.- 返回:
- The profile definition
-
getTypeResolver
@Deprecated TypeResolver getTypeResolver()
已过时。(since 5.2) No replacement, access to and handling of Types will be much different in 6.0Retrieve theTyperesolver associated with this factory.- 返回:
- The type resolver
-
getIdentifierGenerator
IdentifierGenerator getIdentifierGenerator(String rootEntityName)
Get the identifier generator for the hierarchy
-
getEntityNotFoundDelegate
EntityNotFoundDelegate getEntityNotFoundDelegate()
-
getSqlFunctionRegistry
SQLFunctionRegistry getSqlFunctionRegistry()
-
addObserver
void addObserver(SessionFactoryObserver observer)
-
getCustomEntityDirtinessStrategy
CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
-
getCurrentTenantIdentifierResolver
CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
-
iterateEntityNameResolvers
@Deprecated default Iterable<EntityNameResolver> iterateEntityNameResolvers()
已过时。(since 5.2) usegetMetamodel()->MetamodelImplementor.getEntityNameResolvers()
-
getDeserializationResolver
SessionFactoryImplementor.DeserializationResolver getDeserializationResolver()
-
getReturnTypes
@Deprecated default Type[] getReturnTypes(String queryString)
已过时。No replacement.Get the return types of a query
-
getReturnAliases
@Deprecated default String[] getReturnAliases(String queryString)
已过时。No replacement.Get the return aliases of a query
-
getStatisticsImplementor
@Deprecated default StatisticsImplementor getStatisticsImplementor()
已过时。(since 5.2) Just usegetStatistics()(with covariant return here asStatisticsImplementor).
-
getNamedQuery
@Deprecated default NamedQueryDefinition getNamedQuery(String queryName)
已过时。(since 5.2) UseNamedQueryRepository.getNamedQueryDefinition(java.lang.String)instead.
-
registerNamedQueryDefinition
@Deprecated default void registerNamedQueryDefinition(String name, NamedQueryDefinition definition)
已过时。
-
getNamedSQLQuery
@Deprecated default NamedSQLQueryDefinition getNamedSQLQuery(String queryName)
已过时。(since 5.2) UseNamedQueryRepository.getNamedSQLQueryDefinition(java.lang.String)instead.
-
registerNamedSQLQueryDefinition
@Deprecated default void registerNamedSQLQueryDefinition(String name, NamedSQLQueryDefinition definition)
已过时。
-
getResultSetMapping
@Deprecated default ResultSetMappingDefinition getResultSetMapping(String name)
已过时。(since 5.2) UseNamedQueryRepository.getResultSetMappingDefinition(java.lang.String)instead.
-
getJdbcServices
JdbcServices getJdbcServices()
Get the JdbcServices.- 返回:
- the JdbcServices
-
getDialect
@Deprecated default Dialect getDialect()
已过时。(since 5.2) instead, useJdbcServices.getDialect()Get the SQL dialect. Shorthand forgetJdbcServices().getDialect()- 返回:
- The dialect
-
getSQLExceptionConverter
@Deprecated default SQLExceptionConverter getSQLExceptionConverter()
已过时。since 5.0; useJdbcServices.getSqlExceptionHelper()->SqlExceptionHelper.getSqlExceptionConverter()instead as obtained fromgetServiceRegistry()Retrieves the SQLExceptionConverter in effect for this SessionFactory.- 返回:
- The SQLExceptionConverter for this SessionFactory.
-
getSQLExceptionHelper
@Deprecated default SqlExceptionHelper getSQLExceptionHelper()
已过时。since 5.0; useJdbcServices.getSqlExceptionHelper()instead as obtained fromgetServiceRegistry()Retrieves the SqlExceptionHelper in effect for this SessionFactory.- 返回:
- The SqlExceptionHelper for this SessionFactory.
-
getSettings
@Deprecated Settings getSettings()
已过时。since 5.0; useSessionFactory.getSessionFactoryOptions()instead
-
getMetamodel
MetamodelImplementor getMetamodel()
- 指定者:
getMetamodel在接口中javax.persistence.EntityManagerFactory- 指定者:
getMetamodel在接口中HibernateEntityManagerFactory
-
findEntityGraphsByType
default <T> List<javax.persistence.EntityGraph<? super T>> findEntityGraphsByType(Class<T> entityClass)
从接口复制的说明:HibernateEntityManagerFactoryFind allEntityGraphs associated with a given entity type.- 指定者:
findEntityGraphsByType在接口中HibernateEntityManagerFactory- 参数:
entityClass- the entity type for which to find allEntityGraphs.- 返回:
- A list of
EntityGraphinstances associated with the given entity type. The empty list is returned in case there are not entity graphs.
-
findEntityGraphsByJavaType
<T> List<RootGraphImplementor<? super T>> findEntityGraphsByJavaType(Class<T> entityClass)
-
findEntityGraphByName
RootGraphImplementor<?> findEntityGraphByName(String name)
-
getEntityPersister
@Deprecated default EntityPersister getEntityPersister(String entityName) throws MappingException
已过时。(since 5.2) UseMetamodelImplementor.entityPersister(Class)instead.- 抛出:
MappingException
-
getEntityPersisters
@Deprecated default Map<String,EntityPersister> getEntityPersisters()
已过时。(since 5.2) UseMetamodelImplementor.entityPersisters()instead.
-
getCollectionPersister
@Deprecated default CollectionPersister getCollectionPersister(String role) throws MappingException
已过时。(since 5.2) UseMetamodelImplementor.collectionPersister(String)instead.- 抛出:
MappingException
-
getCollectionPersisters
@Deprecated default Map<String,CollectionPersister> getCollectionPersisters()
已过时。(since 5.2) UseMetamodelImplementor.collectionPersisters()instead.
-
getCollectionRolesByEntityParticipant
@Deprecated default Set<String> getCollectionRolesByEntityParticipant(String entityName)
已过时。(since 5.2) UseMetamodelImplementor.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.- 返回:
- set of all the collection roles in which the given entityName participates.
-
locateEntityPersister
@Deprecated default EntityPersister locateEntityPersister(Class byClass)
已过时。(since 5.2) UseMetamodelImplementor.locateEntityPersister(Class)instead.
-
locateEntityPersister
@Deprecated default EntityPersister locateEntityPersister(String byName)
已过时。(since 5.2) UseMetamodelImplementor.locateEntityPersister(String)instead.
-
getImplementors
@Deprecated default String[] getImplementors(String entityName)
已过时。UseMetamodel.getImplementors(java.lang.String)insteadGet the names of all persistent classes that implement/extend the given interface/class
-
getImportedClassName
@Deprecated default String getImportedClassName(String name)
已过时。UseMetamodel.getImportedClassName(java.lang.String)insteadGet a class name, using query language imports
-
-