|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.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 SessionImplementorpublic SessionFactoryImplementor getFactory()
SessionImplementor
getFactory in interface SessionImplementorpublic long getTimestamp()
SessionImplementor
getTimestamp in interface SessionImplementorpublic Connection close() throws HibernateException
Session
HibernateExceptionpublic void afterTransactionCompletion(boolean success)
SessionImplementor
afterTransactionCompletion in interface SessionImplementorpublic LockMode getCurrentLockMode(Object object) throws HibernateException
Session
getCurrentLockMode in interface Sessionobject - a persistent instance
HibernateExceptionpublic LockMode getLockMode(Object object)
SessionImplementor
getLockMode in interface SessionImplementorpublic Object getEntity(Key key)
SessionImplementor
getEntity in interface SessionImplementorpublic void setLockMode(Object entity, LockMode lockMode)
SessionImplementor
setLockMode in interface SessionImplementorpublic boolean isOpen()
Session
public Serializable save(Object obj) throws HibernateException
obj - a transient instance of a persistent class
HibernateExceptionpublic void save(Object obj, Serializable id) throws HibernateException
obj - a transient instance of a persistent classid - an unused valid identifier
HibernateExceptionpublic void delete(Object object) throws HibernateException
object - the instance to be removed
HibernateExceptionpublic void update(Object obj) throws HibernateException
Session
obj - a transient instance containing updated state
HibernateExceptionpublic void saveOrUpdate(Object obj) throws HibernateException
Session
saveOrUpdate in interface Sessionobj - a transient instance containing new or updated state
HibernateExceptionSession.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
HibernateExceptionpublic List find(String query) throws HibernateException
query - a query expressed in Hibernate's query language
HibernateExceptionpublic 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
HibernateExceptionfor access to Type instancespublic 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
HibernateExceptionfor access to Type instancespublic List find(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
find in interface SessionImplementorHibernateExceptionpublic Iterator iterate(String query) throws HibernateException
Session
query - the query string
HibernateExceptionpublic 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
HibernateExceptionpublic 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
HibernateExceptionpublic Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
iterate in interface SessionImplementorHibernateExceptionpublic ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException
SessionImplementor
scroll in interface SessionImplementorHibernateExceptionpublic int delete(String query) throws HibernateException
Session
query - the query string
HibernateExceptionpublic 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.
HibernateExceptionpublic 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
HibernateExceptionpublic void lock(Object object, LockMode lockMode) throws HibernateException
Session
object - a persistent or transient instancelockMode - the lock level
HibernateExceptionpublic Query createFilter(Object collection, String queryString)
Session
createFilter in interface Sessioncollection - a persistent collectionqueryString - a Hibernate query
public Query createQuery(String queryString)
Session
createQuery in interface SessionqueryString - a Hibernate query
public Query getNamedQuery(String queryName) throws MappingException
Session
getNamedQuery in interface SessionqueryName - the name of a query defined externally
MappingExceptionpublic Object instantiate(Class clazz, Serializable id) throws HibernateException
SessionImplementor
instantiate in interface SessionImplementorHibernateExceptionpublic Object instantiate(ClassPersister persister, Serializable id) throws HibernateException
HibernateExceptionpublic void setFlushMode(FlushMode flushMode)
Session
setFlushMode in interface SessionflushMode - the FlushModeFlushModepublic FlushMode getFlushMode()
Session
getFlushMode in interface Sessionpublic Object narrowProxy(Object proxy, ClassPersister persister, Key key, Object object) throws HibernateException
HibernateExceptionpublic Object proxyFor(ClassPersister persister, Key key, Object impl) throws HibernateException
proxyFor in interface SessionImplementorHibernateExceptionpublic Object proxyFor(Object impl) throws HibernateException
SessionImplementor
proxyFor in interface SessionImplementorHibernateExceptionpublic void addUninitializedEntity(Key key, Object object, LockMode lockMode)
addUninitializedEntity in interface SessionImplementorpublic void postHydrate(ClassPersister persister, Serializable id, Object[] values, Object object, LockMode lockMode) throws HibernateException
postHydrate in interface SessionImplementorHibernateExceptionpublic 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
HibernateExceptionpublic Object load(Class clazz, Serializable id) throws HibernateException
Session
clazz - a persistent classid - a valid identifier of an existing persistent instance of the class
HibernateExceptionpublic Object get(Class clazz, Serializable id) throws HibernateException
Session
clazz - a persistent classid - an identifier
HibernateExceptionpublic Object immediateLoad(Class clazz, Serializable id) throws HibernateException
immediateLoad in interface SessionImplementorHibernateExceptionpublic Object internalLoadOneToOne(Class clazz, Serializable id) throws HibernateException
internalLoadOneToOne in interface SessionImplementorHibernateExceptionpublic Object internalLoad(Class clazz, Serializable id) throws HibernateException
internalLoad in interface SessionImplementorHibernateExceptionpublic 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
HibernateExceptionpublic Object get(Class clazz, Serializable id, LockMode lockMode) throws HibernateException
Session
clazz - a persistent classid - an identifierlockMode - the lock mode
HibernateExceptionpublic void refresh(Object object) throws HibernateException
Session
object - a persistent or transient instance
HibernateExceptionpublic void refresh(Object obj, LockMode lockMode) throws HibernateException
Session
obj - a persistent or transient instancelockMode - the lock mode to use
HibernateExceptionpublic void initializeEntity(Object object) throws HibernateException
initializeEntity in interface SessionImplementorHibernateExceptionpublic Transaction beginTransaction() throws HibernateException
Session
beginTransaction in interface SessionHibernateExceptionTransaction
public void flush()
throws HibernateException
Session
HibernateException
public boolean isDirty()
throws HibernateException
Session
HibernateExceptionpublic void postInsert(Object obj)
SessionImplementor
postInsert in interface SessionImplementorpublic void postDelete(Object obj)
SessionImplementor
postDelete in interface SessionImplementorpublic void postUpdate(Object obj, Object[] updatedState, Object nextVersion) throws HibernateException
SessionImplementor
postUpdate in interface SessionImplementorHibernateExceptionpublic ClassPersister getPersister(Object object) throws MappingException
SessionImplementor
getPersister in interface SessionImplementorMappingExceptionpublic Serializable getIdentifier(Object object) throws HibernateException
Session
getIdentifier in interface Sessionobject - a persistent instance
HibernateException - if the Session is connectedpublic Serializable getEntityIdentifier(Object object)
getEntityIdentifier in interface SessionImplementorpublic boolean isSaved(Object object) throws HibernateException
SessionImplementor
isSaved in interface SessionImplementorHibernateExceptionpublic Serializable getEntityIdentifierIfNotUnsaved(Object object) throws HibernateException
getEntityIdentifierIfNotUnsaved in interface SessionImplementorHibernateExceptionpublic PersistentCollection getLoadingCollection(CollectionPersister persister, Serializable id, Object resultSetId) throws HibernateException
getLoadingCollection in interface SessionImplementorHibernateExceptionpublic void endLoadingCollections(CollectionPersister persister, Object resultSetId) throws HibernateException
endLoadingCollections in interface SessionImplementorHibernateExceptionpublic void beforeLoad()
beforeLoad in interface SessionImplementorpublic void afterLoad()
afterLoad in interface SessionImplementor
public void initializeNonLazyCollections()
throws HibernateException
initializeNonLazyCollections in interface SessionImplementorHibernateExceptionpublic ArrayHolder getArrayHolder(Object array)
SessionImplementor
getArrayHolder in interface SessionImplementorpublic void addArrayHolder(ArrayHolder holder)
addArrayHolder in interface SessionImplementorpublic Serializable getSnapshot(PersistentCollection coll)
SessionImplementor
getSnapshot in interface SessionImplementorpublic Serializable getLoadedCollectionKey(PersistentCollection coll)
SessionImplementor
getLoadedCollectionKey in interface SessionImplementorpublic boolean isInverseCollection(PersistentCollection collection)
SessionImplementor
isInverseCollection in interface SessionImplementorpublic Collection getOrphans(PersistentCollection coll) throws HibernateException
SessionImplementor
getOrphans in interface SessionImplementorHibernateExceptionpublic void initializeCollection(PersistentCollection collection, boolean writing) throws HibernateException
initializeCollection in interface SessionImplementorHibernateExceptionpublic Object getCollectionOwner(Serializable key, CollectionPersister collectionPersister) throws MappingException
getCollectionOwner in interface SessionImplementorMappingExceptionpublic Connection connection() throws HibernateException
Session
connection in interface SessionHibernateException - if the Session is disconnectedpublic boolean isConnected()
Session
isConnected in interface Sessionpublic Connection disconnect() throws HibernateException
Session
disconnect in interface SessionHibernateException - if the Session is disconnectedSession.reconnect()
public void reconnect()
throws HibernateException
Session
HibernateExceptionSession.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
Throwablepublic Collection filter(Object collection, String filter) throws HibernateException
Session
collection - a persistent collection to filterfilter - a filter query string
HibernateExceptionpublic 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
HibernateExceptionpublic 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
HibernateExceptionpublic List filter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementor
filter in interface SessionImplementorHibernateExceptionpublic Iterator iterateFilter(Object collection, String filter, QueryParameters queryParameters) throws HibernateException
SessionImplementor
iterateFilter in interface SessionImplementorHibernateExceptionpublic Criteria createCriteria(Class persistentClass)
Session
createCriteria in interface SessionpersistentClass -
public List find(CriteriaImpl criteria) throws HibernateException
HibernateExceptionpublic boolean contains(Object object)
Session
object - an instance of a persistent class
public void evict(Object object) throws HibernateException
object - a persistent instance
HibernateExceptionpublic Object getVersion(Object entity)
SessionImplementor
getVersion in interface SessionImplementorpublic Serializable[] getCollectionBatch(CollectionPersister collectionPersister, Serializable id, int batchSize)
SessionImplementor
getCollectionBatch in interface SessionImplementorcollectionPersister - 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 SessionImplementorclazz - 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 SessionImplementorMappingExceptionpublic Query createSQLQuery(String sql, String returnAlias, Class returnClass)
Session
createSQLQuery in interface Sessionsql - 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 Sessionsql - 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 SessionImplementorHibernateExceptionpublic void clear()
Session
public Object loadByUniqueKey(Class clazz, String uniqueKeyPropertyName, Serializable id) throws HibernateException
SessionImplementor
loadByUniqueKey in interface SessionImplementorHibernateExceptionpublic void replicate(Object obj, ReplicationMode replicationMode) throws HibernateException
Session
obj - a transient instance of a persistent class
HibernateExceptionpublic SessionFactory getSessionFactory()
Session
getSessionFactory in interface SessionSessionFactorypublic Object getCollection(String role, Serializable id, Object owner) throws HibernateException
getCollection in interface SessionImplementorHibernateException
public void cancelQuery()
throws HibernateException
Session
cancelQuery in interface SessionHibernateExceptionpublic void addNonExist(Key key)
addNonExist in interface SessionImplementorpublic Object saveOrUpdateCopy(Object object) throws HibernateException
Session
saveOrUpdateCopy in interface Sessionobject - a transient instance with state to be copied
HibernateExceptionpublic Object copy(Object object, Map copiedAlready) throws HibernateException
copy in interface SessionImplementorHibernateExceptionpublic Object doCopy(Object object, Serializable id, Map copiedAlready) throws HibernateException
HibernateExceptionpublic Object saveOrUpdateCopy(Object object, Serializable id) throws HibernateException
Session
saveOrUpdateCopy in interface Sessionobject - a persistent or transient instance with state to be copiedid - the identifier of the instance to copy to
HibernateExceptionprotected JDBCException convert(SQLException sqlException, String message)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||