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/accesslayer/sql SqlSelectStatement.java
Date Fri, 14 Mar 2003 16:55:13 GMT
brj         2003/03/14 08:55:13

  Modified:    src/java/org/apache/ojb/broker/accesslayer/sql
                        SqlSelectStatement.java
  Log:
  get groupBy and orderBy from Query
  
  Revision  Changes    Path
  1.11      +9 -12     db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlSelectStatement.java
  
  Index: SqlSelectStatement.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlSelectStatement.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SqlSelectStatement.java	10 Mar 2003 20:38:10 -0000	1.10
  +++ SqlSelectStatement.java	14 Mar 2003 16:55:13 -0000	1.11
  @@ -217,19 +217,16 @@
                   columnList = appendListOfColumns(columns, stmt);
               }
   
  -            if (query.getCriteria() != null)
  +            groupByFields = query.getGroupBy();
  +            if (groupByFields != null && !groupByFields.isEmpty())
               {
  -                groupByFields = query.getCriteria().getGroupby();
  -                if (groupByFields != null && !groupByFields.isEmpty())
  -                {
  -                    ensureColumns(groupByFields, columnList, stmt);
  -                }
  +                ensureColumns(groupByFields, columnList, stmt);
  +            }
   
  -                orderByFields = query.getCriteria().getOrderby();
  -                if (orderByFields != null && !orderByFields.isEmpty())
  -                {
  -                    orderByColumnNumbers = ensureColumns(orderByFields, columnList, stmt);
  -                }
  +            orderByFields = query.getOrderBy();
  +            if (orderByFields != null && !orderByFields.isEmpty())
  +            {
  +                orderByColumnNumbers = ensureColumns(orderByFields, columnList, stmt);
               }
   
               /**
  
  
  

Mime
View raw message