Deprecated
as a consequence of HibernateEntityManagerFactory being deprecated. See corresponding docs for further information.
Session instances. Usually
an application has a single SessionFactory instance and threads
servicing client requests obtain Session instances from this factory.
The internal state of a SessionFactory is immutable. Once it is created
this internal state is set. This internal state includes all of the metadata
about Object/Relational Mapping.
Implementors must be threadsafe.
org.hibernate.cfg.Configuration
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Redeclares javax. |
| public boolean | Returns: True if there is such a fetch profile; false otherwise.The name to check name)Determine if this session factory contains a fetch profile definition registered under the given name. |
| public Map | getAllClassMetadata()
Deprecated
Use the descriptors from
Retrieve the getMetamodel() instead
ClassMetadata for all mapped entities.
|
| public Map | Returns: a map from String to CollectionMetadata
Deprecated
Use the descriptors from
Get the getMetamodel() instead
CollectionMetadata for all mapped collections.
|
| public Cache | Returns: The direct cache access API.Redeclares javax. |
| public ClassMetadata | Returns: The metadata associated with the given entity; may be null if no such entity was mapped.The entity class entityClass)
Deprecated
Use the descriptors from
Retrieve the getMetamodel() instead
ClassMetadata associated with the given entity class.
|
| public ClassMetadata | Returns: The metadata associated with the given entity; may be null if no such entity was mapped.The entity class entityName)
Deprecated
Use the descriptors from
Retrieve the getMetamodel() instead
ClassMetadata associated with the given entity class.
|
| public CollectionMetadata | Returns: The metadata associated with the given collection; may be null if no such collection was mapped.The collection role (in form [owning-entity-name].[collection-property-name]). roleName)
Deprecated
Use the descriptors from
Get the getMetamodel() instead
CollectionMetadata associated with the named collection role.
|
| public Session | Returns: The current session.
Deprecated
as a consequence of
Obtains the current session.
Session being deprecated.
|
| public Set | Returns: The set of filter names.Obtain a set of the names of all filters defined on this SessionFactory. |
| public FilterDefinition | Returns: The filter definition.The name of the filter for which to obtain the definition. filterName)Obtain the definition of a filter by name. |
| public SessionFactoryOptions | Returns: The special options used to build the factory.Get the special options used to build the factory. |
| public Statistics | |
| public TypeHelper | |
| public boolean | Returns: True if this factory is already closed; false otherwise.Is this factory already closed? |
| public Session | Returns: The created session.
Deprecated
as a consequence of
Open a Session being deprecated.
Session.
|
| public StatelessSession | |
| public StatelessSession | Returns: The created stateless session.Connection provided by the application. connection)Open a new stateless session, utilizing the specified JDBC
|
| public SessionBuilder | |
| public StatelessSessionBuilder |
| close | back to summary |
|---|---|
| public void close() throws HibernateException Redeclares javax. Destroy this SessionFactory and release all resources (caches, connection pools, etc).
It is the responsibility of the application to ensure that there are no
open
No-ops if already
| |
| containsFetchProfileDefinition | back to summary |
|---|---|
| public boolean containsFetchProfileDefinition(String name) Determine if this session factory contains a fetch profile definition registered under the given name.
| |
| getAllClassMetadata | back to summary |
|---|---|
| public Map Deprecated Use the descriptors from Retrieve the
| |
| getAllCollectionMetadata | back to summary |
|---|---|
| public Map Deprecated Use the descriptors from Get the
| |
| getCache | back to summary |
|---|---|
| public Cache getCache() Redeclares javax. Obtain direct access to the underlying cache regions. | |
| getClassMetadata | back to summary |
|---|---|
| public ClassMetadata getClassMetadata(Class<T> entityClass)
Deprecated Use the descriptors from Retrieve the
| |
| getClassMetadata | back to summary |
|---|---|
| public ClassMetadata getClassMetadata(String entityName)
Deprecated Use the descriptors from Retrieve the
| |
| getCollectionMetadata | back to summary |
|---|---|
| public CollectionMetadata getCollectionMetadata(String roleName)
Deprecated Use the descriptors from Get the
| |
| getCurrentSession | back to summary |
|---|---|
| public Session getCurrentSession() throws HibernateException
Deprecated as a consequence of Obtains the current session. The definition of what exactly "current"
means controlled by the
Note that for backwards compatibility, if a
| |
| getDefinedFilterNames | back to summary |
|---|---|
| public Set Obtain a set of the names of all filters defined on this SessionFactory.
| |
| getFilterDefinition | back to summary |
|---|---|
| public FilterDefinition getFilterDefinition(String filterName) throws HibernateException Obtain the definition of a filter by name.
| |
| getSessionFactoryOptions | back to summary |
|---|---|
| public SessionFactoryOptions getSessionFactoryOptions() Get the special options used to build the factory.
| |
| getStatistics | back to summary |
|---|---|
| public Statistics getStatistics() Retrieve the statistics for this factory.
| |
| getTypeHelper | back to summary |
|---|---|
| public TypeHelper getTypeHelper() Retrieve this factory's
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Is this factory already closed?
| |
| openSession | back to summary |
|---|---|
| public Session openSession() throws HibernateException
Deprecated as a consequence of Open a
JDBC
| |
| openStatelessSession | back to summary |
|---|---|
| public StatelessSession openStatelessSession() Open a new stateless session.
| |
| openStatelessSession | back to summary |
|---|---|
| public StatelessSession openStatelessSession(Connection connection) Open a new stateless session, utilizing the specified JDBC
| |
| withOptions | back to summary |
|---|---|
| public SessionBuilder Obtain a
| |
| withStatelessOptions | back to summary |
|---|---|
| public StatelessSessionBuilder Obtain a
| |