@Override public OBinaryCondition copy() { OBinaryCondition result = new OBinaryCondition(-1); result.left = left.copy(); result.operator = (OBinaryCompareOperator) operator.copy(); result.right = right.copy(); return result; }
@Override public void deserialize(OResult fromResult) { try { OExecutionStepInternal.basicDeserialize(fromResult, this); functionCondition = new OBinaryCondition(-1); functionCondition.deserialize(fromResult.getProperty("functionCondition ")); queryTarget = new OFromClause(-1); queryTarget.deserialize(fromResult.getProperty("functionCondition ")); } catch (Exception e) { throw OException.wrapException(new OCommandExecutionException(""), e); } } }
List<String> fields = classIndex.getDefinition().getFields(); if (fields.size() == 1 && fields.get(0).equals(binaryCondition.getLeft().getDefaultAlias().getStringValue())) { OBinaryCondition indexCond = new OBinaryCondition(-1); indexCond.setLeft(new OExpression(new OIdentifier("key"))); indexCond.setOperator(new OEqualsCompareOperator(-1));
@Override public void deserialize(OResult fromResult) { try { OExecutionStepInternal.basicDeserialize(fromResult, this); indexName = fromResult.getProperty("indexName"); if (fromResult.getProperty("condition") != null) { condition = OBooleanExpression.deserializeFromOResult(fromResult.getProperty("condition")); } if (fromResult.getProperty("additionalRangeCondition") != null) { additionalRangeCondition = new OBinaryCondition(-1); additionalRangeCondition.deserialize(fromResult.getProperty("additionalRangeCondition")); } orderAsc = fromResult.getProperty("orderAsc"); } catch (Exception e) { throw OException.wrapException(new OCommandExecutionException(""), e); } }
OBinaryCondition keyCondition = new OBinaryCondition(-1); OIdentifier key = new OIdentifier("key"); keyCondition.setLeft(new OExpression(key)); found = true; indexFieldFound = true; OBinaryCondition condition = new OBinaryCondition(-1); condition.setLeft(left); condition.setOperator(operator); found = true; indexFieldFound = true; OBinaryCondition condition = new OBinaryCondition(-1); condition.setLeft(left); condition.setOperator(operator); indexFieldFound = true; breakHere = true;//this is last element, no other fields can be added to the key because this is a range condition OBinaryCondition condition = new OBinaryCondition(-1); condition.setLeft(left); condition.setOperator(operator); found = true; indexFieldFound = true; OBinaryCondition condition = new OBinaryCondition(-1); condition.setLeft(left); condition.setOperator(new OContainsValueOperator(-1));
private OSelectStatement indexChainToStatement(OModifier modifier, OClass clazz, OExpression right, OCommandContext ctx) { OClass queryClass = clazz; OSelectStatement result = new OSelectStatement(-1); result.target = new OFromClause(-1); result.target.setItem(new OFromItem(-1)); result.target.getItem().identifier = new OIdentifier(queryClass.getName()); result.whereClause = new OWhereClause(-1); OBinaryCondition base = new OBinaryCondition(-1); result.whereClause.baseExpression = new ONotBlock(-1); ((ONotBlock) result.whereClause.baseExpression).sub = base; ((ONotBlock) result.whereClause.baseExpression).negate = false; base.left = new OExpression(-1); base.left.mathExpression = new OBaseExpression(-1); ((OBaseExpression) base.left.mathExpression).identifier = new OBaseIdentifier(modifier.suffix.identifier); ((OBaseExpression) base.left.mathExpression).modifier = modifier.next == null ? null : modifier.next.copy(); base.operator = new OEqualsCompareOperator(-1); base.right = right.copy(); return result; } }
final public OBooleanExpression BinaryCondition() throws ParseException { OBinaryCondition jjtn000 = new OBinaryCondition(JJTBINARYCONDITION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);