svn commit: r981635 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java

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

svn commit: r981635 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java

doogie-3
Author: doogie
Date: Mon Aug  2 17:43:47 2010
New Revision: 981635

URL: http://svn.apache.org/viewvc?rev=981635&view=rev
Log:
Expose a helper method for parsing order by items.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java?rev=981635&r1=981634&r2=981635&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/SQLUtil.java Mon Aug  2 17:43:47 2010
@@ -20,6 +20,9 @@ package org.ofbiz.entity.sql;
 
 import java.io.StringReader;
 
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.sql.OrderByItem;
+import org.ofbiz.sql.Parser;
 import org.ofbiz.sql.ParseException;
 import org.ofbiz.sql.Parser;
 
@@ -33,6 +36,10 @@ public class SQLUtil {
     public static EntitySelectPlan parseSelect(String sql) throws ParseException {
        return planner.planSelect(updateParserFlags(new Parser(new StringReader(sql))).SelectStatement());
     }
+
+    public static OrderByItem parseOrderByItem(String sql) throws ParseException {
+       return updateParserFlags(new Parser(new StringReader(sql))).OrderByItem();
+    }
     /*
     public static EntityCondition parseCondition(String condition) throws ParseException {
         return new Parser(new StringReader(condition)).EntityCondition();