Methods Summary |
---|
public void | close()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 Sessions before calling
close().
|
public void | evict(java.lang.Class persistentClass)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.
|
public void | evict(java.lang.Class persistentClass, java.io.Serializable id)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.
|
public void | evictCollection(java.lang.String roleName)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.
|
public void | evictCollection(java.lang.String roleName, java.io.Serializable id)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.
|
public void | evictEntity(java.lang.String entityName)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.
|
public void | evictEntity(java.lang.String entityName, java.io.Serializable id)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.
|
public void | evictQueries()Evict any query result sets cached in the default query cache region.
|
public void | evictQueries(java.lang.String cacheRegion)Evict any query result sets cached in the named query cache region.
|
public java.util.Map | getAllClassMetadata()Get all ClassMetadata as a Map from entityname String
to metadata object
|
public java.util.Map | getAllCollectionMetadata()Get all CollectionMetadata as a Map from role name
to metadata object
|
public org.hibernate.metadata.ClassMetadata | getClassMetadata(java.lang.Class persistentClass)Get the ClassMetadata associated with the given entity class
|
public org.hibernate.metadata.ClassMetadata | getClassMetadata(java.lang.String entityName)Get the ClassMetadata associated with the given entity name
|
public org.hibernate.metadata.CollectionMetadata | getCollectionMetadata(java.lang.String roleName)Get the CollectionMetadata associated with the named collection role
|
public org.hibernate.classic.Session | getCurrentSession()Obtains the current session. The definition of what exactly "current"
means controlled by the {@link org.hibernate.context.CurrentSessionContext} impl configured
for use.
Note that for backwards compatibility, if a {@link org.hibernate.context.CurrentSessionContext}
is not configured but a JTA {@link org.hibernate.transaction.TransactionManagerLookup}
is configured this will default to the {@link org.hibernate.context.JTASessionContext}
impl.
|
public java.util.Set | getDefinedFilterNames()Obtain a set of the names of all filters defined on this SessionFactory.
|
public org.hibernate.engine.FilterDefinition | getFilterDefinition(java.lang.String filterName)Obtain the definition of a filter by name.
|
public org.hibernate.stat.Statistics | getStatistics()Get the statistics for this session factory
|
public boolean | isClosed()Was this SessionFactory already closed?
|
public org.hibernate.classic.Session | openSession(java.sql.Connection connection)Open a Session on the given 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.
|
public org.hibernate.classic.Session | openSession(Interceptor interceptor)Create database connection and open a Session on it, specifying an
interceptor.
|
public org.hibernate.classic.Session | openSession(java.sql.Connection connection, Interceptor interceptor)Open a Session on the given connection, specifying an 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.
|
public org.hibernate.classic.Session | openSession()Create database connection and open a Session on it.
|
public StatelessSession | openStatelessSession()Get a new stateless session.
|
public StatelessSession | openStatelessSession(java.sql.Connection connection)Get a new stateless session for the given JDBC connection.
|