1 package org.apache.ojb.jdo.jdoql; 2 3 17 18 23 public class Ordering extends QueryTreeNode 24 { 25 26 private Expression _expr; 27 28 private boolean _isAscending = true; 29 30 36 public Ordering(Expression expr, boolean isAscending) 37 { 38 _expr = expr; 39 _isAscending = isAscending; 40 } 41 42 47 public Expression getExpression() 48 { 49 return _expr; 50 } 51 52 57 public boolean isAscending() 58 { 59 return _isAscending; 60 } 61 62 65 public void accept(Visitor visitor) 66 { 67 visitor.visit(this); 68 } 69 70 73 public String toString() 74 { 75 return _expr.toString() + " " + (_isAscending ? "ascending" : "descending"); 76 } 77 } 78 | Popular Tags |