|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.hibernate.Session |
---|
Session.LockRequest |
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, buildLockRequest, cancelQuery, clear, close, connection, contains, createCriteria, createCriteria, createCriteria, createCriteria, createFilter, createQuery, createSQLQuery, delete, delete, disableFetchProfile, disableFilter, disconnect, doWork, enableFetchProfile, enableFilter, evict, flush, get, get, get, get, get, get, getCacheMode, getCurrentLockMode, getEnabledFilter, getEntityMode, getEntityName, getFlushMode, getIdentifier, getNamedQuery, getSession, getSessionFactory, getStatistics, getTransaction, isConnected, isDefaultReadOnly, isDirty, isFetchProfileEnabled, isOpen, isReadOnly, load, load, load, load, load, load, load, lock, lock, merge, merge, persist, persist, reconnect, reconnect, refresh, refresh, refresh, replicate, replicate, save, save, saveOrUpdate, saveOrUpdate, setCacheMode, setDefaultReadOnly, setFlushMode, setReadOnly, update, update |
Method Detail |
---|
Object saveOrUpdateCopy(Object object) throws HibernateException
Session.merge(Object)
object
- a transient instance with state to be copied
HibernateException
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
Object saveOrUpdateCopy(String entityName, Object object) throws HibernateException
Session.merge(String, Object)
object
- a transient instance with state to be copied
HibernateException
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
List find(String query) throws HibernateException
Session.createQuery(java.lang.String)
.Query.list()
query
- a query expressed in Hibernate's query language
HibernateException
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
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
Iterator iterate(String query) throws HibernateException
Session.createQuery(java.lang.String)
.Query.iterate()
query
- the query string
HibernateException
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
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
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
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
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
int delete(String query) throws HibernateException
Session.delete(Object)
individually.
query
- the query string
HibernateException
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
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
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 classQuery 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 classesvoid save(Object object, Serializable id) throws HibernateException
object
- a transient instance of a persistent classid
- an unused valid identifier
HibernateException
void save(String entityName, Object object, Serializable id) throws HibernateException
object
- a transient instance of a persistent classid
- an unused valid identifier
HibernateException
void update(Object object, Serializable id) throws HibernateException
object
- a detached instance containing updated stateid
- identifier of persistent instance
HibernateException
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 |