/** */ public Object newIsEmpty(int line, int column, boolean not, Object expr) { EmptyCollectionComparisonNode node = new EmptyCollectionComparisonNode(); node.setLeft((Node)expr); if (not) node.indicateNot(); setPosition(node, line, column); return node; }
/** * INTERNAL * Validate node and calculate its type. */ public void validate(ParseTreeContext context) { if (left != null) { left.validate(context); } TypeHelper typeHelper = context.getTypeHelper(); setType(typeHelper.getBooleanType()); }
/** * INTERNAL * Return a EclipseLink expression for this node. */ public Expression generateExpression(GenerationContext context) { //get the variable name from the DotNode's right attribute //...WHERE emp.firstName IS EMPTY String emptyAttributeName = ((AttributeNode)getLeft().getRight()).getAttributeName(); Expression whereClause = getLeft().getLeft().generateExpression(context); if (notIndicated) { return whereClause.notEmpty(emptyAttributeName); } else { return whereClause.isEmpty(emptyAttributeName); } }
/** * INTERNAL * Validate node and calculate its type. */ public void validate(ParseTreeContext context) { if (left != null) { left.validate(context); } TypeHelper typeHelper = context.getTypeHelper(); setType(typeHelper.getBooleanType()); }
/** * INTERNAL * Return a EclipseLink expression for this node. */ public Expression generateExpression(GenerationContext context) { //get the variable name from the DotNode's right attribute //...WHERE emp.firstName IS EMPTY String emptyAttributeName = ((AttributeNode)getLeft().getRight()).getAttributeName(); Expression whereClause = getLeft().getLeft().generateExpression(context); if (notIndicated) { return whereClause.notEmpty(emptyAttributeName); } else { return whereClause.isEmpty(emptyAttributeName); } }
/** */ public Object newIsEmpty(int line, int column, boolean not, Object expr) { EmptyCollectionComparisonNode node = new EmptyCollectionComparisonNode(); node.setLeft((Node)expr); if (not) node.indicateNot(); setPosition(node, line, column); return node; }
/** * INTERNAL * Validate node and calculate its type. */ public void validate(ParseTreeContext context) { if (left != null) { left.validate(context); } TypeHelper typeHelper = context.getTypeHelper(); setType(typeHelper.getBooleanType()); }
/** * INTERNAL * Return a EclipseLink expression for this node. */ public Expression generateExpression(GenerationContext context) { //get the variable name from the DotNode's right attribute //...WHERE emp.firstName IS EMPTY String emptyAttributeName = ((AttributeNode)getLeft().getRight()).getAttributeName(); Expression whereClause = getLeft().getLeft().generateExpression(context); if (notIndicated) { return whereClause.notEmpty(emptyAttributeName); } else { return whereClause.isEmpty(emptyAttributeName); } }
/** */ public Object newIsEmpty(int line, int column, boolean not, Object expr) { EmptyCollectionComparisonNode node = new EmptyCollectionComparisonNode(); node.setLeft((Node)expr); if (not) node.indicateNot(); setPosition(node, line, column); return node; }