use of com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition in project orientdb by orientechnologies.
the class OQueryOperatorNot method getBeginRidRange.
@Override
public ORID getBeginRidRange(Object iLeft, Object iRight) {
if (iLeft instanceof OSQLFilterCondition) {
final ORID beginRange = ((OSQLFilterCondition) iLeft).getBeginRidRange();
final ORID endRange = ((OSQLFilterCondition) iLeft).getEndRidRange();
if (beginRange == null && endRange == null)
return null;
else if (beginRange == null)
return endRange;
else if (endRange == null)
return null;
else
return null;
}
return null;
}
use of com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition in project orientdb by orientechnologies.
the class OQueryOperatorOr method getEndRidRange.
@Override
public ORID getEndRidRange(final Object iLeft, final Object iRight) {
final ORID leftRange;
final ORID rightRange;
if (iLeft instanceof OSQLFilterCondition)
leftRange = ((OSQLFilterCondition) iLeft).getEndRidRange();
else
leftRange = null;
if (iRight instanceof OSQLFilterCondition)
rightRange = ((OSQLFilterCondition) iRight).getEndRidRange();
else
rightRange = null;
if (leftRange == null || rightRange == null)
return null;
else
return leftRange.compareTo(rightRange) >= 0 ? leftRange : rightRange;
}
use of com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition in project orientdb by orientechnologies.
the class OQueryOperatorTraverse method evaluateExpression.
@Override
protected boolean evaluateExpression(final OIdentifiable iRecord, final OSQLFilterCondition iCondition, final Object iLeft, final Object iRight, final OCommandContext iContext) {
final OSQLFilterCondition condition;
final Object target;
if (iCondition.getLeft() instanceof OSQLFilterCondition) {
condition = (OSQLFilterCondition) iCondition.getLeft();
target = iRight;
} else {
condition = (OSQLFilterCondition) iCondition.getRight();
target = iLeft;
}
final Set<ORID> evaluatedRecords = new HashSet<ORID>();
return traverse(target, condition, 0, evaluatedRecords, iContext);
}
Aggregations