From: <hib...@li...> - 2006-03-17 18:59:11
|
Author: ste...@jb... Date: 2006-03-17 13:59:03 -0500 (Fri, 17 Mar 2006) New Revision: 9652 Modified: trunk/Hibernate3/src/org/hibernate/classic/Session.java Log: HHH-590 Modified: trunk/Hibernate3/src/org/hibernate/classic/Session.java =================================================================== --- trunk/Hibernate3/src/org/hibernate/classic/Session.java 2006-03-17 14:50:16 UTC (rev 9651) +++ trunk/Hibernate3/src/org/hibernate/classic/Session.java 2006-03-17 18:59:03 UTC (rev 9652) @@ -26,8 +26,9 @@ * 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. - * @deprecated use org.hibernate.Session#merge(Object) * + * @deprecated use {@link org.hibernate.Session#merge(Object)} + * * @param object a transient instance with state to be copied * @return an updated persistent instance */ @@ -40,8 +41,9 @@ * 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. - * @deprecated use org.hibernate.Session#merge(Object, java.io.Serializable) * + * @deprecated with no replacement + * * @param object a persistent or transient instance with state to be copied * @param id the identifier of the instance to copy to * @return an updated persistent instance @@ -55,8 +57,9 @@ * 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. - * @deprecated use org.hibernate.Session#merge(String, Object) * + * @deprecated use {@link org.hibernate.Session#merge(String, Object)} + * * @param object a transient instance with state to be copied * @return an updated persistent instance */ @@ -69,8 +72,9 @@ * 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. - * @deprecated use org.hibernate.Session#merge(String, Object, java.io.Serializable) * + * @deprecated with no replacement + * * @param object a persistent or transient instance with state to be copied * @param id the identifier of the instance to copy to * @return an updated persistent instance @@ -79,8 +83,9 @@ /** * Execute a query. - * @deprecated use <tt>createQuery(query).list()</tt> * + * @deprecated use {@link #createQuery}.{@link Query#list()} + * * @param query a query expressed in Hibernate's query language * @return a distinct list of instances (or arrays of instances) * @throws HibernateException @@ -88,10 +93,10 @@ public List find(String query) throws HibernateException; /** - * Execute a query with bind parameters. - * @deprecated use <tt>createQuery(query).setParameter(value,type).list()</tt> + * Execute a query with bind parameters, binding a value to a "?" parameter + * in the query string. * - * Bind a value to a "?" parameter in the query string. + * @deprecated use {@link #createQuery}.setXYZ.{@link Query#list()} * * @param query the query string * @param value a value to be bound to a "?" placeholder (JDBC IN parameter). @@ -103,10 +108,10 @@ public List find(String query, Object value, Type type) throws HibernateException; /** - * Execute a query with bind parameters. - * @deprecated use <tt>createQuery(query).setParameters(values,types).find() instead</tt> + * Execute a query with bind parameters, binding an array of values to "?" + * parameters in the query string. * - * Binding an array of values to "?" parameters in the query string. + * @deprecated use {@link #createQuery}.setXYZ.{@link Query#list()} * * @param query the query string * @param values an array of values to be bound to the "?" placeholders (JDBC IN parameters). @@ -125,7 +130,7 @@ * identifiers only. So <tt>iterate()</tt> is usually a less efficient way to retrieve * objects than <tt>find()</tt>. * - * @deprecated use <tt>createQuery(query).iterate()</tt> + * @deprecated use {@link #createQuery}.{@link Query#iterate} * * @param query the query string * @return an iterator @@ -141,9 +146,9 @@ * Entities returned as results are initialized on demand. The first SQL query returns * identifiers only. So <tt>iterate()</tt> is usually a less efficient way to retrieve * objects than <tt>find()</tt>. - * - * @deprecated use <tt>createQuery(query).setParameter(value,type).iterate()</tt> * + * @deprecated use {@link #createQuery}.setXYZ.{@link Query#iterate} + * * @param query the query string * @param value a value to be witten to a "?" placeholder in the query string * @param type the hibernate type of value @@ -160,9 +165,9 @@ * Entities returned as results are initialized on demand. The first SQL query returns * identifiers only. So <tt>iterate()</tt> is usually a less efficient way to retrieve * objects than <tt>find()</tt>. - * - * @deprecated use <tt>createQuery(query).setParameters(values,types).iterate()</tt> * + * @deprecated use {@link #createQuery}.setXYZ.{@link Query#iterate} + * * @param query the query string * @param values a list of values to be written to "?" placeholders in the query * @param types a list of Hibernate types of the values @@ -176,7 +181,7 @@ * <tt>this</tt>, the collection element. Filters allow efficient access to very large lazy * collections. (Executing the filter does not initialize the collection.) * - * @deprecated use <tt>createQuery()</tt> + * @deprecated use {@link #createFilter(Object, String)}.{@link Query#list} * * @param collection a persistent collection to filter * @param filter a filter query string @@ -188,9 +193,9 @@ /** * Apply a filter to a persistent collection. A filter is a Hibernate query that may refer to * <tt>this</tt>, the collection element. - * - * @deprecated use <tt>createQuery()</tt> * + * @deprecated use {@link #createFilter(Object, String)}.setXYZ.{@link Query#list} + * * @param collection a persistent collection to filter * @param filter a filter query string * @param value a value to be witten to a "?" placeholder in the query string @@ -205,9 +210,9 @@ * * Bind the given parameters to "?" placeholders. A filter is a Hibernate query that * may refer to <tt>this</tt>, the collection element. - * - * @deprecated use <tt>createQuery()</tt> * + * @deprecated use {@link #createFilter(Object, String)}.setXYZ.{@link Query#list} + * * @param collection a persistent collection to filter * @param filter a filter query string * @param values a list of values to be written to "?" placeholders in the query @@ -219,8 +224,12 @@ /** * Delete all objects returned by the query. Return the number of objects deleted. + * <p/> + * 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 {@link #delete(Object)} individually. * - * @deprecated use <tt>createQuery()</tt> + * @deprecated consider using HQL delete statements * * @param query the query string * @return the number of instances deleted @@ -230,9 +239,13 @@ /** * Delete all objects returned by the query. Return the number of objects deleted. - * - * @deprecated use <tt>createQuery()</tt> + * <p/> + * 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 {@link #delete(Object)} individually. * + * @deprecated consider using HQL delete statements + * * @param query the query string * @param value a value to be witten to a "?" placeholder in the query string. * @param type the hibernate type of value. @@ -243,9 +256,13 @@ /** * Delete all objects returned by the query. Return the number of objects deleted. - * - * @deprecated use <tt>createQuery()</tt> + * <p/> + * 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 {@link #delete(Object)} individually. * + * @deprecated consider using HQL delete statements + * * @param query the query string * @param values a list of values to be written to "?" placeholders in the query. * @param types a list of Hibernate types of the values @@ -257,6 +274,7 @@ /** * Create a new instance of <tt>Query</tt> for the given SQL string. + * * @deprecated will be replaced with a more Query like interface in later release * * @param sql a query expressed in SQL @@ -267,6 +285,7 @@ /** * Create a new instance of <tt>Query</tt> for the given SQL string. + * * @deprecated will be replaced with a more Query like interface in later release * * @param sql a query expressed in SQL @@ -280,6 +299,7 @@ * Persist the given transient instance, using the given identifier. This operation * cascades to associated instances if the association is mapped with * <tt>cascade="save-update"</tt>. + * * @deprecated declare identifier properties for all classes * * @param object a transient instance of a persistent class @@ -292,6 +312,7 @@ * Persist the given transient instance, using the given identifier. This operation * cascades to associated instances if the association is mapped with * <tt>cascade="save-update"</tt>. + * * @deprecated declare identifier properties for all classes * * @param object a transient instance of a persistent class @@ -305,6 +326,7 @@ * 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 <tt>cascade="save-update"</tt>. + * * @deprecated declare identifier properties for all classes * * @param object a detached instance containing updated state @@ -318,6 +340,7 @@ * 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 <tt>cascade="save-update"</tt>. + * * @deprecated declare identifier properties for all classes * * @param object a detached instance containing updated state |