|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HibernateOperations
Interface that specifies a basic set of Hibernate operations,
implemented by HibernateTemplate
. Not often used, but a useful
option to enhance testability, as it can easily be mocked or stubbed.
Defines HibernateTemplate
's data access methods that
mirror various Session
methods. Users are
strongly encouraged to read the Hibernate Session
javadocs
for details on the semantics of those methods.
Note that operations that return an Iterator
(i.e.
iterate(..)
) are supposed to be used within Spring-driven
or JTA-driven transactions (with HibernateTransactionManager
,
JtaTransactionManager
,
or EJB CMT). Else, the Iterator
won't be able to read
results from its ResultSet
anymore, as the underlying
Hibernate Session
will already have been closed.
Note that lazy loading will just work with an open Hibernate
Session
, either within a transaction or within
OpenSessionInViewFilter
/
OpenSessionInViewInterceptor
.
Furthermore, some operations just make sense within transactions,
for example: contains
, evict
, lock
,
flush
, clear
.
HibernateTemplate
,
Session
,
HibernateTransactionManager
,
JtaTransactionManager
,
OpenSessionInViewFilter
,
OpenSessionInViewInterceptor
Method Summary | |
---|---|
void |
clear()
Remove all objects from the Session cache, and cancel all pending saves, updates and deletes. |
void |
closeIterator(Iterator it)
Close an Iterator created by iterate operations immediately, instead of waiting until the session is closed or disconnected. |
boolean |
contains(Object entity)
Check whether the given object is in the Session cache. |
void |
delete(Object entity)
Delete the given persistent instance. |
void |
delete(Object entity,
net.sf.hibernate.LockMode lockMode)
Delete the given persistent instance. |
int |
delete(String queryString)
Delete all objects returned by the query. |
int |
delete(String queryString,
Object[] values,
net.sf.hibernate.type.Type[] types)
Delete all objects returned by the query. |
int |
delete(String queryString,
Object value,
net.sf.hibernate.type.Type type)
Delete all objects returned by the query. |
void |
deleteAll(Collection entities)
Delete all given persistent instances. |
void |
evict(Object entity)
Remove the given object from the Session cache. |
Object |
execute(HibernateCallback action)
Execute the action specified by the given action object within a Session. |
List |
executeFind(HibernateCallback action)
Execute the specified action assuming that the result object is a List. |
List |
find(String queryString)
Execute an HQL query. |
List |
find(String queryString,
Object value)
Execute an HQL query, binding one value to a "?" |
List |
find(String queryString,
Object[] values)
Execute an HQL query, binding a number of values to "?" |
List |
find(String queryString,
Object[] values,
net.sf.hibernate.type.Type[] types)
Execute an HQL query, binding a number of values to "?" |
List |
find(String queryString,
Object value,
net.sf.hibernate.type.Type type)
Execute an HQL query, binding one value to a "?" |
List |
findByNamedParam(String queryString,
String[] paramNames,
Object[] values)
Execute an HQL query, binding a number of values to ":" named parameters in the query string. |
List |
findByNamedParam(String queryString,
String[] paramNames,
Object[] values,
net.sf.hibernate.type.Type[] types)
Execute an HQL query, binding a number of values to ":" named parameters in the query string. |
List |
findByNamedParam(String queryString,
String paramName,
Object value)
Execute an HQL query, binding one value to a ":" named parameter in the query string. |
List |
findByNamedParam(String queryString,
String paramName,
Object value,
net.sf.hibernate.type.Type type)
Execute an HQL query, binding one value to a ":" named parameter in the query string. |
List |
findByNamedQuery(String queryName)
Execute a named query. |
List |
findByNamedQuery(String queryName,
Object value)
Execute a named query, binding one value to a "?" |
List |
findByNamedQuery(String queryName,
Object[] values)
Execute a named query, binding a number of values to "?" |
List |
findByNamedQuery(String queryName,
Object[] values,
net.sf.hibernate.type.Type[] types)
Execute a named query, binding a number of values to "?" |
List |
findByNamedQuery(String queryName,
Object value,
net.sf.hibernate.type.Type type)
Execute a named query, binding one value to a "?" |
List |
findByNamedQueryAndNamedParam(String queryName,
String[] paramNames,
Object[] values)
Execute a named query, binding a number of values to ":" named parameters in the query string. |
List |
findByNamedQueryAndNamedParam(String queryName,
String[] paramNames,
Object[] values,
net.sf.hibernate.type.Type[] types)
Execute a named query, binding a number of values to ":" named parameters in the query string. |
List |
findByNamedQueryAndNamedParam(String queryName,
String paramName,
Object value)
Execute a named query, binding one value to a ":" named parameter in the query string. |
List |
findByNamedQueryAndNamedParam(String queryName,
String paramName,
Object value,
net.sf.hibernate.type.Type type)
Execute a named query, binding one value to a ":" named parameter in the query string. |
List |
findByNamedQueryAndValueBean(String queryName,
Object valueBean)
Execute a named query, binding the properties of the given bean to ":" named parameters in the query string. |
List |
findByValueBean(String queryString,
Object valueBean)
Execute an HQL query, binding the properties of the given bean to named parameters in the query string. |
void |
flush()
Flush all pending saves, updates and deletes to the database. |
Object |
get(Class entityClass,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, or null if not found. |
Object |
get(Class entityClass,
Serializable id,
net.sf.hibernate.LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, or null if not found. |
void |
initialize(Object proxy)
Force initialization of a Hibernate proxy or persistent collection. |
Iterator |
iterate(String queryString)
Execute a query for persistent instances. |
Iterator |
iterate(String queryString,
Object value)
Execute a query for persistent instances, binding one value to a "?" |
Iterator |
iterate(String queryString,
Object[] values)
Execute a query for persistent instances, binding a number of values to "?" |
Iterator |
iterate(String queryString,
Object[] values,
net.sf.hibernate.type.Type[] types)
Execute a query for persistent instances, binding a number of values to "?" |
Iterator |
iterate(String queryString,
Object value,
net.sf.hibernate.type.Type type)
Execute a query for persistent instances, binding one value to a "?" |
Object |
load(Class entityClass,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found. |
Object |
load(Class entityClass,
Serializable id,
net.sf.hibernate.LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found. |
void |
load(Object entity,
Serializable id)
Load the persistent instance with the given identifier into the given object, throwing an exception if not found. |
List |
loadAll(Class entityClass)
Return all persistent instances of the given entity class. |
void |
lock(Object entity,
net.sf.hibernate.LockMode lockMode)
Obtain the specified lock level upon the given object, implicitly checking whether the corresponding database entry still exists (throwing an OptimisticLockingFailureException if not found). |
void |
refresh(Object entity)
Re-read the state of the given persistent instance. |
void |
refresh(Object entity,
net.sf.hibernate.LockMode lockMode)
Re-read the state of the given persistent instance. |
void |
replicate(Object entity,
net.sf.hibernate.ReplicationMode replicationMode)
Persist the state of the given detached instance according to the given replication mode, reusing the current identifier value. |
Serializable |
save(Object entity)
Persist the given transient instance. |
void |
save(Object entity,
Serializable id)
Persist the given transient instance with the given identifier. |
void |
saveOrUpdate(Object entity)
Save or update the given persistent instance, according to its id (matching the configured "unsaved-value"?). |
void |
saveOrUpdateAll(Collection entities)
Save or update all given persistent instances, according to its id (matching the configured "unsaved-value"?). |
Object |
saveOrUpdateCopy(Object entity)
Save or update the contents of given persistent object, according to its id (matching the configured "unsaved-value"?). |
void |
update(Object entity)
Update the given persistent instance. |
void |
update(Object entity,
net.sf.hibernate.LockMode lockMode)
Update the given persistent instance. |
Method Detail |
---|
Object execute(HibernateCallback action) throws DataAccessException
Note: Callback code is not supposed to handle transactions itself! Use an appropriate transaction manager like HibernateTransactionManager. Generally, callback code must not touch any Session lifecycle methods, like close, disconnect, or reconnect, to let the template do its work.
action
- callback object that specifies the Hibernate action
null
DataAccessException
- in case of Hibernate errorsHibernateTransactionManager
,
org.springframework.dao
,
org.springframework.transaction
,
Session
List executeFind(HibernateCallback action) throws DataAccessException
action
- calback object that specifies the Hibernate action
null
DataAccessException
- in case of Hibernate errorsObject get(Class entityClass, Serializable id) throws DataAccessException
null
if not found.
This method is a thin wrapper around
Session.get(Class, java.io.Serializable)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- an identifier of the persistent instance
null
if not found
DataAccessException
- in case of Hibernate errorsSession.get(Class, java.io.Serializable)
Object get(Class entityClass, Serializable id, net.sf.hibernate.LockMode lockMode) throws DataAccessException
null
if not found.
Obtains the specified lock mode if the instance exists.
This method is a thin wrapper around
Session.get(Class, java.io.Serializable, net.sf.hibernate.LockMode)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- an identifier of the persistent instancelockMode
- the lock mode to obtain
null
if not found
DataAccessException
- in case of Hibernate errorsSession.get(Class, java.io.Serializable, net.sf.hibernate.LockMode)
Object load(Class entityClass, Serializable id) throws DataAccessException
This method is a thin wrapper around
Session.load(Class, java.io.Serializable)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- an identifier of the persistent instance
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Class, java.io.Serializable)
Object load(Class entityClass, Serializable id, net.sf.hibernate.LockMode lockMode) throws DataAccessException
This method is a thin wrapper around
Session.load(Class, java.io.Serializable, net.sf.hibernate.LockMode)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- an identifier of the persistent instancelockMode
- the lock mode to obtain
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Class, java.io.Serializable)
List loadAll(Class entityClass) throws DataAccessException
entityClass
- a persistent class
DataAccessException
- if there is a Hibernate errorSession.createCriteria(java.lang.Class)
void load(Object entity, Serializable id) throws DataAccessException
entity
- the object (of the target class) to load intoid
- an identifier of the persistent instance
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Object, java.io.Serializable)
void refresh(Object entity) throws DataAccessException
entity
- the persistent instance to re-read
DataAccessException
- in case of Hibernate errorsSession.refresh(Object)
void refresh(Object entity, net.sf.hibernate.LockMode lockMode) throws DataAccessException
entity
- the persistent instance to re-readlockMode
- the lock mode to obtain
DataAccessException
- in case of Hibernate errorsSession.refresh(Object, net.sf.hibernate.LockMode)
boolean contains(Object entity) throws DataAccessException
entity
- the persistence instance to check
DataAccessException
- if there is a Hibernate errorSession.contains(java.lang.Object)
void evict(Object entity) throws DataAccessException
entity
- the persistent instance to evict
DataAccessException
- in case of Hibernate errorsSession.evict(java.lang.Object)
void initialize(Object proxy) throws DataAccessException
proxy
- a proxy for a persistent object or a persistent collection
DataAccessException
- if we can't initialize the proxy, for example
because it is not associated with an active SessionHibernate.initialize(java.lang.Object)
void lock(Object entity, net.sf.hibernate.LockMode lockMode) throws DataAccessException
entity
- the persistent instance to locklockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsHibernateOptimisticLockingFailureException
,
Session.lock(Object, net.sf.hibernate.LockMode)
Serializable save(Object entity) throws DataAccessException
entity
- the transient instance to persist
DataAccessException
- in case of Hibernate errorsSession.save(Object)
void save(Object entity, Serializable id) throws DataAccessException
entity
- the transient instance to persistid
- the identifier to assign
DataAccessException
- in case of Hibernate errorsSession.save(Object, java.io.Serializable)
void update(Object entity) throws DataAccessException
entity
- the persistent instance to update
DataAccessException
- in case of Hibernate errorsSession.update(Object)
void update(Object entity, net.sf.hibernate.LockMode lockMode) throws DataAccessException
Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists (throwing an OptimisticLockingFailureException if not found).
entity
- the persistent instance to updatelockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsHibernateOptimisticLockingFailureException
,
Session.update(Object)
void saveOrUpdate(Object entity) throws DataAccessException
entity
- the persistent instance to save or update
(to be associated with the Hibernate Session)
DataAccessException
- in case of Hibernate errorsSession.saveOrUpdate(Object)
void saveOrUpdateAll(Collection entities) throws DataAccessException
entities
- the persistent instances to save or update
(to be associated with the Hibernate Session)
DataAccessException
- in case of Hibernate errorsSession.saveOrUpdate(Object)
Object saveOrUpdateCopy(Object entity) throws DataAccessException
entity
- the persistent object to save or update
(not necessarily to be associated with the Hibernate Session)
DataAccessException
- in case of Hibernate errorsSession.saveOrUpdateCopy(Object)
void replicate(Object entity, net.sf.hibernate.ReplicationMode replicationMode) throws DataAccessException
entity
- the persistent object to replicate
DataAccessException
- in case of Hibernate errorsSession.replicate(Object, net.sf.hibernate.ReplicationMode)
void delete(Object entity) throws DataAccessException
entity
- the persistent instance to delete
DataAccessException
- in case of Hibernate errorsSession.delete(Object)
void delete(Object entity, net.sf.hibernate.LockMode lockMode) throws DataAccessException
Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists (throwing an OptimisticLockingFailureException if not found).
entity
- the persistent instance to deletelockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsHibernateOptimisticLockingFailureException
,
Session.delete(Object)
void deleteAll(Collection entities) throws DataAccessException
This can be combined with any of the find methods to delete by query in two lines of code, similar to Session's delete by query methods.
entities
- the persistent instances to delete
DataAccessException
- in case of Hibernate errorsSession.delete(String)
void flush() throws DataAccessException
Only invoke this for selective eager flushing, for example when JDBC code needs to see certain changes within the same transaction. Else, it's preferable to rely on auto-flushing at transaction completion.
DataAccessException
- in case of Hibernate errorsSession.flush()
void clear() throws DataAccessException
DataAccessException
- in case of Hibernate errorsSession.clear()
List find(String queryString) throws DataAccessException
queryString
- a query expressed in Hibernate's query language
DataAccessException
- in case of Hibernate errorsSession.find(String)
,
Session.createQuery(java.lang.String)
List find(String queryString, Object value) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalue
- the value of the parameter
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.createQuery(java.lang.String)
List find(String queryString, Object value, net.sf.hibernate.type.Type type) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalue
- the value of the parametertype
- Hibernate type of the parameter (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.createQuery(java.lang.String)
List find(String queryString, Object[] values) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalues
- the values of the parameters
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.createQuery(java.lang.String)
List find(String queryString, Object[] values, net.sf.hibernate.type.Type[] types) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalues
- the values of the parameterstypes
- Hibernate types of the parameters (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.createQuery(java.lang.String)
List findByNamedParam(String queryString, String paramName, Object value) throws DataAccessException
queryString
- a query expressed in Hibernate's query languageparamName
- the name of parametervalue
- the value of the parameter
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.getNamedQuery(String)
List findByNamedParam(String queryString, String paramName, Object value, net.sf.hibernate.type.Type type) throws DataAccessException
queryString
- a query expressed in Hibernate's query languageparamName
- the name of the parametervalue
- the value of the parametertype
- Hibernate type of the parameter (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.getNamedQuery(String)
List findByNamedParam(String queryString, String[] paramNames, Object[] values) throws DataAccessException
queryString
- a query expressed in Hibernate's query languageparamNames
- the names of the parametersvalues
- the values of the parameters
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.getNamedQuery(String)
List findByNamedParam(String queryString, String[] paramNames, Object[] values, net.sf.hibernate.type.Type[] types) throws DataAccessException
queryString
- a query expressed in Hibernate's query languageparamNames
- the names of the parametersvalues
- the values of the parameterstypes
- Hibernate types of the parameters (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.getNamedQuery(String)
List findByValueBean(String queryString, Object valueBean) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalueBean
- the values of the parameters
DataAccessException
- in case of Hibernate errorsQuery.setProperties(java.lang.Object)
,
Session.createQuery(java.lang.String)
List findByNamedQuery(String queryName) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping file
DataAccessException
- in case of Hibernate errorsSession.find(String)
,
Session.getNamedQuery(String)
List findByNamedQuery(String queryName, Object value) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalue
- the value of the parameter
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.getNamedQuery(String)
List findByNamedQuery(String queryName, Object value, net.sf.hibernate.type.Type type) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalue
- the value of the parametertype
- Hibernate type of the parameter (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.getNamedQuery(String)
List findByNamedQuery(String queryName, Object[] values) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalues
- the values of the parameters
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.getNamedQuery(String)
List findByNamedQuery(String queryName, Object[] values, net.sf.hibernate.type.Type[] types) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalues
- the values of the parameterstypes
- Hibernate types of the parameters (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.getNamedQuery(String)
List findByNamedQueryAndNamedParam(String queryName, String paramName, Object value) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping fileparamName
- the name of parametervalue
- the value of the parameter
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.getNamedQuery(String)
List findByNamedQueryAndNamedParam(String queryName, String paramName, Object value, net.sf.hibernate.type.Type type) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping fileparamName
- the name of the parametervalue
- the value of the parametertype
- Hibernate type of the parameter (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object, net.sf.hibernate.type.Type)
,
Session.getNamedQuery(String)
List findByNamedQueryAndNamedParam(String queryName, String[] paramNames, Object[] values) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping fileparamNames
- the names of the parametersvalues
- the values of the parameters
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.getNamedQuery(String)
List findByNamedQueryAndNamedParam(String queryName, String[] paramNames, Object[] values, net.sf.hibernate.type.Type[] types) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping fileparamNames
- the names of the parametersvalues
- the values of the parameterstypes
- Hibernate types of the parameters (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.getNamedQuery(String)
List findByNamedQueryAndValueBean(String queryName, Object valueBean) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalueBean
- the values of the parameters
DataAccessException
- in case of Hibernate errorsQuery.setProperties(java.lang.Object)
,
Session.getNamedQuery(String)
Iterator iterate(String queryString) throws DataAccessException
Returns the results as Iterator. Entities returned are initialized on demand. See Hibernate docs for details.
queryString
- a query expressed in Hibernate's query language
DataAccessException
- in case of Hibernate errorsSession.iterate(String)
,
Session.createQuery(java.lang.String)
Iterator iterate(String queryString, Object value) throws DataAccessException
Returns the results as Iterator. Entities returned are initialized on demand. See Hibernate docs for details.
queryString
- a query expressed in Hibernate's query languagevalue
- the value of the parameter
DataAccessException
- in case of Hibernate errorsSession.iterate(String, Object, net.sf.hibernate.type.Type)
,
Session.createQuery(java.lang.String)
Iterator iterate(String queryString, Object value, net.sf.hibernate.type.Type type) throws DataAccessException
Returns the results as Iterator. Entities returned are initialized on demand. See Hibernate docs for details.
queryString
- a query expressed in Hibernate's query languagevalue
- the value of the parametertype
- Hibernate type of the parameter (or null
)
DataAccessException
- in case of Hibernate errorsSession.iterate(String, Object, net.sf.hibernate.type.Type)
,
Session.createQuery(java.lang.String)
Iterator iterate(String queryString, Object[] values) throws DataAccessException
Returns the results as Iterator. Entities returned are initialized on demand. See Hibernate docs for details.
queryString
- a query expressed in Hibernate's query languagevalues
- the values of the parameters
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.createQuery(java.lang.String)
Iterator iterate(String queryString, Object[] values, net.sf.hibernate.type.Type[] types) throws DataAccessException
Returns the results as Iterator. Entities returned are initialized on demand. See Hibernate docs for details.
queryString
- a query expressed in Hibernate's query languagevalues
- the values of the parameterstypes
- Hibernate types of the parameters (or null
)
DataAccessException
- in case of Hibernate errorsSession.find(String, Object[], net.sf.hibernate.type.Type[])
,
Session.createQuery(java.lang.String)
void closeIterator(Iterator it) throws DataAccessException
it
- the Iterator to close
DataAccessException
- if the Iterator could not be closedHibernate.close(java.util.Iterator)
int delete(String queryString) throws DataAccessException
queryString
- a query expressed in Hibernate's query language
DataAccessException
- in case of Hibernate errorsSession.delete(String)
int delete(String queryString, Object value, net.sf.hibernate.type.Type type) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalue
- the value of the parametertype
- Hibernate type of the parameter (or null
)
DataAccessException
- in case of Hibernate errorsSession.delete(String, Object, net.sf.hibernate.type.Type)
int delete(String queryString, Object[] values, net.sf.hibernate.type.Type[] types) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalues
- the values of the parameterstypes
- Hibernate types of the parameters (or null
)
DataAccessException
- in case of Hibernate errorsSession.delete(String, Object[], net.sf.hibernate.type.Type[])
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |