java.lang.Object | |
↳ | org.hibernate.impl.SessionFactoryImpl |
Concrete implementation of the SessionFactory interface. Has the following responsibilities
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Closes the session factory, releasing all held resources.
| |||||||||||
Determine if this session factory contains a fetch profile definition
registered under the given name.
| |||||||||||
Evict an entry from the second-level cache.
| |||||||||||
Evict all entries from the second-level cache.
| |||||||||||
Evict all entries from the second-level cache.
| |||||||||||
Evict an entry from the second-level cache.
| |||||||||||
Evict an entry from the second-level cache.
| |||||||||||
Evict all entries from the second-level cache.
| |||||||||||
Evict any query result sets cached in the default query cache region.
| |||||||||||
Evict any query result sets cached in the named query cache region.
| |||||||||||
Retrieve the
ClassMetadata for all mapped entities. | |||||||||||
Get the
CollectionMetadata for all mapped collections | |||||||||||
Get a map of all the second level cache regions currently maintained in
this session factory.
| |||||||||||
Obtain direct access to the underlying cache regions.
| |||||||||||
Retrieve the
ClassMetadata associated with the given entity class. | |||||||||||
Retrieve the
ClassMetadata associated with the given entity class. | |||||||||||
Get the
CollectionMetadata associated with the named collection role. | |||||||||||
Get the persister object for a collection role.
| |||||||||||
Retrieves a set of all the collection roles in which the given entity
is a participant, as either an index or an element.
| |||||||||||
Get the connection provider
| |||||||||||
Obtains the current session.
| |||||||||||
Obtain a set of the names of all filters defined on this SessionFactory.
| |||||||||||
Get the SQL dialect.
| |||||||||||
Get the persister for the named entity
| |||||||||||
Return the SessionFactoryObserver attached to the SessionFactory if any
| |||||||||||
Retrieve fetch profile by name.
| |||||||||||
Obtain the definition of a filter by name.
| |||||||||||
Get the identifier generator for the hierarchy
| |||||||||||
Allow access to the id generator factory, though this is only needed/allowed from configuration.@return
| |||||||||||
Return the names of all persistent (mapped) classes that extend or implement the
given class or interface, accounting for implicit/explicit polymorphism settings
and excluding mapped subclasses/joined-subclasses of other classes in the result.
| |||||||||||
Get a class name, using query language imports
| |||||||||||
Get the factory scoped interceptor for this factory.
| |||||||||||
Get a copy of the Properties used to configure this session factory.
| |||||||||||
Get the default query cache
| |||||||||||
Get a particular named query cache, or the default cache
| |||||||||||
Get the return aliases of a query
| |||||||||||
Get the return types of a query
| |||||||||||
Retrieves the SQLExceptionConverter in effect for this SessionFactory.
| |||||||||||
Get a named second-level cache region
| |||||||||||
Retrieve the statistics fopr this factory.
| |||||||||||
Statistics SPI
| |||||||||||
Get the JTA transaction manager
| |||||||||||
Retrieve this factory's
TypeHelper | |||||||||||
Retrieve the
Type resolver associated with this factory. | |||||||||||
Get the cache of table update timestamps
| |||||||||||
Is this factory already closed?
| |||||||||||
Open a session conforming to the given parameters.
| |||||||||||
Open a
Session , utilizing the specfied JDBC Connection . | |||||||||||
Open a
Session . | |||||||||||
Open a
Session , utilizing the specified Interceptor . | |||||||||||
Open a new stateless session, utilizing the specified JDBC
Connection . | |||||||||||
Open a new stateless session.
| |||||||||||
Get a nontransactional "current" session for Hibernate EntityManager
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
javax.naming.Referenceable
| |||||||||||
From interface
org.hibernate.SessionFactory
| |||||||||||
From interface
org.hibernate.engine.Mapping
| |||||||||||
From interface
org.hibernate.engine.SessionFactoryImplementor
|
HibernateException |
---|
Closes the session factory, releasing all held resources.
HibernateException |
---|
Determine if this session factory contains a fetch profile definition registered under the given name.
name | The name to check |
---|
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
persistentClass | The entity class for which to evict data. |
---|---|
id | The entity id |
HibernateException |
---|
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
persistentClass | The entity class for which to evict data. |
---|
HibernateException |
---|
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
roleName | The name of the collection role whose regions should be evicted |
---|
HibernateException |
---|
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
roleName | The name of the collection role |
---|---|
id | The id of the collection owner |
HibernateException |
---|
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
entityName | The entity name for which to evict data. |
---|---|
id | The entity id |
HibernateException |
---|
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.
entityName | The entity name for which to evict data. |
---|
HibernateException |
---|
Evict any query result sets cached in the default query cache region.
HibernateException |
---|
Evict any query result sets cached in the named query cache region.
regionName | The named query cache region from which to evict. |
---|
HibernateException |
---|
Retrieve the ClassMetadata
for all mapped entities.
ClassMetadata
keyed by the
corresponding String
entity-name.HibernateException |
---|
Get the CollectionMetadata
for all mapped collections
HibernateException |
---|
Get a map of all the second level cache regions currently maintained in
this session factory. The map is structured with the region name as the
key and the Region
instances as the values.
Obtain direct access to the underlying cache regions.
Retrieve the ClassMetadata
associated with the given entity class.
persistentClass | The entity class |
---|
HibernateException |
---|
Retrieve the ClassMetadata
associated with the given entity class.
entityName | The entity class |
---|
HibernateException |
---|
Get the CollectionMetadata
associated with the named collection role.
roleName | The collection role (in form [owning-entity-name].[collection-property-name]). |
---|
HibernateException |
---|
Get the persister object for a collection role.
role | The role (name) of the collection for which to retrieve the persister. |
---|
MappingException |
---|
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. |
---|
Obtains the current session. The definition of what exactly "current"
means controlled by the CurrentSessionContext
impl configured
for use.
CurrentSessionContext
is not configured but a JTA TransactionManagerLookup
is configured this will default to the JTASessionContext
impl.HibernateException |
---|
Obtain a set of the names of all filters defined on this SessionFactory.
Get the persister for the named entity
entityName | The name of the entity for which to retrieve the persister. |
---|
MappingException |
---|
Return the SessionFactoryObserver attached to the SessionFactory if any
Retrieve fetch profile by name.
name | The name of the profile to retrieve. |
---|
Obtain the definition of a filter by name.
filterName | The name of the filter for which to obtain the definition. |
---|
HibernateException |
---|
Get the identifier generator for the hierarchy
Allow access to the id generator factory, though this is only needed/allowed from configuration.@return
Return the names of all persistent (mapped) classes that extend or implement the given class or interface, accounting for implicit/explicit polymorphism settings and excluding mapped subclasses/joined-subclasses of other classes in the result.
MappingException |
---|
Get a class name, using query language imports
Get the factory scoped interceptor for this factory.
Get a copy of the Properties used to configure this session factory.
Get a particular named query cache, or the default cache
regionName | the name of the cache region, or null for the default query cache |
---|
HibernateException |
---|
MappingException |
---|
Get the return aliases of a query
HibernateException |
---|
Get the return types of a query
HibernateException |
---|
Retrieves the SQLExceptionConverter in effect for this SessionFactory.
Get a named second-level cache region
regionName | The name of the region to retrieve. |
---|
Retrieve the statistics fopr this factory.
Get the JTA transaction manager
Retrieve this factory's TypeHelper
TypeHelper
Retrieve the Type
resolver associated with this factory.
Is this factory already closed?
Open a session conforming to the given parameters. Used mainly by
JTASessionContext
for current session processing.
connection | The external jdbc connection to use, if one (i.e., optional). |
---|---|
flushBeforeCompletionEnabled | Should the session be auto-flushed prior to transaction completion? |
autoCloseSessionEnabled | Should the session be auto-closed after transaction completion? |
connectionReleaseMode | The release mode for managed jdbc connections. |
HibernateException |
---|
Open a Session
, utilizing the specfied JDBC Connection
.
Note that the second-level cache will be disabled if you supply a JDBC
connection. Hibernate will not be able to track any statements you might
have executed in the same transaction. Consider implementing your own
ConnectionProvider
instead as a highly
recommended alternative.
connection | a connection provided by the application. |
---|
Open a Session
, utilizing the specfied JDBC Connection
and
specified Interceptor
.
Note that the second-level cache will be disabled if you supply a JDBC
connection. Hibernate will not be able to track any statements you might
have executed in the same transaction. Consider implementing your own
ConnectionProvider
instead as a highly
recommended alternative.
connection | a connection provided by the application. |
---|---|
sessionLocalInterceptor | a session-scoped interceptor |
Open a Session
.
connection(s
will be obtained from the
configured ConnectionProvider
as needed
to perform requested work.HibernateException |
---|
Open a Session
, utilizing the specified Interceptor
.
connection(s
will be obtained from the
configured ConnectionProvider
as needed
to perform requested work.sessionLocalInterceptor | a session-scoped interceptor |
---|
HibernateException |
---|
Open a new stateless session, utilizing the specified JDBC
Connection
.
connection | Connection provided by the application. |
---|
Open a new stateless session.
Get a nontransactional "current" session for Hibernate EntityManager
HibernateException |
---|