db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/query QueryByCriteria.java
Date Mon, 05 Jul 2004 15:50:07 GMT
brj         2004/07/05 08:50:07

  Modified:    src/java/org/apache/ojb/broker/query QueryByCriteria.java
  Log:
  added convenience methods posted by robert s. sfeir
  
  Revision  Changes    Path
  1.27      +25 -1     db-ojb/src/java/org/apache/ojb/broker/query/QueryByCriteria.java
  
  Index: QueryByCriteria.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/query/QueryByCriteria.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- QueryByCriteria.java	9 Jun 2004 20:00:44 -0000	1.26
  +++ QueryByCriteria.java	5 Jul 2004 15:50:07 -0000	1.27
  @@ -450,6 +450,30 @@
       }
   
       /**
  +     * Adds an array  of fields for orderBy ASCENDING
  +     * @param  fieldName    Array of field names to be used
  +     */
  +    public void addOrderByAscending(String[] fieldNames)
  +    {
  +        for(int i = 0; i< fieldNames.length; i++ )
  +        {
  +            addOrderBy(fieldNames[i], true);
  +        }
  +    }
  +
  +    /**
  +     * Adds a field for orderBy DESCENDING
  +     * @param  fieldName    Array of field names to be used
  +     */
  +    public void addOrderByDescending(String[] fieldNames)
  +    {
  +        for(int i = 0; i< fieldNames.length; i++ )
  +        {
  +            addOrderBy(fieldNames[i], false);
  +        }
  +    }
  +
  +    /**
        * Adds a field for orderBy DESCENDING
        * @param  fieldName    The field name to be used
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message