public interface SessionFactoryImplementor extends Mapping, SessionFactory
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) |
Map |
getAllSecondLevelCacheRegions()
Get a map of all the second level cache regions currently maintained in
this session factory.
|
CollectionPersister |
getCollectionPersister(String role)
Get the persister object for a collection role.
|
Map<String,CollectionPersister> |
getCollectionPersisters()
Get all collection persisters as a Map, which collection role as the key and the persister is the value.
|
Set<String> |
getCollectionRolesByEntityParticipant(String entityName)
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() |
Dialect |
getDialect()
Get the SQL dialect.
|
EntityNotFoundDelegate |
getEntityNotFoundDelegate() |
EntityPersister |
getEntityPersister(String entityName)
Get the persister for the named entity
|
Map<String,EntityPersister> |
getEntityPersisters()
Get all entity persisters as a Map, which entity name its the key and the persister is the value.
|
FetchProfile |
getFetchProfile(String name)
Retrieve fetch profile by name.
|
IdentifierGenerator |
getIdentifierGenerator(String rootEntityName)
Get the identifier generator for the hierarchy
|
String[] |
getImplementors(String className)
Get the names of all persistent classes that implement/extend the given interface/class
|
String |
getImportedClassName(String name)
Get a class name, using query language imports
|
Interceptor |
getInterceptor()
Get the factory scoped interceptor for this factory.
|
JdbcServices |
getJdbcServices()
Deprecated.
since 5.0; use
getServiceRegistry() instead to locate the JdbcServices |
NamedQueryDefinition |
getNamedQuery(String queryName) |
NamedQueryRepository |
getNamedQueryRepository()
Provides access to the named query repository
|
NamedSQLQueryDefinition |
getNamedSQLQuery(String queryName) |
Region |
getNaturalIdCacheRegion(String regionName)
Get a named naturalId cache region
|
RegionAccessStrategy |
getNaturalIdCacheRegionAccessStrategy(String regionName)
Get access strategy to naturalId cache region
|
Properties |
getProperties()
Get a copy of the Properties used to configure this session factory.
|
QueryCache |
getQueryCache()
Get the default query cache
|
QueryCache |
getQueryCache(String regionName)
Get a particular named query cache, or the default cache
|
QueryPlanCache |
getQueryPlanCache() |
ResultSetMappingDefinition |
getResultSetMapping(String name) |
String[] |
getReturnAliases(String queryString)
Get the return aliases of a query
|
Type[] |
getReturnTypes(String queryString)
Get the return types of a query
|
Region |
getSecondLevelCacheRegion(String regionName)
Get a named second-level cache region
|
RegionAccessStrategy |
getSecondLevelCacheRegionAccessStrategy(String regionName)
Get access strategy to second-level cache region
|
ServiceRegistryImplementor |
getServiceRegistry() |
Settings |
getSettings()
Deprecated.
since 5.0; use
SessionFactory.getSessionFactoryOptions() instead |
SQLExceptionConverter |
getSQLExceptionConverter()
Deprecated.
since 5.0; use
JdbcServices.getSqlExceptionHelper() ->
SqlExceptionHelper.getSqlExceptionConverter() instead as obtained from getServiceRegistry() |
SqlExceptionHelper |
getSQLExceptionHelper()
Deprecated.
since 5.0; use
JdbcServices.getSqlExceptionHelper() instead as
obtained from getServiceRegistry() |
SQLFunctionRegistry |
getSqlFunctionRegistry() |
StatisticsImplementor |
getStatisticsImplementor()
Statistics SPI
|
TypeResolver |
getTypeResolver()
Retrieve the
Type resolver associated with this factory. |
UpdateTimestampsCache |
getUpdateTimestampsCache()
Get the cache of table update timestamps
|
Iterable<EntityNameResolver> |
iterateEntityNameResolvers() |
EntityPersister |
locateEntityPersister(Class byClass)
Locate an EntityPersister by the entity class.
|
EntityPersister |
locateEntityPersister(String byName)
Locate the entity persister by name.
|
Session |
openTemporarySession()
Get a non-transactional "current" session for Hibernate EntityManager
|
void |
registerNamedQueryDefinition(String name,
NamedQueryDefinition definition) |
void |
registerNamedSQLQueryDefinition(String name,
NamedSQLQueryDefinition definition) |
SessionBuilderImplementor |
withOptions()
Obtain a
Session builder. |
getIdentifierGeneratorFactory, getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
close, containsFetchProfileDefinition, getAllClassMetadata, getAllCollectionMetadata, getCache, getClassMetadata, getClassMetadata, getCollectionMetadata, getCurrentSession, getDefinedFilterNames, getFilterDefinition, getSessionFactoryOptions, getStatistics, getTypeHelper, isClosed, openSession, openStatelessSession, openStatelessSession, withStatelessOptions
getReference
SessionBuilderImplementor withOptions()
SessionFactory
Session
builder.withOptions
in interface SessionFactory
TypeResolver getTypeResolver()
Type
resolver associated with this factory.Properties getProperties()
EntityPersister getEntityPersister(String entityName) throws MappingException
entityName
- The name of the entity for which to retrieve the persister.MappingException
- Indicates persister could not be found with that name.Map<String,EntityPersister> getEntityPersisters()
CollectionPersister getCollectionPersister(String role) throws MappingException
role
- The role (name) of the collection for which to retrieve the
persister.MappingException
- Indicates persister could not be found with that role.Map<String,CollectionPersister> getCollectionPersisters()
@Deprecated JdbcServices getJdbcServices()
getServiceRegistry()
instead to locate the JdbcServicesDialect getDialect()
getJdbcServices().getDialect()
Interceptor getInterceptor()
QueryPlanCache getQueryPlanCache()
Type[] getReturnTypes(String queryString) throws HibernateException
HibernateException
String[] getReturnAliases(String queryString) throws HibernateException
HibernateException
String[] getImplementors(String className) throws MappingException
MappingException
String getImportedClassName(String name)
QueryCache getQueryCache()
QueryCache getQueryCache(String regionName) throws HibernateException
regionName
- the name of the cache region, or null for the default query cacheHibernateException
UpdateTimestampsCache getUpdateTimestampsCache()
StatisticsImplementor getStatisticsImplementor()
NamedQueryDefinition getNamedQuery(String queryName)
void registerNamedQueryDefinition(String name, NamedQueryDefinition definition)
NamedSQLQueryDefinition getNamedSQLQuery(String queryName)
void registerNamedSQLQueryDefinition(String name, NamedSQLQueryDefinition definition)
ResultSetMappingDefinition getResultSetMapping(String name)
IdentifierGenerator getIdentifierGenerator(String rootEntityName)
Region getSecondLevelCacheRegion(String regionName)
regionName
- The name of the region to retrieve.RegionAccessStrategy getSecondLevelCacheRegionAccessStrategy(String regionName)
regionName
- Region getNaturalIdCacheRegion(String regionName)
regionName
- The name of the region to retrieve.RegionAccessStrategy getNaturalIdCacheRegionAccessStrategy(String regionName)
regionName
- Map getAllSecondLevelCacheRegions()
Region
instances as the values.@Deprecated SQLExceptionConverter getSQLExceptionConverter()
JdbcServices.getSqlExceptionHelper()
->
SqlExceptionHelper.getSqlExceptionConverter()
instead as obtained from getServiceRegistry()
@Deprecated SqlExceptionHelper getSQLExceptionHelper()
JdbcServices.getSqlExceptionHelper()
instead as
obtained from getServiceRegistry()
@Deprecated Settings getSettings()
SessionFactory.getSessionFactoryOptions()
insteadSession openTemporarySession() throws HibernateException
HibernateException
Set<String> getCollectionRolesByEntityParticipant(String entityName)
entityName
- The entity name for which to get the collection roles.EntityNotFoundDelegate getEntityNotFoundDelegate()
SQLFunctionRegistry getSqlFunctionRegistry()
FetchProfile getFetchProfile(String name)
name
- The name of the profile to retrieve.ServiceRegistryImplementor getServiceRegistry()
void addObserver(SessionFactoryObserver observer)
CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
NamedQueryRepository getNamedQueryRepository()
Iterable<EntityNameResolver> iterateEntityNameResolvers()
EntityPersister locateEntityPersister(Class byClass)
byClass
- The concrete Class or proxy interface for the entity to locate the persister for.null
UnknownEntityTypeException
- If a matching EntityPersister cannot be locatedEntityPersister locateEntityPersister(String byName)
byName
- The entity namenull
UnknownEntityTypeException
- If a matching EntityPersister cannot be locatedSessionFactoryImplementor.DeserializationResolver getDeserializationResolver()
Copyright © 2016 JBoss by Red Hat. All rights reserved.