final public OInOperator InOperator() throws ParseException { /*@bgen(jjtree) InOperator */ OInOperator jjtn000 = new OInOperator(JJTINOPERATOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { jj_consume_token(IN); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.jjtSetLastToken(getToken(0)); {if (true) return jjtn000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtn000.jjtSetLastToken(getToken(0)); } } throw new Error("Missing return statement in function"); }
@Override public ORightBinaryCondition copy() { ORightBinaryCondition result = new ORightBinaryCondition(-1); result.operator = operator == null ? null : operator.copy(); result.not = not; result.inOperator = inOperator == null ? null : inOperator.copy(); result.right = right == null ? null : right.copy(); return result; }
public void deserialize(OResult fromResult) { try { operator = (OBinaryCompareOperator) Class.forName(String.valueOf(fromResult.getProperty("operator"))).newInstance(); } catch (Exception e) { throw OException.wrapException(new OCommandExecutionException(""), e); } not = fromResult.getProperty("not"); if (Boolean.TRUE.equals(fromResult.getProperty("in"))) { inOperator = new OInOperator(-1); } right = new OExpression(-1); right.deserialize(fromResult.getProperty("right")); } }
@Override public OBooleanExpression rewriteIndexChainsAsSubqueries(OCommandContext ctx, OClass clazz) { if (operator instanceof OEqualsCompareOperator && right.isEarlyCalculated(ctx) && left.isIndexChain(ctx, clazz)) { OInCondition result = new OInCondition(-1); result.left = new OExpression(-1); OBaseExpression base = new OBaseExpression(-1); base.identifier = new OBaseIdentifier(-1); base.identifier.suffix = new OSuffixIdentifier(-1); base.identifier.suffix.identifier = ((OBaseExpression) left.mathExpression).identifier.suffix.identifier; result.left.mathExpression = base; result.operator = new OInOperator(-1); OClass nextClazz = clazz.getProperty(base.identifier.suffix.identifier.getStringValue()).getLinkedClass(); result.rightStatement = indexChainToStatement(((OBaseExpression) left.mathExpression).modifier, nextClazz, right, ctx); return result; } return this; }