1 21 package oracle.toplink.essentials.internal.parsing; 23 24 25 38 import oracle.toplink.essentials.expressions.Expression; 39 import oracle.toplink.essentials.expressions.ExpressionOperator; 40 41 public class SortDirectionNode extends Node { 42 private int sortDirection = ExpressionOperator.Ascending; 43 44 48 public Expression addToExpression(Expression parentExpression, GenerationContext context) { 49 return parentExpression.getFunction(getSortDirection()); 50 } 51 52 public void useAscending() { 53 setSortDirection(ExpressionOperator.Ascending); 54 } 55 56 public void useDescending() { 57 setSortDirection(ExpressionOperator.Descending); 58 } 59 60 public int getSortDirection() { 62 return sortDirection; 63 } 64 65 public void setSortDirection(int sortDirection) { 66 this.sortDirection = sortDirection; 67 } 68 } 69 | Popular Tags |