org.hibernate.classic
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.

saveOrUpdateCopy

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.

saveOrUpdateCopy

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.

saveOrUpdateCopy

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.

saveOrUpdateCopy

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.

filter

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.)

delete

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 calling Session.delete(Object) individually.

delete

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 calling Session.delete(Object) individually.

Parameters:

query - the query string

value - a value to be witten to a "?" placeholder in the query string.

delete

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 calling Session.delete(Object) individually.

Parameters:

query - the query string

values - a list of values to be written to "?" placeholders in the query.

update

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".

update

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".