org.hibernate.classic.Session |
Known Indirect Subclasses |
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.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
use
addRoot(String, Class) or addEntity(Class) variants
instead to define the alias/class
| |||||||||||
This method is deprecated.
use
addRoot(String, Class) or addEntity(Class) variants
instead to define the aliases/classes
| |||||||||||
This method is deprecated.
consider using HQL delete statements
| |||||||||||
This method is deprecated.
consider using HQL delete statements
| |||||||||||
This method is deprecated.
consider using HQL delete statements
| |||||||||||
This method is deprecated.
use
createFilter(Object, String) .setXYZ.list() | |||||||||||
This method is deprecated.
use
createFilter(Object, String) .setXYZ.list() | |||||||||||
This method is deprecated.
use
createFilter(Object, String) .list() | |||||||||||
This method is deprecated.
use
createQuery(String) .setXYZ.list() | |||||||||||
This method is deprecated.
use
createQuery(String) .list() | |||||||||||
This method is deprecated.
use
createQuery(String) .setXYZ.list() | |||||||||||
This method is deprecated.
use
createQuery(String) .setXYZ.iterate() | |||||||||||
This method is deprecated.
use
createQuery(String) .iterate() | |||||||||||
This method is deprecated.
use
createQuery(String) .setXYZ.iterate() | |||||||||||
This method is deprecated.
declare identifier properties for all classes
| |||||||||||
This method is deprecated.
declare identifier properties for all classes
| |||||||||||
This method is deprecated.
with no replacement
| |||||||||||
This method is deprecated.
with no replacement
| |||||||||||
This method is deprecated.
use
merge(Object) | |||||||||||
This method is deprecated.
use
merge(String, Object) | |||||||||||
This method is deprecated.
declare identifier properties for all classes
| |||||||||||
This method is deprecated.
declare identifier properties for all classes
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.hibernate.Session
|
This method is deprecated.
use addRoot(String, Class)
or addEntity(Class)
variants
instead to define the alias/class
Create a new instance of Query for the given SQL string.
Returned instances should all beSQLQuery
.sql | a query expressed in SQL |
---|---|
returnAlias | a table alias that appears inside {} in the SQL string |
returnClass | the returned persistent class |
This method is deprecated.
use addRoot(String, Class)
or addEntity(Class)
variants
instead to define the aliases/classes
Create a new instance of Query for the given SQL string.
Returned instances should all beSQLQuery
.sql | a query expressed in SQL |
---|---|
returnAliases | an array of table aliases that appear inside {} in the SQL string |
returnClasses | the returned persistent classes |
This method is deprecated.
consider using HQL delete statements
Delete all objects returned by the query. Return the number of objects deleted.
Note that this is very different from the delete-statement support added in HQL since 3.1. The functionality here is to actually peform the query and then iterate the results callingdelete(Object)
individually.query | the query string |
---|
HibernateException |
---|
This method is deprecated.
consider using HQL delete statements
Delete all objects returned by the query. Return the number of objects deleted.
Note that this is very different from the delete-statement support added in HQL since 3.1. The functionality here is to actually peform the query and then iterate the results callingdelete(Object)
individually.query | the query string |
---|---|
values | a list of values to be written to "?" placeholders in the query. |
types | a list of Hibernate types of the values |
HibernateException |
---|
This method is deprecated.
consider using HQL delete statements
Delete all objects returned by the query. Return the number of objects deleted.
Note that this is very different from the delete-statement support added in HQL since 3.1. The functionality here is to actually peform the query and then iterate the results callingdelete(Object)
individually.query | the query string |
---|---|
value | a value to be witten to a "?" placeholder in the query string. |
type | the hibernate type of value. |
HibernateException |
---|
This method is deprecated.
use createFilter(Object, String)
.setXYZ.list()
Apply a filter to a persistent collection. A filter is a Hibernate query that may refer to this, the collection element.
collection | a persistent collection to filter |
---|---|
filter | a filter query string |
value | a value to be witten to a "?" placeholder in the query string |
type | the hibernate type of value |
HibernateException |
---|
This method is deprecated.
use createFilter(Object, String)
.setXYZ.list()
Apply a filter to a persistent collection. Bind the given parameters to "?" placeholders. A filter is a Hibernate query that may refer to this, the collection element.
collection | a persistent collection to filter |
---|---|
filter | a filter query string |
values | a list of values to be written to "?" placeholders in the query |
types | a list of Hibernate types of the values |
HibernateException |
---|
This method is deprecated.
use createFilter(Object, String)
.list()
Apply a filter to a persistent collection. A filter is a Hibernate query that may refer to this, the collection element. Filters allow efficient access to very large lazy collections. (Executing the filter does not initialize the collection.)
collection | a persistent collection to filter |
---|---|
filter | a filter query string |
HibernateException |
---|
This method is deprecated.
use createQuery(String)
.setXYZ.list()
Execute a query with bind parameters, binding a value to a "?" parameter in the query string.
query | the query string |
---|---|
value | a value to be bound to a "?" placeholder (JDBC IN parameter). |
type | the Hibernate type of the value |
HibernateException |
---|
This method is deprecated.
use createQuery(String)
.list()
Execute a query.
query | a query expressed in Hibernate's query language |
---|
HibernateException |
---|
This method is deprecated.
use createQuery(String)
.setXYZ.list()
Execute a query with bind parameters, binding an array of values to "?" parameters in the query string.
query | the query string |
---|---|
values | an array of values to be bound to the "?" placeholders (JDBC IN parameters). |
types | an array of Hibernate types of the values |
HibernateException |
---|
This method is deprecated.
use createQuery(String)
.setXYZ.iterate()
Execute a query and return the results in an iterator. Write the given values to "?"
in the query string. If the query has multiple return values, values will be returned
in an array of type Object[].
Entities returned as results are initialized on demand. The first SQL query returns
identifiers only. So iterate() is usually a less efficient way to retrieve
objects than find().
query | the query string |
---|---|
values | a list of values to be written to "?" placeholders in the query |
types | a list of Hibernate types of the values |
HibernateException |
---|
This method is deprecated.
use createQuery(String)
.iterate()
Execute a query and return the results in an iterator. If the query has multiple
return values, values will be returned in an array of type Object[].
Entities returned as results are initialized on demand. The first SQL query returns
identifiers only. So iterate() is usually a less efficient way to retrieve
objects than find().
query | the query string |
---|
HibernateException |
---|
This method is deprecated.
use createQuery(String)
.setXYZ.iterate()
Execute a query and return the results in an iterator. Write the given value to "?"
in the query string. If the query has multiple return values, values will be returned
in an array of type Object[].
Entities returned as results are initialized on demand. The first SQL query returns
identifiers only. So iterate() is usually a less efficient way to retrieve
objects than find().
query | the query string |
---|---|
value | a value to be witten to a "?" placeholder in the query string |
type | the hibernate type of value |
HibernateException |
---|
This method is deprecated.
declare identifier properties for all classes
Persist the given transient instance, using the given identifier. This operation cascades to associated instances if the association is mapped with cascade="save-update".
object | a transient instance of a persistent class |
---|---|
id | an unused valid identifier |
HibernateException |
---|
This method is deprecated.
declare identifier properties for all classes
Persist the given transient instance, using the given identifier. This operation cascades to associated instances if the association is mapped with cascade="save-update".
object | a transient instance of a persistent class |
---|---|
id | an unused valid identifier |
HibernateException |
---|
This method is deprecated.
with no replacement
Copy the state of the given object onto the persistent object with the given identifier. If there is no persistent instance currently associated with the session, it will be loaded. Return the persistent instance. If there is no database row with the given identifier, save the given instance and return it as a newly persistent instance. Otherwise, the given instance does not become associated with the session.
object | a persistent or transient instance with state to be copied |
---|---|
id | the identifier of the instance to copy to |
HibernateException |
---|
This method is deprecated.
with no replacement
Copy the state of the given object onto the persistent object with the given identifier. If there is no persistent instance currently associated with the session, it will be loaded. Return the persistent instance. If there is no database row with the given identifier, save the given instance and return it as a newly persistent instance. Otherwise, the given instance does not become associated with the session.
object | a persistent or transient instance with state to be copied |
---|---|
id | the identifier of the instance to copy to |
HibernateException |
---|
This method is deprecated.
use merge(Object)
Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent instance currently associated with the session, it will be loaded. Return the persistent instance. If the given instance is unsaved or does not exist in the database, save it and return it as a newly persistent instance. Otherwise, the given instance does not become associated with the session.
object | a transient instance with state to be copied |
---|
HibernateException |
---|
This method is deprecated.
use merge(String, Object)
Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent instance currently associated with the session, it will be loaded. Return the persistent instance. If the given instance is unsaved or does not exist in the database, save it and return it as a newly persistent instance. Otherwise, the given instance does not become associated with the session.
object | a transient instance with state to be copied |
---|
HibernateException |
---|
This method is deprecated.
declare identifier properties for all classes
Update the persistent state associated with the given identifier. An exception is thrown if there is a persistent instance with the same identifier in the current session. This operation cascades to associated instances if the association is mapped with cascade="save-update".
object | a detached instance containing updated state |
---|---|
id | identifier of persistent instance |
HibernateException |
---|
This method is deprecated.
declare identifier properties for all classes
Update the persistent state associated with the given identifier. An exception is thrown if there is a persistent instance with the same identifier in the current session. This operation cascades to associated instances if the association is mapped with cascade="save-update".
object | a detached instance containing updated state |
---|---|
id | identifier of persistent instance |
HibernateException |
---|