|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An extension of the Session API, including all deprecated methods from Hibernate2. This interface is provided to allow easier migration of existing applications. New code should use org.hibernate.Session.
Method Summary | |
Query |
createSQLQuery(String sql,
String[] returnAliases,
Class[] returnClasses)
Deprecated. will be replaced with a more Query like interface in later release |
Query |
createSQLQuery(String sql,
String returnAlias,
Class returnClass)
Deprecated. will be replaced with a more Query like interface in later release |
int |
delete(String query)
Deprecated. consider using HQL delete statements |
int |
delete(String query,
Object[] values,
Type[] types)
Deprecated. consider using HQL delete statements |
int |
delete(String query,
Object value,
Type type)
Deprecated. consider using HQL delete statements |
Collection |
filter(Object collection,
String filter)
Deprecated. use Session.createFilter(Object, String) .Query.list() |
Collection |
filter(Object collection,
String filter,
Object[] values,
Type[] types)
Deprecated. use Session.createFilter(Object, String) .setXYZ.Query.list() |
Collection |
filter(Object collection,
String filter,
Object value,
Type type)
Deprecated. use Session.createFilter(Object, String) .setXYZ.Query.list() |
List |
find(String query)
Deprecated. use Session.createQuery(java.lang.String) .Query.list() |
List |
find(String query,
Object[] values,
Type[] types)
Deprecated. use Session.createQuery(java.lang.String) .setXYZ.Query.list() |
List |
find(String query,
Object value,
Type type)
Deprecated. use Session.createQuery(java.lang.String) .setXYZ.Query.list() |
Iterator |
iterate(String query)
Deprecated. use Session.createQuery(java.lang.String) .Query.iterate() |
Iterator |
iterate(String query,
Object[] values,
Type[] types)
Deprecated. use Session.createQuery(java.lang.String) .setXYZ.Query.iterate() |
Iterator |
iterate(String query,
Object value,
Type type)
Deprecated. use Session.createQuery(java.lang.String) .setXYZ.Query.iterate() |
void |
save(Object object,
Serializable id)
Deprecated. declare identifier properties for all classes |
void |
save(String entityName,
Object object,
Serializable id)
Deprecated. declare identifier properties for all classes |
Object |
saveOrUpdateCopy(Object object)
Deprecated. use Session.merge(Object) |
Object |
saveOrUpdateCopy(Object object,
Serializable id)
Deprecated. with no replacement |
Object |
saveOrUpdateCopy(String entityName,
Object object)
Deprecated. use Session.merge(String, Object) |
Object |
saveOrUpdateCopy(String entityName,
Object object,
Serializable id)
Deprecated. with no replacement |
void |
update(Object object,
Serializable id)
Deprecated. declare identifier properties for all classes |
void |
update(String entityName,
Object object,
Serializable id)
Deprecated. declare identifier properties for all classes |
Methods inherited from interface org.hibernate.Session |
beginTransaction, cancelQuery, clear, close, connection, contains, createCriteria, createCriteria, createCriteria, createCriteria, createFilter, createQuery, createSQLQuery, delete, delete, disableFilter, disconnect, enableFilter, evict, flush, get, get, get, get, getCacheMode, getCurrentLockMode, getEnabledFilter, getEntityMode, getEntityName, getFlushMode, getIdentifier, getNamedQuery, getSession, getSessionFactory, getStatistics, getTransaction, isConnected, isDirty, isOpen, load, load, load, load, load, lock, lock, merge, merge, persist, persist, reconnect, reconnect, refresh, refresh, replicate, replicate, save, save, saveOrUpdate, saveOrUpdate, setCacheMode, setFlushMode, setReadOnly, update, update |
Method Detail |
public Object saveOrUpdateCopy(Object object) throws HibernateException
Session.merge(Object)
object
- a transient instance with state to be copied
HibernateException
public Object saveOrUpdateCopy(Object object, Serializable id) throws HibernateException
object
- a persistent or transient instance with state to be copiedid
- the identifier of the instance to copy to
HibernateException
public Object saveOrUpdateCopy(String entityName, Object object) throws HibernateException
Session.merge(String, Object)
object
- a transient instance with state to be copied
HibernateException
public Object saveOrUpdateCopy(String entityName, Object object, Serializable id) throws HibernateException
object
- a persistent or transient instance with state to be copiedid
- the identifier of the instance to copy to
HibernateException
public List find(String query) throws HibernateException
Session.createQuery(java.lang.String)
.Query.list()
query
- a query expressed in Hibernate's query language
HibernateException
public List find(String query, Object value, Type type) throws HibernateException
Session.createQuery(java.lang.String)
.setXYZ.Query.list()
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.createQuery(java.lang.String)
.setXYZ.Query.list()
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 Iterator iterate(String query) throws HibernateException
Session.createQuery(java.lang.String)
.Query.iterate()
query
- the query string
HibernateException
public Iterator iterate(String query, Object value, Type type) throws HibernateException
Session.createQuery(java.lang.String)
.setXYZ.Query.iterate()
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.createQuery(java.lang.String)
.setXYZ.Query.iterate()
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 Collection filter(Object collection, String filter) throws HibernateException
Session.createFilter(Object, String)
.Query.list()
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.createFilter(Object, String)
.setXYZ.Query.list()
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.createFilter(Object, String)
.setXYZ.Query.list()
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 int delete(String query) throws HibernateException
Session.delete(Object)
individually.
query
- the query string
HibernateException
public int delete(String query, Object value, Type type) throws HibernateException
Session.delete(Object)
individually.
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.delete(Object)
individually.
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 Query createSQLQuery(String sql, String returnAlias, Class returnClass)
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)
sql
- a query expressed in SQLreturnAliases
- an array of table aliases that appear inside {} in the SQL stringreturnClasses
- the returned persistent classespublic void save(Object object, Serializable id) throws HibernateException
object
- a transient instance of a persistent classid
- an unused valid identifier
HibernateException
public void save(String entityName, Object object, Serializable id) throws HibernateException
object
- a transient instance of a persistent classid
- an unused valid identifier
HibernateException
public void update(Object object, Serializable id) throws HibernateException
object
- a detached instance containing updated stateid
- identifier of persistent instance
HibernateException
public void update(String entityName, Object object, Serializable id) throws HibernateException
object
- a detached instance containing updated stateid
- identifier of persistent instance
HibernateException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |