1 21 package oracle.toplink.essentials.internal.parsing; 23 24 import oracle.toplink.essentials.expressions.*; 25 26 35 public class SqrtNode extends ArithmeticFunctionNode { 36 37 40 public SqrtNode() { 41 super(); 42 } 43 44 48 public void validate(ParseTreeContext context) { 49 TypeHelper typeHelper = context.getTypeHelper(); 50 if (left != null) { 51 left.validate(context); 52 } 53 setType(typeHelper.getDoubleType()); 54 } 55 56 59 public void validateParameter(ParseTreeContext context, Object contextType) { 60 left.validateParameter(context, contextType); 62 } 63 64 68 public Expression generateExpression(GenerationContext context) { 69 Expression whereClause = getLeft().generateExpression(context); 70 whereClause = whereClause.getFunction(ExpressionOperator.Sqrt); 71 return whereClause; 72 } 73 74 } 75 | Popular Tags |