empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1241967 - in /incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db: DBCombinedCmd.java expr/join/DBJoinExprEx.java expr/order/DBOrderByExpr.java
Date Wed, 08 Feb 2012 16:47:33 GMT
Author: doebele
Date: Wed Feb  8 16:47:32 2012
New Revision: 1241967

URL: http://svn.apache.org/viewvc?rev=1241967&view=rev
Log:
EMPIREDB-126
DBOrderByExpr getters and setters

Modified:
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCombinedCmd.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/join/DBJoinExprEx.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/order/DBOrderByExpr.java

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCombinedCmd.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCombinedCmd.java?rev=1241967&r1=1241966&r2=1241967&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCombinedCmd.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCombinedCmd.java
Wed Feb  8 16:47:32 2012
@@ -156,8 +156,8 @@ public class DBCombinedCmd extends DBCom
       // Add order by expression
       for (DBOrderByExpr obe : exprs)
       {
-          DBColumnExpr c = getCmdColumn(obe.expr);
-          orderBy.add(new DBOrderByExpr(c, obe.desc));
+          DBColumnExpr c = getCmdColumn(obe.getColumnExpr());
+          orderBy.add(new DBOrderByExpr(c, obe.isDescending()));
       }
    }
 

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/join/DBJoinExprEx.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/join/DBJoinExprEx.java?rev=1241967&r1=1241966&r2=1241967&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/join/DBJoinExprEx.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/join/DBJoinExprEx.java
Wed Feb  8 16:47:32 2012
@@ -40,7 +40,7 @@ public class DBJoinExprEx extends DBJoin
     private final static long serialVersionUID = 1L;
     private static final Logger log = LoggerFactory.getLogger(DBJoinExprEx.class);
     
-    private final DBCompareExpr cmp;
+    protected final DBCompareExpr cmp;
     
     private static DBColumnExpr findFirstColumn(DBCompareExpr expr)
     {

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/order/DBOrderByExpr.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/order/DBOrderByExpr.java?rev=1241967&r1=1241966&r2=1241967&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/order/DBOrderByExpr.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/expr/order/DBOrderByExpr.java
Wed Feb  8 16:47:32 2012
@@ -29,8 +29,8 @@ public class DBOrderByExpr extends DBExp
 {
     private final static long serialVersionUID = 1L;
   
-    public DBColumnExpr expr;
-    public boolean desc;
+    protected final DBColumnExpr expr;
+    protected boolean desc;
 
     /**
      * Construct a new DBOrderByInfo object set the specified
@@ -44,6 +44,26 @@ public class DBOrderByExpr extends DBExp
         this.expr = expr;
         this.desc = desc;
     }
+    
+    public DBColumnExpr getColumnExpr()
+    {
+        return expr;
+    }
+    
+    public DBColumn getColumn()
+    {
+        return expr.getUpdateColumn();
+    }
+
+    public boolean isDescending()
+    {
+        return desc;
+    }
+
+    public void setDescending(boolean descending)
+    {
+        desc = descending;
+    }
 
     /*
      * @see org.apache.empire.db.DBExpr#getDatabase()



Mime
View raw message