public OArrayRangeSelector copy() { OArrayRangeSelector result = new OArrayRangeSelector(-1); result.from = from; result.to = to; result.newRange = newRange; result.included = included; result.fromSelector = fromSelector == null ? null : fromSelector.copy(); result.toSelector = toSelector == null ? null : toSelector.copy(); return result; }
public void applyRemove(Object currentValue, OResultInternal originalRecord, OCommandContext ctx) { if (next != null) { Object val = calculateLocal(originalRecord, currentValue, ctx); next.applyRemove(val, originalRecord, ctx); } else { if (arrayRange != null) { arrayRange.applyRemove(currentValue, originalRecord, ctx); } else if (condition != null) { //TODO throw new UnsupportedOperationException("Remove on conditional filtering will be supported soon"); } else if (arraySingleValues != null) { arraySingleValues.applyRemove(currentValue, originalRecord, ctx); } else if (rightBinaryCondition != null) { throw new UnsupportedOperationException("Remove on conditional filtering will be supported soon"); } else if (suffix != null) { suffix.applyRemove(currentValue, ctx); } else { throw new OCommandExecutionException("cannot apply REMOVE " + toString()); } } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OModifier oModifier = (OModifier) o; if (squareBrackets != oModifier.squareBrackets) return false; if (arrayRange != null ? !arrayRange.equals(oModifier.arrayRange) : oModifier.arrayRange != null) return false; if (condition != null ? !condition.equals(oModifier.condition) : oModifier.condition != null) return false; if (arraySingleValues != null ? !arraySingleValues.equals(oModifier.arraySingleValues) : oModifier.arraySingleValues != null) return false; if (rightBinaryCondition != null ? !rightBinaryCondition.equals(oModifier.rightBinaryCondition) : oModifier.rightBinaryCondition != null) return false; if (methodCall != null ? !methodCall.equals(oModifier.methodCall) : oModifier.methodCall != null) return false; if (suffix != null ? !suffix.equals(oModifier.suffix) : oModifier.suffix != null) return false; if (next != null ? !next.equals(oModifier.next) : oModifier.next != null) return false; return true; }
final public OArrayRangeSelector ArrayRangeSelector() throws ParseException { OArrayRangeSelector jjtn000 = new OArrayRangeSelector(JJTARRAYRANGESELECTOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));Token token; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { jjtn000.jjtSetLastToken(getToken(0)); {if (true) return jjtn000;} } catch (Throwable jjte000) { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtn000.jjtSetLastToken(getToken(0));
arrayRange = new OArrayRangeSelector(-1); arrayRange.deserialize(fromResult.getProperty("arrayRange"));
return suffix.execute(target, ctx); } else if (arrayRange != null) { return arrayRange.execute(currentRecord, target, ctx); } else if (condition != null) { if (target instanceof OResult || target instanceof OIdentifiable || target instanceof Map) {
public OModifier copy() { OModifier result = new OModifier(-1); result.squareBrackets = squareBrackets; result.arrayRange = arrayRange == null ? null : arrayRange.copy(); result.condition = condition == null ? null : condition.copy(); result.arraySingleValues = arraySingleValues == null ? null : arraySingleValues.copy(); result.rightBinaryCondition = rightBinaryCondition == null ? null : rightBinaryCondition.copy(); result.methodCall = methodCall == null ? null : methodCall.copy(); result.suffix = suffix == null ? null : suffix.copy(); result.next = next == null ? null : next.copy(); return result; }
@Override public int hashCode() { int result = (squareBrackets ? 1 : 0); result = 31 * result + (arrayRange != null ? arrayRange.hashCode() : 0); result = 31 * result + (condition != null ? condition.hashCode() : 0); result = 31 * result + (arraySingleValues != null ? arraySingleValues.hashCode() : 0); result = 31 * result + (rightBinaryCondition != null ? rightBinaryCondition.hashCode() : 0); result = 31 * result + (methodCall != null ? methodCall.hashCode() : 0); result = 31 * result + (suffix != null ? suffix.hashCode() : 0); result = 31 * result + (next != null ? next.hashCode() : 0); return result; }
public void extractSubQueries(SubQueryCollector collector) { if (arrayRange != null) { arrayRange.extractSubQueries(collector); } if (condition != null) { condition.extractSubQueries(collector); } if (arraySingleValues != null) { arraySingleValues.extractSubQueries(collector); } if (rightBinaryCondition != null) { rightBinaryCondition.extractSubQueries(collector); } if (methodCall != null) { methodCall.extractSubQueries(collector); } if (suffix != null) { suffix.extractSubQueries(collector); } if (next != null) { next.extractSubQueries(collector); } }
public Object execute(OResult iCurrentRecord, Object result, OCommandContext ctx) { if (ctx.getVariable("$current") == null) { ctx.setVariable("$current", iCurrentRecord); } if (methodCall != null) { result = methodCall.execute(result, ctx); } else if (suffix != null) { result = suffix.execute(result, ctx); } else if (arrayRange != null) { result = arrayRange.execute(iCurrentRecord, result, ctx); } else if (condition != null) { result = filterByCondition(result, ctx); } else if (arraySingleValues != null) { result = arraySingleValues.execute(iCurrentRecord, result, ctx); } else if (rightBinaryCondition != null) { result = rightBinaryCondition.execute(iCurrentRecord, result, ctx); } if (next != null) { result = next.execute(iCurrentRecord, result, ctx); } return result; }
@Override public OMatchFilterItem copy() { OMatchFilterItem result = new OMatchFilterItem(-1); result.className = className == null ? null : className.copy(); result.classNames = classNames == null ? null : classNames.copy(); result.clusterName = clusterName == null ? null : clusterName.copy(); result.clusterId = clusterId == null ? null : clusterId.copy(); result.rid = rid == null ? null : rid.copy(); result.alias = alias == null ? null : alias.copy(); result.filter = filter == null ? null : filter.copy(); result.whileCondition = whileCondition == null ? null : whileCondition.copy(); result.depth = depth == null ? null : depth.copy(); result.maxDepth = maxDepth == null ? null : maxDepth.copy(); result.optional = optional; result.depthAlias = depthAlias == null ? null : depthAlias.copy(); result.pathAlias = pathAlias == null ? null : pathAlias.copy(); return result; }
@Override public int hashCode() { int result = className != null ? className.hashCode() : 0; result = 31 * result + (classNames != null ? classNames.hashCode() : 0); result = 31 * result + (clusterName != null ? clusterName.hashCode() : 0); result = 31 * result + (clusterId != null ? clusterId.hashCode() : 0); result = 31 * result + (rid != null ? rid.hashCode() : 0); result = 31 * result + (alias != null ? alias.hashCode() : 0); result = 31 * result + (filter != null ? filter.hashCode() : 0); result = 31 * result + (whileCondition != null ? whileCondition.hashCode() : 0); result = 31 * result + (depth != null ? depth.hashCode() : 0); result = 31 * result + (maxDepth != null ? maxDepth.hashCode() : 0); result = 31 * result + (optional != null ? optional.hashCode() : 0); result = 31 * result + (depthAlias != null ? depthAlias.hashCode() : 0); result = 31 * result + (pathAlias != null ? pathAlias.hashCode() : 0); return result; } }
public Object execute(OIdentifiable iCurrentRecord, Object result, OCommandContext ctx) { if (ctx.getVariable("$current") == null) { ctx.setVariable("$current", iCurrentRecord); } if (methodCall != null) { result = methodCall.execute(result, ctx); } else if (suffix != null) { result = suffix.execute(result, ctx); } else if (arrayRange != null) { result = arrayRange.execute(iCurrentRecord, result, ctx); } else if (condition != null) { result = filterByCondition(result, ctx); } else if (arraySingleValues != null) { result = arraySingleValues.execute(iCurrentRecord, result, ctx); } else if (rightBinaryCondition != null) { result = rightBinaryCondition.execute(iCurrentRecord, result, ctx); } if (next != null) { result = next.execute(iCurrentRecord, result, ctx); } return result; }
if (whileCondition != null ? !whileCondition.equals(that.whileCondition) : that.whileCondition != null) return false; if (depth != null ? !depth.equals(that.depth) : that.depth != null) return false; if (maxDepth != null ? !maxDepth.equals(that.maxDepth) : that.maxDepth != null)