1 21 package oracle.toplink.essentials.internal.parsing; 23 24 import oracle.toplink.essentials.expressions.*; 25 26 35 public class LengthNode extends StringFunctionNode { 36 37 40 public LengthNode() { 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 left.validateParameter(context, typeHelper.getStringType()); 53 } 54 setType(typeHelper.getIntType()); 55 } 56 57 61 public Expression generateExpression(GenerationContext context) { 62 Expression whereClause = getLeft().generateExpression(context); 63 whereClause = whereClause.length(); 64 return whereClause; 65 } 66 67 } 68 | Popular Tags |