|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.jmx.SessionFactoryStub
@Deprecated public class SessionFactoryStub
A flyweight for SessionFactory. If the MBean itself does not have classpath to the persistent classes, then a stub will be registered with JNDI and the actual SessionFactoryImpl built upon first access.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.hibernate.SessionFactory |
---|
SessionFactory.SessionFactoryOptions |
Method Summary | |
---|---|
void |
close()
Deprecated. Destroy this SessionFactory and release all resources (caches, connection pools, etc). |
boolean |
containsFetchProfileDefinition(String name)
Deprecated. Determine if this session factory contains a fetch profile definition registered under the given name. |
void |
evict(Class persistentClass)
Deprecated. Evict all entries from the second-level cache. |
void |
evict(Class persistentClass,
Serializable id)
Deprecated. Evict an entry from the second-level cache. |
void |
evictCollection(String roleName)
Deprecated. Evict all entries from the second-level cache. |
void |
evictCollection(String roleName,
Serializable id)
Deprecated. Evict an entry from the second-level cache. |
void |
evictEntity(String entityName)
Deprecated. Evict all entries from the second-level cache. |
void |
evictEntity(String entityName,
Serializable id)
Deprecated. Evict an entry from the second-level cache. |
void |
evictQueries()
Deprecated. Evict any query result sets cached in the default query cache region. |
void |
evictQueries(String cacheRegion)
Deprecated. Evict any query result sets cached in the named query cache region. |
Map<String,ClassMetadata> |
getAllClassMetadata()
Deprecated. Retrieve the ClassMetadata for all mapped entities. |
Map |
getAllCollectionMetadata()
Deprecated. Get the CollectionMetadata for all mapped collections |
Cache |
getCache()
Deprecated. Obtain direct access to the underlying cache regions. |
ClassMetadata |
getClassMetadata(Class persistentClass)
Deprecated. Retrieve the ClassMetadata associated with the given entity class. |
ClassMetadata |
getClassMetadata(String entityName)
Deprecated. Retrieve the ClassMetadata associated with the given entity class. |
CollectionMetadata |
getCollectionMetadata(String roleName)
Deprecated. Get the CollectionMetadata associated with the named collection role. |
Session |
getCurrentSession()
Deprecated. Obtains the current session. |
Set |
getDefinedFilterNames()
Deprecated. Obtain a set of the names of all filters defined on this SessionFactory. |
FilterDefinition |
getFilterDefinition(String filterName)
Deprecated. Obtain the definition of a filter by name. |
Reference |
getReference()
Deprecated. |
SessionFactory.SessionFactoryOptions |
getSessionFactoryOptions()
Deprecated. |
Statistics |
getStatistics()
Deprecated. Retrieve the statistics fopr this factory. |
TypeHelper |
getTypeHelper()
Deprecated. Retrieve this factory's TypeHelper |
boolean |
isClosed()
Deprecated. Is this factory already closed? |
Session |
openSession()
Deprecated. Open a Session . |
StatelessSession |
openStatelessSession()
Deprecated. Open a new stateless session. |
StatelessSession |
openStatelessSession(Connection conn)
Deprecated. Open a new stateless session, utilizing the specified JDBC Connection . |
SessionBuilder |
withOptions()
Deprecated. Obtain a Session builder. |
StatelessSessionBuilder |
withStatelessOptions()
Deprecated. Obtain a StatelessSession builder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public SessionFactory.SessionFactoryOptions getSessionFactoryOptions()
getSessionFactoryOptions
in interface SessionFactory
public SessionBuilder withOptions()
SessionFactory
Session
builder.
withOptions
in interface SessionFactory
public Session openSession() throws HibernateException
SessionFactory
Session
.
JDBC connection(s
will be obtained from the
configured ConnectionProvider
as needed
to perform requested work.
openSession
in interface SessionFactory
HibernateException
- Indicates a problem opening the session; pretty rare here.public Session getCurrentSession()
SessionFactory
CurrentSessionContext
impl configured
for use.
Note that for backwards compatibility, if a CurrentSessionContext
is not configured but JTA is configured this will default to the JTASessionContext
impl.
getCurrentSession
in interface SessionFactory
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
Referenceable.getReference()
public ClassMetadata getClassMetadata(Class persistentClass) throws HibernateException
SessionFactory
ClassMetadata
associated with the given entity class.
getClassMetadata
in interface SessionFactory
persistentClass
- The entity class
HibernateException
- Generally null is returned instead of throwing.public ClassMetadata getClassMetadata(String entityName) throws HibernateException
SessionFactory
ClassMetadata
associated with the given entity class.
getClassMetadata
in interface SessionFactory
entityName
- The entity class
HibernateException
- Generally null is returned instead of throwing.public CollectionMetadata getCollectionMetadata(String roleName) throws HibernateException
SessionFactory
CollectionMetadata
associated with the named collection role.
getCollectionMetadata
in interface SessionFactory
roleName
- The collection role (in form [owning-entity-name].[collection-property-name]).
HibernateException
- Generally null is returned instead of throwing.public Map<String,ClassMetadata> getAllClassMetadata() throws HibernateException
SessionFactory
ClassMetadata
for all mapped entities.
getAllClassMetadata
in interface SessionFactory
ClassMetadata
keyed by the
corresponding String
entity-name.
HibernateException
- Generally empty map is returned instead of throwing.public Map getAllCollectionMetadata() throws HibernateException
SessionFactory
CollectionMetadata
for all mapped collections
getAllCollectionMetadata
in interface SessionFactory
HibernateException
- Generally empty map is returned instead of throwing.public void close() throws HibernateException
SessionFactory
sessions
before calling this method as the impact
on those sessions
is indeterminate.
No-ops if already closed
.
close
in interface SessionFactory
HibernateException
- Indicates an issue closing the factory.public boolean isClosed()
SessionFactory
isClosed
in interface SessionFactory
public Cache getCache()
SessionFactory
getCache
in interface SessionFactory
public void evict(Class persistentClass, Serializable id) throws HibernateException
SessionFactory
evict
in interface SessionFactory
persistentClass
- The entity class for which to evict data.id
- The entity id
HibernateException
- Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.public void evict(Class persistentClass) throws HibernateException
SessionFactory
evict
in interface SessionFactory
persistentClass
- The entity class for which to evict data.
HibernateException
- Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.public void evictEntity(String entityName, Serializable id) throws HibernateException
SessionFactory
evictEntity
in interface SessionFactory
entityName
- The entity name for which to evict data.id
- The entity id
HibernateException
- Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.public void evictEntity(String entityName) throws HibernateException
SessionFactory
evictEntity
in interface SessionFactory
entityName
- The entity name for which to evict data.
HibernateException
- Generally will mean that either that
'persisttentClass' did not name a mapped entity or a problem
communicating with underlying cache impl.public void evictCollection(String roleName, Serializable id) throws HibernateException
SessionFactory
evictCollection
in interface SessionFactory
roleName
- The name of the collection roleid
- The id of the collection owner
HibernateException
- Generally will mean that either that
'roleName' did not name a mapped collection or a problem
communicating with underlying cache impl.public void evictCollection(String roleName) throws HibernateException
SessionFactory
evictCollection
in interface SessionFactory
roleName
- The name of the collection role whose regions should be evicted
HibernateException
- Generally will mean that either that
'roleName' did not name a mapped collection or a problem
communicating with underlying cache impl.public void evictQueries() throws HibernateException
SessionFactory
evictQueries
in interface SessionFactory
HibernateException
- Indicate a problem communicating with
underlying cache impl.public void evictQueries(String cacheRegion) throws HibernateException
SessionFactory
evictQueries
in interface SessionFactory
cacheRegion
- The named query cache region from which to evict.
HibernateException
- Since a not-found 'cacheRegion' simply no-ops,
this should indicate a problem communicating with underlying cache impl.public Statistics getStatistics()
SessionFactory
getStatistics
in interface SessionFactory
public StatelessSessionBuilder withStatelessOptions()
SessionFactory
StatelessSession
builder.
withStatelessOptions
in interface SessionFactory
public StatelessSession openStatelessSession()
SessionFactory
openStatelessSession
in interface SessionFactory
public StatelessSession openStatelessSession(Connection conn)
SessionFactory
Connection
.
openStatelessSession
in interface SessionFactory
conn
- Connection provided by the application.
public Set getDefinedFilterNames()
SessionFactory
getDefinedFilterNames
in interface SessionFactory
public FilterDefinition getFilterDefinition(String filterName) throws HibernateException
SessionFactory
getFilterDefinition
in interface SessionFactory
filterName
- The name of the filter for which to obtain the definition.
HibernateException
- If no filter defined with the given name.public boolean containsFetchProfileDefinition(String name)
SessionFactory
containsFetchProfileDefinition
in interface SessionFactory
name
- The name to check
public TypeHelper getTypeHelper()
SessionFactory
TypeHelper
getTypeHelper
in interface SessionFactory
TypeHelper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |