1 21 package oracle.toplink.essentials.internal.parsing; 23 24 import oracle.toplink.essentials.expressions.*; 25 26 35 public class MinusNode extends BinaryOperatorNode { 36 public MinusNode() { 37 super(); 38 } 39 40 44 public void validate(ParseTreeContext context) { 45 super.validate(context); 46 if ((left != null) && (right != null)) { 47 TypeHelper typeHelper = context.getTypeHelper(); 48 setType(typeHelper.extendedBinaryNumericPromotion( 49 left.getType(), right.getType())); 50 } 51 } 52 53 61 public Expression generateExpression(GenerationContext context) { 62 Expression whereClause = getLeft().generateExpression(context); 63 whereClause = ExpressionMath.subtract(whereClause, getRight().generateExpression(context)); 64 return whereClause; 65 } 66 67 public boolean isMinusNode() { 68 return true; 69 } 70 } 71 | Popular Tags |