public void setValue(int sign, String stringValue) { int radix = radix(stringValue); stringValue = convertToJavaByRadix(stringValue, radix); if (stringValue.endsWith("L") || stringValue.endsWith("l")) { value = Long.parseLong(stringValue.substring(0, stringValue.length() - 1), radix) * sign; } else { long longValue = Long.parseLong(sign > 0 ? stringValue : "-" + stringValue, radix); if (longValue > Integer.MAX_VALUE || longValue < Integer.MIN_VALUE) { value = longValue; } else { value = (int) longValue; } } }
public OFetchPlanItem copy() { OFetchPlanItem result = new OFetchPlanItem(-1); result.star = star; result.leftDepth = leftDepth == null ? null : leftDepth.copy(); result.leftStar = leftStar; result.rightDepth = rightDepth == null ? null : rightDepth.copy(); result.fieldChain.addAll(fieldChain); return result; }
public void deserialize(OResult fromResult) { if (fromResult.getProperty("num") != null) { num = new OInteger(-1); num.deserialize(fromResult.getProperty("num")); } if (fromResult.getProperty("inputParam") != null) { inputParam = OInputParameter.deserializeFromOResult(fromResult.getProperty("inputParam")); } } }
final public OInteger Integer() throws ParseException { OInteger jjtn000 = new OInteger(JJTINTEGER); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));int sign = 1; Token tokenVal; try { jjtn000.setValue(sign, tokenVal.image); 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));
@Override public int hashCode() { return millis != null ? millis.hashCode() : 0; } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OSleepStatement that = (OSleepStatement) o; if (millis != null ? !millis.equals(that.millis) : that.millis != null) return false; return true; }
public OInteger copy() { OInteger result = new OInteger(-1); result.value = value; return result; }
public void toString(Map<Object, Object> params, StringBuilder builder) { if (legacy || (expression == null && cluster != null && position != null)) { builder.append("#" + cluster.getValue() + ":" + position.getValue()); } else { builder.append("{\"@rid\":"); expression.toString(params, builder); builder.append("}"); } }
public void deserialize(OResult fromResult) { star = fromResult.getProperty("star"); if (fromResult.getProperty("leftDepth") != null) { leftDepth = new OInteger(-1); leftDepth.deserialize(fromResult.getProperty("leftDepth")); } leftStar = fromResult.getProperty("leftStar"); if (fromResult.getProperty("rightDepth") != null) { rightDepth = new OInteger(-1); rightDepth.deserialize(fromResult.getProperty("rightDepth")); } if (fromResult.getProperty("fieldChain") != null) { List<String> ser = fromResult.getProperty("fieldChain"); fieldChain = new ArrayList<>(); fieldChain.addAll(ser); } } }
@Override public int hashCode() { return retry != null ? retry.hashCode() : 0; } }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OCommitStatement that = (OCommitStatement) o; if (retry != null ? !retry.equals(that.retry) : that.retry != null) return false; return true; }
@Override protected void fetchNextResults(OCommandContext ctx, int nRecords) { if (!this.entryPoints.isEmpty()) { OTraverseResult item = (OTraverseResult) this.entryPoints.remove(0); this.results.add(item); for (OTraverseProjectionItem proj : projections) { Object nextStep = proj.execute(item, ctx); if (this.maxDepth == null || this.maxDepth.getValue().intValue() > item.depth) { addNextEntryPoints(nextStep, item.depth + 1, (List<OIdentifiable>) item.getMetadata("$path"), ctx); } } } }
public void deserialize(OResult fromResult) { if (fromResult.getProperty("num") != null) { num = new OInteger(-1); num.deserialize(fromResult.getProperty("num")); } if (fromResult.getProperty("inputParam") != null) { inputParam = OInputParameter.deserializeFromOResult(fromResult.getProperty("inputParam")); } } }
@Override public int hashCode() { int result = num != null ? num.hashCode() : 0; result = 31 * result + (inputParam != null ? inputParam.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OBatch oBatch = (OBatch) o; if (num != null ? !num.equals(oBatch.num) : oBatch.num != null) return false; if (inputParam != null ? !inputParam.equals(oBatch.inputParam) : oBatch.inputParam != null) return false; return true; }
/** * checks if this RID is from one of these clusters * * @param rid * @param filterClusters * @param database * * @return */ private boolean isFromClusters(ORid rid, Set<String> filterClusters, ODatabase database) { if (filterClusters == null) { throw new IllegalArgumentException(); } String clusterName = database.getClusterNameById(rid.getCluster().getValue().intValue()); return filterClusters.contains(clusterName); }