Purpose: Represent a LIKE in EJBQL
Responsibilities:
LikeNode constructor comment. super();
super();
INTERNAL Return a TopLink expression for this node. Expression whereClause = getLeft().generateExpression(context); if (!hasEscape()) { whereClause = whereClause.like(getRight().generateExpression(context)); } else { whereClause = whereClause.like(getRight().generateExpression(context), getEscapeNode().generateExpression(context)); } return whereClause;
Expression whereClause = getLeft().generateExpression(context); if (!hasEscape()) { whereClause = whereClause.like(getRight().generateExpression(context)); } else { whereClause = whereClause.like(getRight().generateExpression(context), getEscapeNode().generateExpression(context)); } return whereClause;
return escape;
return getEscapeNode() != null;
escape = node;
INTERNAL Validate the current node and calculates its type. TypeHelper typeHelper = context.getTypeHelper(); if (left != null) { left.validate(context); left.validateParameter(context, typeHelper.getStringType()); } if (right != null) { right.validate(context); right.validateParameter(context, typeHelper.getStringType()); } if (escape != null) { escape.validate(context); } setType(typeHelper.getBooleanType());
TypeHelper typeHelper = context.getTypeHelper(); if (left != null) { left.validate(context); left.validateParameter(context, typeHelper.getStringType()); } if (right != null) { right.validate(context); right.validateParameter(context, typeHelper.getStringType()); } if (escape != null) { escape.validate(context); } setType(typeHelper.getBooleanType());