public ORid copy() { ORid result = new ORid(-1); result.cluster = cluster == null ? null : cluster.copy(); result.position = position == null ? null : position.copy(); result.expression = expression == null ? null : expression.copy(); result.legacy = legacy; return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OTruncateRecordStatement that = (OTruncateRecordStatement) o; if (record != null ? !record.equals(that.record) : that.record != null) return false; if (records != null ? !records.equals(that.records) : that.records != null) return false; return true; }
ORID orid = ((OIdentifiable) paramValue).getIdentity(); ORid rid = new ORid(-1); OInteger cluster = new OInteger(-1); cluster.setValue(orid.getClusterId()); OInteger position = new OInteger(-1); position.setValue(orid.getClusterPosition()); rid.setLegacy(true); rid.setCluster(cluster); rid.setPosition(position); ORid rid = new ORid(-1); OInteger cluster = new OInteger(-1); cluster.setValue(orid.getClusterId()); OInteger position = new OInteger(-1); position.setValue(orid.getClusterPosition()); rid.setCluster(cluster); rid.setPosition(position);
public void deserialize(OResult fromResult) { alias = fromResult.getProperty("alias"); if (fromResult.getProperty("modifier") != null) { modifier = new OModifier(-1); modifier.deserialize(fromResult.getProperty("modifier")); } recordAttr = fromResult.getProperty("recordAttr"); if (fromResult.getProperty("rid") != null) { rid = new ORid(-1); rid.deserialize(fromResult.getProperty("rid")); } type = DESC.equals(fromResult.getProperty("type")) ? DESC : ASC; if (fromResult.getProperty("collate") != null) { collate = new OExpression(-1); collate.deserialize(fromResult.getProperty("collate")); } }
final public ORid Rid() throws ParseException { ORid jjtn000 = new ORid(JJTRID); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { if (jj_2_1(4)) { jjtn000.jjtSetLastToken(getToken(0)); {if (true) return jjtn000;} } catch (Throwable jjte000) { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtn000.jjtSetLastToken(getToken(0));
private long calculateMinClusterPosition() { if (queryPlanning == null || queryPlanning.ridRangeConditions == null || queryPlanning.ridRangeConditions.isEmpty()) { return -1; } long maxValue = -1; for (OBooleanExpression ridRangeCondition : queryPlanning.ridRangeConditions.getSubBlocks()) { if (ridRangeCondition instanceof OBinaryCondition) { OBinaryCondition cond = (OBinaryCondition) ridRangeCondition; ORid condRid = cond.getRight().getRid(); OBinaryCompareOperator operator = cond.getOperator(); if (condRid != null) { if (condRid.getCluster().getValue().intValue() != this.clusterId) { continue; } if (operator instanceof OGtOperator || operator instanceof OGeOperator) { maxValue = Math.max(maxValue, condRid.getPosition().getValue().longValue()); } } } } return maxValue; }
@Override public int hashCode() { int result = record != null ? record.hashCode() : 0; result = 31 * result + (records != null ? records.hashCode() : 0); return result; } }
/** * 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); }
ORID orid = ((OIdentifiable) paramValue).getIdentity(); ORid rid = new ORid(-1); OInteger cluster = new OInteger(-1); cluster.setValue(orid.getClusterId()); OInteger position = new OInteger(-1); position.setValue(orid.getClusterPosition()); rid.setLegacy(true); rid.setCluster(cluster); rid.setPosition(position); ORid rid = new ORid(-1); OInteger cluster = new OInteger(-1); cluster.setValue(orid.getClusterId()); OInteger position = new OInteger(-1); position.setValue(orid.getClusterPosition()); rid.setCluster(cluster); rid.setPosition(position); if (filterClusters == null || isFromClusters(rid, filterClusters, ctx.getDatabase())) { rids.add(rid);
public void deserialize(OResult fromResult) { if (fromResult.getProperty("rid") != null) { rid = new ORid(-1); rid.deserialize(fromResult.getProperty("rid")); } if (fromResult.getProperty("inputParam") != null) { inputParam = OInputParameter.deserializeFromOResult(fromResult.getProperty("inputParam")); } if (fromResult.getProperty("expression") != null) { expression = new OExpression(-1); expression.deserialize(fromResult.getProperty("expression")); } if (fromResult.getProperty("integer") != null) { integer = new OInteger(-1); integer.deserialize(fromResult.getProperty("integer")); } } }
@Override public int hashCode() { int result = rid != null ? rid.hashCode() : 0; result = 31 * result + (subQuery != null ? subQuery.hashCode() : 0); result = 31 * result + (targets != null ? targets.hashCode() : 0); return result; }
public OResult serialize() { OResultInternal result = new OResultInternal(); if (rid != null) { result.setProperty("rid", rid.serialize()); } if (inputParam != null) { result.setProperty("inputParam", inputParam.serialize()); } if (expression != null) { result.setProperty("expression", expression.serialize()); } if (integer != null) { result.setProperty("integer", integer.serialize()); } return result; }
if (item.getRids() != null && item.getRids().size() > 0) { if (item.getRids().size() == 1) { OInteger cluster = item.getRids().get(0).getCluster(); result.add(db.getClusterNameById(cluster.getValue().intValue())); } else { for (ORid rid : item.getRids()) { OInteger cluster = rid.getCluster(); result.add(db.getClusterNameById(cluster.getValue().intValue()));
public void deserialize(OResult fromResult) { singleQuotes = fromResult.getProperty("singleQuotes"); doubleQuotes = fromResult.getProperty("doubleQuotes"); isNull = fromResult.getProperty("isNull"); if (fromResult.getProperty("rid") != null) { rid = new ORid(-1); rid.deserialize(fromResult.getProperty("rid")); } if (fromResult.getProperty("mathExpression") != null) { mathExpression = OMathExpression.deserializeFromResult(fromResult.getProperty("mathExpression")); } if (fromResult.getProperty("arrayConcatExpression") != null) { arrayConcatExpression = new OArrayConcatExpression(-1); arrayConcatExpression.deserialize(fromResult.getProperty("arrayConcatExpression")); } if (fromResult.getProperty("json") != null) { json = new OJson(-1); json.deserialize(fromResult.getProperty("json")); } booleanValue = fromResult.getProperty("booleanValue"); }
@Override public OFindReferencesStatement copy() { OFindReferencesStatement result = new OFindReferencesStatement(-1); result.rid = rid == null ? null : rid.copy(); result.subQuery = subQuery == null ? null : subQuery.copy(); result.targets = targets == null ? null : targets.stream().map(x -> x.copy()).collect(Collectors.toList()); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OFindReferencesStatement that = (OFindReferencesStatement) o; if (rid != null ? !rid.equals(that.rid) : that.rid != null) return false; if (subQuery != null ? !subQuery.equals(that.subQuery) : that.subQuery != null) return false; if (targets != null ? !targets.equals(that.targets) : that.targets != null) return false; return true; }
@Override public int hashCode() { int result = alias != null ? alias.hashCode() : 0; result = 31 * result + (modifier != null ? modifier.hashCode() : 0); result = 31 * result + (recordAttr != null ? recordAttr.hashCode() : 0); result = 31 * result + (rid != null ? rid.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (collate != null ? collate.hashCode() : 0); return result; }