The main contract here is the creation of 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.

evict

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.

Parameters:

persistentClass - The entity class for which to evict data.

Throws:

HibernateException - Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.

evict

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.

Parameters:

persistentClass - The entity class for which to evict data.

id - The entity id

Throws:

HibernateException - Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.

evictEntity

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.

Parameters:

entityName - The entity name for which to evict data.

Throws:

HibernateException - Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.

evictEntity

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.

Parameters:

entityName - The entity name for which to evict data.

id - The entity id

Throws:

HibernateException - Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.

evictCollection

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.

Parameters:

roleName - The name of the collection role whose regions should be evicted

Throws:

HibernateException - Generally will mean that either that
'roleName' did not name a mapped collection or a problem
communicating with underlying cache impl.

evictCollection

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.

Parameters:

roleName - The name of the collection role

id - The id of the collection owner

Throws:

HibernateException - Generally will mean that either that
'roleName' did not name a mapped collection or a problem
communicating with underlying cache impl.