public interface Session extends Session
Session.LockRequest
Modifier and Type | Method and Description |
---|---|
Query |
createSQLQuery(String sql,
String[] returnAliases,
Class[] returnClasses)
Deprecated.
use
SQLQuery.addRoot(java.lang.String, java.lang.String) or SQLQuery.addEntity(java.lang.String) variants
instead to define the aliases/classes |
Query |
createSQLQuery(String sql,
String returnAlias,
Class returnClass)
Deprecated.
use
SQLQuery.addRoot(java.lang.String, java.lang.String) or SQLQuery.addEntity(java.lang.String) variants
instead to define the alias/class |
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.
|
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.
|
List |
find(String query,
Object[] values,
Type[] types)
Deprecated.
|
List |
find(String query,
Object value,
Type type)
Deprecated.
|
Iterator |
iterate(String query)
Deprecated.
|
Iterator |
iterate(String query,
Object[] values,
Type[] types)
Deprecated.
|
Iterator |
iterate(String query,
Object value,
Type type)
Deprecated.
|
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.
|
Object |
saveOrUpdateCopy(Object object,
Serializable id)
Deprecated.
with no replacement
|
Object |
saveOrUpdateCopy(String entityName,
Object object)
Deprecated.
|
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
|
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, getLobHelper, getNamedQuery, getSession, getSessionFactory, getStatistics, getTransaction, getTypeHelper, 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
Object saveOrUpdateCopy(Object object) throws HibernateException
Session.merge(Object)
object
- a transient instance with state to be copiedHibernateException
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 toHibernateException
Object saveOrUpdateCopy(String entityName, Object object) throws HibernateException
Session.merge(String, Object)
object
- a transient instance with state to be copiedHibernateException
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 toHibernateException
List find(String query) throws HibernateException
Session.createQuery(java.lang.String)
.Query.list()
query
- a query expressed in Hibernate's query languageHibernateException
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 valueHibernateException
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 valuesHibernateException
for access to Type instances
Iterator iterate(String query) throws HibernateException
Session.createQuery(java.lang.String)
.Query.iterate()
query
- the query stringHibernateException
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 valueHibernateException
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 valuesHibernateException
Collection filter(Object collection, String filter) throws HibernateException
Session.createFilter(Object, String)
.Query.list()
collection
- a persistent collection to filterfilter
- a filter query stringHibernateException
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 valueHibernateException
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 valuesHibernateException
int delete(String query) throws HibernateException
Session.delete(Object)
individually.query
- the query stringHibernateException
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 valuesHibernateException
@Deprecated Query createSQLQuery(String sql, String returnAlias, Class returnClass)
SQLQuery.addRoot(java.lang.String, java.lang.String)
or SQLQuery.addEntity(java.lang.String)
variants
instead to define the alias/classSQLQuery
.sql
- a query expressed in SQLreturnAlias
- a table alias that appears inside {} in the SQL stringreturnClass
- the returned persistent class@Deprecated Query createSQLQuery(String sql, String[] returnAliases, Class[] returnClasses)
SQLQuery.addRoot(java.lang.String, java.lang.String)
or SQLQuery.addEntity(java.lang.String)
variants
instead to define the aliases/classesSQLQuery
.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 identifierHibernateException
void save(String entityName, Object object, Serializable id) throws HibernateException
object
- a transient instance of a persistent classid
- an unused valid identifierHibernateException
void update(Object object, Serializable id) throws HibernateException
object
- a detached instance containing updated stateid
- identifier of persistent instanceHibernateException
void update(String entityName, Object object, Serializable id) throws HibernateException
object
- a detached instance containing updated stateid
- identifier of persistent instanceHibernateException
Copyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved