|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hibernate.impl.SessionImpl
Concrete implementation of a Session, and also the central, organizing component of Hibernate's internal implementation. As such, this class exposes two interfaces; Session itself, to the application, and SessionImplementor, to other components of Hibernate. This is where all the hard work goes on. NOT THREADSAFE
Nested Class Summary | |
static class |
SessionImpl.CollectionEntry
We need an entry to tell us all about the current state of a collection with respect to its persistent state |
Method Summary | |
void |
addArrayHolder(ArrayHolder holder)
associate a holder with an array - called after loading array |
void |
addNonExist(Key key)
|
void |
addUninitializedEntity(Key key,
Object object,
LockMode lockMode)
Create a "temporary" entry for a newly instantiated entity. |
void |
afterLoad()
|
void |
afterTransactionCompletion(boolean success)
Notify the session that the transaction completed, so we no longer own the old locks. |
void |
beforeLoad()
|
Transaction |
beginTransaction()
Begin a unit of work and return the associated Transaction object. |
void |
cancelQuery()
Cancel execution of the current query. |
void |
clear()
Completely clear the session. |
Connection |
close()
End the Session by disconnecting from the JDBC connection and cleaning up. |
Connection |
connection()
Get the JDBC connection. |
boolean |
contains(Object object)
Check if this instance is associated with this Session. |
protected JDBCException |
convert(SQLException sqlException,
String message)
|
Object |
copy(Object object,
Map copiedAlready)
|
Criteria |
createCriteria(Class persistentClass)
Create a new Criteria instance, for the given entity class. |
Query |
createFilter(Object collection,
String queryString)
Create a new instance of Query for the given collection and filter string. |
Query |
createQuery(String queryString)
Create a new instance of Query for the given query string. |
Query |
createSQLQuery(String sql,
String[] returnAliases,
Class[] returnClasses)
Create a new instance of Query for the given SQL string. |
Query |
createSQLQuery(String sql,
String[] returnAliases,
Class[] returnClasses,
Collection querySpaces)
|
Query |
createSQLQuery(String sql,
String returnAlias,
Class returnClass)
Create a new instance of Query for the given SQL string. |
void |
delete(Object object)
Delete a persistent object |
int |
delete(String query)
Delete all objects returned by the query. |
int |
delete(String query,
Object[] values,
Type[] types)
Delete all objects returned by the query. |
int |
delete(String query,
Object value,
Type type)
Delete all objects returned by the query. |
Connection |
disconnect()
Disconnect the Session from the current JDBC connection. |
Object |
doCopy(Object object,
Serializable id,
Map copiedAlready)
|
void |
endLoadingCollections(CollectionPersister persister,
Object resultSetId)
|
void |
evict(Object object)
remove any hard references to the entity that are held by the infrastructure (references held by application or other persistant instances are okay) |
Collection |
filter(Object collection,
String filter)
Apply a filter to a persistent collection. |
Collection |
filter(Object collection,
String filter,
Object[] values,
Type[] types)
Apply a filter to a persistent collection. |
Collection |
filter(Object collection,
String filter,
Object value,
Type type)
Apply a filter to a persistent collection. |
List |
filter(Object collection,
String filter,
QueryParameters queryParameters)
Execute a filter |
protected void |
finalize()
Just in case user forgot to commit()/cancel() or close() |
List |
find(CriteriaImpl criteria)
|
List |
find(String query)
Retrieve a list of persistent objects using a hibernate query |
List |
find(String query,
Object[] values,
Type[] types)
Execute a query with bind parameters. |
List |
find(String query,
Object value,
Type type)
Execute a query with bind parameters. |
List |
find(String query,
QueryParameters queryParameters)
Execute a find() query |
List |
findBySQL(String sqlQuery,
String[] aliases,
Class[] classes,
QueryParameters queryParameters,
Collection querySpaces)
Execute an SQL Query |
void |
flush()
Force the Session to flush. |
Object |
get(Class clazz,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance. |
Object |
get(Class clazz,
Serializable id,
LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance. |
ArrayHolder |
getArrayHolder(Object array)
Get the PersistentCollection object for an array |
Batcher |
getBatcher()
Get the prepared statement Batcher for this session |
Serializable[] |
getClassBatch(Class clazz,
Serializable id,
int batchSize)
Get a batch of unloaded identifiers for this class |
Object |
getCollection(String role,
Serializable id,
Object owner)
instantiate a collection wrapper (called when loading an object) |
Serializable[] |
getCollectionBatch(CollectionPersister collectionPersister,
Serializable id,
int batchSize)
Get a batch of uninitialized collection keys for this role |
Object |
getCollectionOwner(Serializable key,
CollectionPersister collectionPersister)
|
LockMode |
getCurrentLockMode(Object object)
Determine the current lock mode of the given object. |
Object |
getEntity(Key key)
Get the entity instance associated with the given Key |
Serializable |
getEntityIdentifier(Object object)
Get the id value for an object that is actually associated with the session. |
Serializable |
getEntityIdentifierIfNotUnsaved(Object object)
Used by OneToOneType and ManyToOneType to determine what id value should be used for an object that may or may not be associated with the session. |
SessionFactoryImplementor |
getFactory()
Get the creating SessionFactoryImplementor |
FlushMode |
getFlushMode()
Get the current flush mode. |
Serializable |
getIdentifier(Object object)
Return the identifier of an entity instance cached by the Session, or throw an exception if the instance is transient or associated with a different Session. |
Serializable |
getLoadedCollectionKey(PersistentCollection coll)
Get the pre-flush identifier of the collection |
PersistentCollection |
getLoadingCollection(CollectionPersister persister,
Serializable id,
Object resultSetId)
|
LockMode |
getLockMode(Object object)
Get the lock mode of the entity |
Query |
getNamedQuery(String queryName)
Obtain an instance of Query for a named query string defined in the mapping file. |
Collection |
getOrphans(PersistentCollection coll)
Get the collection orphans (entities which were removed from the collection) |
ClassPersister |
getPersister(Object object)
Get the ClassPersister for an object |
SessionFactory |
getSessionFactory()
Get the SessionFactory that created this instance. |
Serializable |
getSnapshot(PersistentCollection coll)
Get the snapshot of the pre-flush collection state |
long |
getTimestamp()
System time before the start of the transaction |
Object |
getVersion(Object entity)
Get the current versioon of the entity |
Object |
immediateLoad(Class clazz,
Serializable id)
Load the data for the object with the specified id into a newly created object. |
void |
initializeCollection(PersistentCollection collection,
boolean writing)
called by a collection that wants to initialize itself |
void |
initializeEntity(Object object)
After processing a JDBC result set, we "resolve" all the associations between the entities which were instantiated and had their state "hydrated" into an array |
void |
initializeNonLazyCollections()
|
Object |
instantiate(ClassPersister persister,
Serializable id)
give the interceptor an opportunity to override the default instantiation |
Object |
instantiate(Class clazz,
Serializable id)
Instantiate the entity class, initializing with the given identifier |
Object |
internalLoad(Class clazz,
Serializable id)
Return the object with the specified id or throw exception if no row with that id exists. |
Object |
internalLoadOneToOne(Class clazz,
Serializable id)
Return the object with the specified id or null if no row with that id exists. |
boolean |
isConnected()
Check if the Session is currently connected. |
boolean |
isDirty()
Does this Session contain any changes which must be synchronized with the database? Would any SQL be executed if we flushed this session? |
boolean |
isInverseCollection(PersistentCollection collection)
Is this the "inverse" end of a bidirectional association? |
boolean |
isOpen()
Check if the Session is still open. |
boolean |
isSaved(Object object)
Was this object already saved to the database? |
Iterator |
iterate(String query)
Execute a query and return the results in an iterator. |
Iterator |
iterate(String query,
Object[] values,
Type[] types)
Execute a query and return the results in an iterator. |
Iterator |
iterate(String query,
Object value,
Type type)
Execute a query and return the results in an iterator. |
Iterator |
iterate(String query,
QueryParameters queryParameters)
Execute an iterate() query |
Iterator |
iterateFilter(Object collection,
String filter,
QueryParameters queryParameters)
Iterate a filter |
Object |
load(Class clazz,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, assuming that the instance exists. |
Object |
load(Class clazz,
Serializable id,
LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, obtaining the specified lock mode, assuming the instance exists. |
void |
load(Object object,
Serializable id)
Read the persistent state associated with the given identifier into the given transient instance. |
Object |
loadByUniqueKey(Class clazz,
String uniqueKeyPropertyName,
Serializable id)
Load an instance by a unique key that is not the primary key. |
void |
lock(Object object,
LockMode lockMode)
Obtain the specified lock level upon the given object. |
Object |
narrowProxy(Object proxy,
ClassPersister persister,
Key key,
Object object)
If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy and overwrite the registration of the old one. |
void |
postDelete(Object obj)
After actually deleting a row, record the fact that the instance no longer exists on the database (needed for identity-column key generation) |
void |
postHydrate(ClassPersister persister,
Serializable id,
Object[] values,
Object object,
LockMode lockMode)
Add the "hydrated state" (an array) of an uninitialized entity to the session. |
void |
postInsert(Object obj)
After actually inserting a row, record the fact that the instance exists on the database (needed for identity-column key generation) |
void |
postUpdate(Object obj,
Object[] updatedState,
Object nextVersion)
After actually updating a row, record the fact that the database state has been updated |
Object |
proxyFor(ClassPersister persister,
Key key,
Object impl)
Grab the existing proxy for an instance, if one exists. |
Object |
proxyFor(Object impl)
Return the existing proxy associated with the given Key, or the second argument (the entity associated with the key) if no proxy exists. |
void |
reconnect()
Obtain a new JDBC connection. |
void |
reconnect(Connection conn)
Reconnect to the given JDBC connection. |
void |
refresh(Object object)
Re-read the state of the given instance from the underlying database. |
void |
refresh(Object obj,
LockMode lockMode)
Re-read the state of the given instance from the underlying database, with the given LockMode. |
void |
replicate(Object obj,
ReplicationMode replicationMode)
Persist all reachable transient objects, reusing the current identifier values. |
Serializable |
save(Object obj)
Save a transient object. |
void |
save(Object obj,
Serializable id)
Save a transient object with a manually assigned ID. |
void |
saveOrUpdate(Object obj)
Either save() or update() the given instance, depending upon the value of its identifier property. |
Object |
saveOrUpdateCopy(Object object)
Copy the state of the given object onto the persistent object with the same identifier. |
Object |
saveOrUpdateCopy(Object object,
Serializable id)
Copy the state of the given object onto the persistent object with the given identifier. |
void |
scheduleBatchLoad(Class clazz,
Serializable id)
Register the entity as batch loadable, if enabled |
ScrollableResults |
scroll(String query,
QueryParameters queryParameters)
Execute a scroll() query |
void |
setFlushMode(FlushMode flushMode)
Set the flush mode. |
void |
setLockMode(Object entity,
LockMode lockMode)
Set the lock mode of the entity to the given lock mode |
void |
update(Object obj)
Update the persistent instance with the identifier of the given transient instance. |
void |
update(Object obj,
Serializable id)
Update the persistent state associated with the given identifier. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public Batcher getBatcher()
SessionImplementor
getBatcher
in interface SessionImplementor
public SessionFactoryImplementor getFactory()
SessionImplementor
getFactory
in interface SessionImplementor
public long getTimestamp()
SessionImplementor
getTimestamp
in interface SessionImplementor
public Connection close() throws HibernateException
Session
HibernateException
public void afterTransactionCompletion(boolean success)
SessionImplementor
afterTransactionCompletion
in interface SessionImplementor
public LockMode getCurrentLockMode(Object object) throws HibernateException
Session
getCurrentLockMode
in interface Session
object
- a persistent instance
HibernateException
public LockMode getLockMode(Object object)
SessionImplementor
getLockMode
in interface SessionImplementor
public Object getEntity(Key key)
SessionImplementor
getEntity
in interface SessionImplementor
public void setLockMode(Object entity, LockMode lockMode)
SessionImplementor
setLockMode
in interface SessionImplementor
public boolean isOpen()
Session
public Serializable save(Object obj) throws HibernateException
obj
- a transient instance of a persistent class
HibernateException
public void save(Object obj, Serializable id) throws HibernateException
obj
- a transient instance of a persistent classid
- an unused valid identifier
HibernateException
public void delete(Object object) throws HibernateException
object
- the instance to be removed
HibernateException
public void update(Object obj) throws HibernateException
Session
obj
- a transient instance containing updated state
HibernateException
public void saveOrUpdate(Object obj) throws HibernateException
Session
saveOrUpdate
in interface Session
obj
- a transient instance containing new or updated state
HibernateException
Session.save(java.lang.Object)
,
Session.update(Object object, Serializable id)
public void update(Object obj, Serializable id) throws HibernateException
Session
obj
- a transient instance containing updated stateid
- identifier of persistent instance
HibernateException
public List find(String query) throws HibernateException
query
- a query expressed in Hibernate's query language
HibernateException
public List find(String query, Object value, Type type) throws HibernateException
Session
query
- the query stringvalue
- a value to be bound to a "?" placeholder (JDBC IN parameter).type
- the Hibernate type of the value
HibernateException
for access to Type instances
public List find(String query, Object[] values, Type[] types) throws HibernateException
Session
query
- the query stringvalues
- an array of values to be bound to the "?" placeholders (JDBC IN parameters).types
- an array of Hibernate types of the values
HibernateException
for access to Type instances
public List find(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
find
in interface SessionImplementor
HibernateException
public Iterator iterate(String query) throws HibernateException
Session
query
- the query string
HibernateException
public Iterator iterate(String query, Object value, Type type) throws HibernateException
Session
query
- the query stringvalue
- a value to be witten to a "?" placeholder in the query stringtype
- the hibernate type of value
HibernateException
public Iterator iterate(String query, Object[] values, Type[] types) throws HibernateException
Session
query
- the query stringvalues
- a list of values to be written to "?" placeholders in the querytypes
- a list of Hibernate types of the values
HibernateException
public Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
iterate
in interface SessionImplementor
HibernateException
public ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
scroll
in interface SessionImplementor
HibernateException
public int delete(String query) throws HibernateException
Session
query
- the query string
HibernateException
public int delete(String query, Object value, Type type) throws HibernateException
Session
query
- the query stringvalue
- a value to be witten to a "?" placeholder in the query string.type
- the hibernate type of value.
HibernateException
public int delete(String query, Object[] values, Type[] types) throws HibernateException
Session
query
- the query stringvalues
- a list of values to be written to "?" placeholders in the query.types
- a list of Hibernate types of the values
HibernateException
public void lock(Object object, LockMode lockMode) throws HibernateException
Session
object
- a persistent or transient instancelockMode
- the lock level
HibernateException
public Query createFilter(Object collection, String queryString)
Session
createFilter
in interface Session
collection
- a persistent collectionqueryString
- a Hibernate query
public Query createQuery(String queryString)
Session
createQuery
in interface Session
queryString
- a Hibernate query
public Query getNamedQuery(String queryName) throws MappingException
Session
getNamedQuery
in interface Session
queryName
- the name of a query defined externally
MappingException
public Object instantiate(Class clazz, Serializable id) throws HibernateException
SessionImplementor
instantiate
in interface SessionImplementor
HibernateException
public Object instantiate(ClassPersister persister, Serializable id) throws HibernateException
HibernateException
public void setFlushMode(FlushMode flushMode)
Session
setFlushMode
in interface Session
flushMode
- the FlushModeFlushMode
public FlushMode getFlushMode()
Session
getFlushMode
in interface Session
public Object narrowProxy(Object proxy, ClassPersister persister, Key key, Object object) throws HibernateException
HibernateException
public Object proxyFor(ClassPersister persister, Key key, Object impl) throws HibernateException
proxyFor
in interface SessionImplementor
HibernateException
public Object proxyFor(Object impl) throws HibernateException
SessionImplementor
proxyFor
in interface SessionImplementor
HibernateException
public void addUninitializedEntity(Key key, Object object, LockMode lockMode)
addUninitializedEntity
in interface SessionImplementor
public void postHydrate(ClassPersister persister, Serializable id, Object[] values, Object object, LockMode lockMode) throws HibernateException
postHydrate
in interface SessionImplementor
HibernateException
public void load(Object object, Serializable id) throws HibernateException
Session
object
- an "empty" instance of the persistent classid
- a valid identifier of an existing persistent instance of the class
HibernateException
public Object load(Class clazz, Serializable id) throws HibernateException
Session
clazz
- a persistent classid
- a valid identifier of an existing persistent instance of the class
HibernateException
public Object get(Class clazz, Serializable id) throws HibernateException
Session
clazz
- a persistent classid
- an identifier
HibernateException
public Object immediateLoad(Class clazz, Serializable id) throws HibernateException
immediateLoad
in interface SessionImplementor
HibernateException
public Object internalLoadOneToOne(Class clazz, Serializable id) throws HibernateException
internalLoadOneToOne
in interface SessionImplementor
HibernateException
public Object internalLoad(Class clazz, Serializable id) throws HibernateException
internalLoad
in interface SessionImplementor
HibernateException
public Object load(Class clazz, Serializable id, LockMode lockMode) throws HibernateException
Session
clazz
- a persistent classid
- a valid identifier of an existing persistent instance of the classlockMode
- the lock level
HibernateException
public Object get(Class clazz, Serializable id, LockMode lockMode) throws HibernateException
Session
clazz
- a persistent classid
- an identifierlockMode
- the lock mode
HibernateException
public void refresh(Object object) throws HibernateException
Session
object
- a persistent or transient instance
HibernateException
public void refresh(Object obj, LockMode lockMode) throws HibernateException
Session
obj
- a persistent or transient instancelockMode
- the lock mode to use
HibernateException
public void initializeEntity(Object object) throws HibernateException
initializeEntity
in interface SessionImplementor
HibernateException
public Transaction beginTransaction() throws HibernateException
Session
beginTransaction
in interface Session
HibernateException
Transaction
public void flush() throws HibernateException
Session
HibernateException
public boolean isDirty() throws HibernateException
Session
HibernateException
public void postInsert(Object obj)
SessionImplementor
postInsert
in interface SessionImplementor
public void postDelete(Object obj)
SessionImplementor
postDelete
in interface SessionImplementor
public void postUpdate(Object obj, Object[] updatedState, Object nextVersion) throws HibernateException
SessionImplementor
postUpdate
in interface SessionImplementor
HibernateException
public ClassPersister getPersister(Object object) throws MappingException
SessionImplementor
getPersister
in interface SessionImplementor
MappingException
public Serializable getIdentifier(Object object) throws HibernateException
Session
getIdentifier
in interface Session
object
- a persistent instance
HibernateException
- if the Session is connectedpublic Serializable getEntityIdentifier(Object object)
getEntityIdentifier
in interface SessionImplementor
public boolean isSaved(Object object) throws HibernateException
SessionImplementor
isSaved
in interface SessionImplementor
HibernateException
public Serializable getEntityIdentifierIfNotUnsaved(Object object) throws HibernateException
getEntityIdentifierIfNotUnsaved
in interface SessionImplementor
HibernateException
public PersistentCollection getLoadingCollection(CollectionPersister persister, Serializable id, Object resultSetId) throws HibernateException
getLoadingCollection
in interface SessionImplementor
HibernateException
public void endLoadingCollections(CollectionPersister persister, Object resultSetId) throws HibernateException
endLoadingCollections
in interface SessionImplementor
HibernateException
public void beforeLoad()
beforeLoad
in interface SessionImplementor
public void afterLoad()
afterLoad
in interface SessionImplementor
public void initializeNonLazyCollections() throws HibernateException
initializeNonLazyCollections
in interface SessionImplementor
HibernateException
public ArrayHolder getArrayHolder(Object array)
SessionImplementor
getArrayHolder
in interface SessionImplementor
public void addArrayHolder(ArrayHolder holder)
addArrayHolder
in interface SessionImplementor
public Serializable getSnapshot(PersistentCollection coll)
SessionImplementor
getSnapshot
in interface SessionImplementor
public Serializable getLoadedCollectionKey(PersistentCollection coll)
SessionImplementor
getLoadedCollectionKey
in interface SessionImplementor
public boolean isInverseCollection(PersistentCollection collection)
SessionImplementor
isInverseCollection
in interface SessionImplementor
public Collection getOrphans(PersistentCollection coll) throws HibernateException
SessionImplementor
getOrphans
in interface SessionImplementor
HibernateException
public void initializeCollection(PersistentCollection collection, boolean writing) throws HibernateException
initializeCollection
in interface SessionImplementor
HibernateException
public Object getCollectionOwner(Serializable key, CollectionPersister collectionPersister) throws MappingException
getCollectionOwner
in interface SessionImplementor
MappingException
public Connection connection() throws HibernateException
Session
connection
in interface Session
HibernateException
- if the Session is disconnectedpublic boolean isConnected()
Session
isConnected
in interface Session
public Connection disconnect() throws HibernateException
Session
disconnect
in interface Session
HibernateException
- if the Session is disconnectedSession.reconnect()
public void reconnect() throws HibernateException
Session
HibernateException
Session.disconnect()
public void reconnect(Connection conn) throws HibernateException
Session
conn
- a JDBC connection
HibernateException
- if the Session is connectedSession.disconnect()
protected void finalize() throws Throwable
Throwable
public Collection filter(Object collection, String filter) throws HibernateException
Session
collection
- a persistent collection to filterfilter
- a filter query string
HibernateException
public Collection filter(Object collection, String filter, Object value, Type type) throws HibernateException
Session
collection
- a persistent collection to filterfilter
- a filter query stringvalue
- a value to be witten to a "?" placeholder in the query stringtype
- the hibernate type of value
HibernateException
public Collection filter(Object collection, String filter, Object[] values, Type[] types) throws HibernateException
Session
collection
- a persistent collection to filterfilter
- a filter query stringvalues
- a list of values to be written to "?" placeholders in the querytypes
- a list of Hibernate types of the values
HibernateException
public List filter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementor
filter
in interface SessionImplementor
HibernateException
public Iterator iterateFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementor
iterateFilter
in interface SessionImplementor
HibernateException
public Criteria createCriteria(Class persistentClass)
Session
createCriteria
in interface Session
persistentClass
-
public List find(CriteriaImpl criteria) throws HibernateException
HibernateException
public boolean contains(Object object)
Session
object
- an instance of a persistent class
public void evict(Object object) throws HibernateException
object
- a persistent instance
HibernateException
public Object getVersion(Object entity)
SessionImplementor
getVersion
in interface SessionImplementor
public Serializable[] getCollectionBatch(CollectionPersister collectionPersister, Serializable id, int batchSize)
SessionImplementor
getCollectionBatch
in interface SessionImplementor
collectionPersister
- the collection roleid
- a key that must be includedbatchSize
- the maximum number of keys to return
public Serializable[] getClassBatch(Class clazz, Serializable id, int batchSize)
SessionImplementor
getClassBatch
in interface SessionImplementor
clazz
- the persistent classid
- an identifier that must be includedbatchSize
- the maximum number of keys to return
public void scheduleBatchLoad(Class clazz, Serializable id) throws MappingException
SessionImplementor
scheduleBatchLoad
in interface SessionImplementor
MappingException
public Query createSQLQuery(String sql, String returnAlias, Class returnClass)
Session
createSQLQuery
in interface Session
sql
- a query expressed in SQLreturnAlias
- a table alias that appears inside {} in the SQL stringreturnClass
- the returned persistent classpublic Query createSQLQuery(String sql, String[] returnAliases, Class[] returnClasses)
Session
createSQLQuery
in interface Session
sql
- a query expressed in SQLreturnAliases
- an array of table aliases that appear inside {} in the SQL stringreturnClasses
- the returned persistent classespublic Query createSQLQuery(String sql, String[] returnAliases, Class[] returnClasses, Collection querySpaces)
public List findBySQL(String sqlQuery, String[] aliases, Class[] classes, QueryParameters queryParameters, Collection querySpaces) throws HibernateException
SessionImplementor
findBySQL
in interface SessionImplementor
HibernateException
public void clear()
Session
public Object loadByUniqueKey(Class clazz, String uniqueKeyPropertyName, Serializable id) throws HibernateException
SessionImplementor
loadByUniqueKey
in interface SessionImplementor
HibernateException
public void replicate(Object obj, ReplicationMode replicationMode) throws HibernateException
Session
obj
- a transient instance of a persistent class
HibernateException
public SessionFactory getSessionFactory()
Session
getSessionFactory
in interface Session
SessionFactory
public Object getCollection(String role, Serializable id, Object owner) throws HibernateException
getCollection
in interface SessionImplementor
HibernateException
public void cancelQuery() throws HibernateException
Session
cancelQuery
in interface Session
HibernateException
public void addNonExist(Key key)
addNonExist
in interface SessionImplementor
public Object saveOrUpdateCopy(Object object) throws HibernateException
Session
saveOrUpdateCopy
in interface Session
object
- a transient instance with state to be copied
HibernateException
public Object copy(Object object, Map copiedAlready) throws HibernateException
copy
in interface SessionImplementor
HibernateException
public Object doCopy(Object object, Serializable id, Map copiedAlready) throws HibernateException
HibernateException
public Object saveOrUpdateCopy(Object object, Serializable id) throws HibernateException
Session
saveOrUpdateCopy
in interface Session
object
- a persistent or transient instance with state to be copiedid
- the identifier of the instance to copy to
HibernateException
protected JDBCException convert(SQLException sqlException, String message)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |