/** */ public Expression addToExpression(Expression parentExpression, GenerationContext context) { if (isCollectionAttribute()) { //special case for NOT MEMBER OF if (context.hasMemberOfNode()) { return parentExpression.noneOf(name, new ExpressionBuilder().equal(context.getMemberOfNode().getLeftExpression())); } return outerJoin ? parentExpression.anyOfAllowingNone(name) : parentExpression.anyOf(name); } else { // check whether collection attribute is required if (requiresCollectionAttribute()) { throw JPQLException.invalidCollectionMemberDecl( context.getParseTreeContext().getQueryInfo(), getLine(), getColumn(), name); } if (context.shouldUseOuterJoins() || isOuterJoin()) { return parentExpression.getAllowingNull(name); } else { return parentExpression.get(name); } } }
/** */ public Expression addToExpression(Expression parentExpression, GenerationContext context) { if (isCollectionAttribute()) { //special case for NOT MEMBER OF if (context.hasMemberOfNode()) { return parentExpression.noneOf(name, new ExpressionBuilder().equal(context.getMemberOfNode().getLeftExpression())); } return outerJoin ? appendCast(parentExpression.anyOfAllowingNone(name), context) : appendCast(parentExpression.anyOf(name), context); } else { // check whether collection attribute is required if (requiresCollectionAttribute()) { throw JPQLException.invalidCollectionMemberDecl( context.getParseTreeContext().getQueryInfo(), getLine(), getColumn(), name); } if (context.shouldUseOuterJoins() || isOuterJoin()) { return appendCast(parentExpression.getAllowingNull(name), context); } else { return appendCast(parentExpression.get(name), context); } } }
/** */ public Expression addToExpression(Expression parentExpression, GenerationContext context) { if (isCollectionAttribute()) { //special case for NOT MEMBER OF if (context.hasMemberOfNode()) { return parentExpression.noneOf(name, new ExpressionBuilder().equal(context.getMemberOfNode().getLeftExpression())); } return outerJoin ? appendCast(parentExpression.anyOfAllowingNone(name), context) : appendCast(parentExpression.anyOf(name), context); } else { // check whether collection attribute is required if (requiresCollectionAttribute()) { throw JPQLException.invalidCollectionMemberDecl( context.getParseTreeContext().getQueryInfo(), getLine(), getColumn(), name); } if (context.shouldUseOuterJoins() || isOuterJoin()) { return appendCast(parentExpression.getAllowingNull(name), context); } else { return appendCast(parentExpression.get(name), context); } } }