Author: tfischer Date: Fri Feb 22 21:16:37 2013 New Revision: 1449216 URL: http://svn.apache.org/r1449216 Log: Criteria.addAlias now returns the this Criteria object (as all the other similar methods)
Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criteria.java db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/CriteriaInterface.java db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criteria.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criteria.java?rev=1449216&r1=1449215&r2=1449216&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criteria.java (original) +++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criteria.java Fri Feb 22 21:16:37 2013 @@ -304,9 +304,10 @@ public class Criteria * @param alias the alias for the table name. * @param table the table name as known in the database. */ - public void addAlias(String alias, String table) + public Criteria addAlias(String alias, String table) { aliases.put(alias, table); + return this; } /** @@ -315,9 +316,10 @@ public class Criteria * @param alias the alias for the subselect. * @param subselect the Criteria for the subselect. */ - public void addAlias(String alias, Criteria subselect) + public Criteria addAlias(String alias, Criteria subselect) { aliases.put(alias, subselect); + return this; } /** Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/CriteriaInterface.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/CriteriaInterface.java?rev=1449216&r1=1449215&r2=1449216&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/CriteriaInterface.java (original) +++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/CriteriaInterface.java Fri Feb 22 21:16:37 2013 @@ -64,7 +64,7 @@ public interface CriteriaInterface<T> * @param alias a <code>String</code> value * @param table a <code>String</code> value */ - void addAlias(String alias, String table); + T addAlias(String alias, String table); /** * Returns the table name associated with an alias. Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java?rev=1449216&r1=1449215&r2=1449216&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java (original) +++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java Fri Feb 22 21:16:37 2013 @@ -349,10 +349,13 @@ public class Criteria implements Seriali * * @param alias a <code>String</code> value * @param table a <code>String</code> value + * + * @return A modified Criteria object. */ - public void addAlias(String alias, String table) + public Criteria addAlias(String alias, String table) { aliases.put(alias, table); + return this; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org