svn commit: r672198 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r672198 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

jleroux@apache.org
Author: jleroux
Date: Fri Jun 27 02:36:04 2008
New Revision: 672198

URL: http://svn.apache.org/viewvc?rev=672198&view=rev
Log:
Fix some formatting issues Jacopo reported

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=672198&r1=672197&r2=672198&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Fri Jun 27 02:36:04 2008
@@ -972,19 +972,20 @@
             ResultSet resultSet = sqlP.getResultSet();
             boolean isGroupBy = false;
             if (modelEntity instanceof ModelViewEntity) {
-              ModelViewEntity modelViewEntity = (ModelViewEntity) modelEntity;
-              String groupByString = modelViewEntity.colNameString(modelViewEntity.getGroupBysCopy(), ", ", "", false);
-
-              if (UtilValidate.isNotEmpty(groupByString)) isGroupBy = true;
+                ModelViewEntity modelViewEntity = (ModelViewEntity) modelEntity;
+                String groupByString = modelViewEntity.colNameString(modelViewEntity.getGroupBysCopy(), ", ", "", false);
+                if (UtilValidate.isNotEmpty(groupByString)) {
+                    isGroupBy = true;                  
+                }
             }
-
             if (isGroupBy) {
-              while (resultSet.next()) count++;
+                while (resultSet.next()) count++;
             }
             else if (resultSet.next()) {
                 count = resultSet.getLong(1);
             }
             return count;
+            
         } catch (SQLException e) {
             throw new GenericDataSourceException("Error getting count value", e);
         } finally {