public OCluster copy() { OCluster result = new OCluster(-1); result.clusterName = clusterName; result.clusterNumber = clusterNumber; return result; }
@Override public OCreateVertexStatement copy() { OCreateVertexStatement result = null; try { result = getClass().getConstructor(Integer.TYPE).newInstance(-1); } catch (Exception e) { throw new RuntimeException(e); } result.targetClass = targetClass == null ? null : targetClass.copy(); result.targetClusterName = targetClusterName == null ? null : targetClusterName.copy(); result.targetCluster = targetCluster == null ? null : targetCluster.copy(); result.returnStatement = returnStatement == null ? null : returnStatement.copy(); result.insertBody = insertBody == null ? null : insertBody.copy(); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OMoveVertexStatement that = (OMoveVertexStatement) o; if (!source.equals(that.source)) return false; if (targetCluster != null ? !targetCluster.equals(that.targetCluster) : that.targetCluster != null) return false; if (targetClass != null ? !targetClass.equals(that.targetClass) : that.targetClass != null) return false; if (updateOperations != null ? !updateOperations.equals(that.updateOperations) : that.updateOperations != null) return false; return batch != null ? batch.equals(that.batch) : that.batch == null; }
public MoveVertexStep(OIdentifier targetClass, OCluster targetCluster, OCommandContext ctx, boolean profilingEnabled) { super(ctx, profilingEnabled); this.targetClass = targetClass == null ? null : targetClass.getStringValue(); if (targetCluster != null) { this.targetCluster = targetCluster.getClusterName(); if (this.targetCluster == null) { this.targetCluster = ctx.getDatabase().getClusterNameById(targetCluster.getClusterNumber()); } } }
final public OCluster Cluster() throws ParseException { OCluster jjtn000 = new OCluster(JJTCLUSTER); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));Token cName; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { jjtn000.jjtSetLastToken(getToken(0)); {if (true) return jjtn000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtn000.jjtSetLastToken(getToken(0));
cluster = new OCluster(-1); cluster.deserialize(fromResult.getProperty("cluster"));
@Override public int hashCode() { int result = rids != null ? rids.hashCode() : 0; result = 31 * result + (inputParams != null ? inputParams.hashCode() : 0); result = 31 * result + (cluster != null ? cluster.hashCode() : 0); result = 31 * result + (clusterList != null ? clusterList.hashCode() : 0); result = 31 * result + (index != null ? index.hashCode() : 0); result = 31 * result + (metadata != null ? metadata.hashCode() : 0); result = 31 * result + (statement != null ? statement.hashCode() : 0); result = 31 * result + (inputParam != null ? inputParam.hashCode() : 0); result = 31 * result + (identifier != null ? identifier.hashCode() : 0); result = 31 * result + (functionCall != null ? functionCall.hashCode() : 0); result = 31 * result + (modifier != null ? modifier.hashCode() : 0); return result; }
result.setProperty("cluster", cluster.serialize());
if (this.clusters != null) { for (OCluster c : this.clusters) { if (c.getClusterName() != null) { targetClusterNames.add(c.getClusterName()); } else { String clusterName = db.getClusterNameById(c.getClusterNumber()); if (clusterName == null) { throw new OCommandExecutionException("Cluster not found: " + c.getClusterNumber());
@Override public int hashCode() { int result = source.hashCode(); result = 31 * result + (targetCluster != null ? targetCluster.hashCode() : 0); result = 31 * result + (targetClass != null ? targetClass.hashCode() : 0); result = 31 * result + (updateOperations != null ? updateOperations.hashCode() : 0); result = 31 * result + (batch != null ? batch.hashCode() : 0); return result; }
Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName()); for (int i = 0; i < clusters.size(); i++) { OCluster cluster = clusters.get(i); Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName());
public OFromItem copy() { OFromItem result = new OFromItem(-1); if (rids != null) { result.rids = rids.stream().map(r -> r.copy()).collect(Collectors.toList()); } if (inputParams != null) { result.inputParams = inputParams.stream().map(r -> r.copy()).collect(Collectors.toList()); } result.cluster = cluster == null ? null : cluster.copy(); result.clusterList = clusterList == null ? null : clusterList.copy(); result.index = index == null ? null : index.copy(); result.metadata = metadata == null ? null : metadata.copy(); result.statement = statement == null ? null : statement.copy(); result.inputParam = inputParam == null ? null : inputParam.copy(); result.identifier = identifier == null ? null : identifier.copy(); result.functionCall = functionCall == null ? null : functionCall.copy(); result.modifier = modifier == null ? null : modifier.copy(); return result; }
public List<OCluster> toListOfClusters() { List<OCluster> result = new ArrayList<>(); for (OIdentifier id : clusters) { OCluster cluster = new OCluster(-1); cluster.clusterName = id.getStringValue(); result.add(cluster); } return result; }
@Override public int hashCode() { int result = targetClass != null ? targetClass.hashCode() : 0; result = 31 * result + (targetClusterName != null ? targetClusterName.hashCode() : 0); result = 31 * result + (targetCluster != null ? targetCluster.hashCode() : 0); result = 31 * result + (returnStatement != null ? returnStatement.hashCode() : 0); result = 31 * result + (insertBody != null ? insertBody.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OCreateVertexStatement that = (OCreateVertexStatement) o; if (targetClass != null ? !targetClass.equals(that.targetClass) : that.targetClass != null) return false; if (targetClusterName != null ? !targetClusterName.equals(that.targetClusterName) : that.targetClusterName != null) return false; if (targetCluster != null ? !targetCluster.equals(that.targetCluster) : that.targetCluster != null) return false; if (returnStatement != null ? !returnStatement.equals(that.returnStatement) : that.returnStatement != null) return false; if (insertBody != null ? !insertBody.equals(that.insertBody) : that.insertBody != null) return false; return true; }
String name = cluster.getClusterName(); Integer clusterId = cluster.getClusterNumber(); if (name == null) { name = db.getClusterNameById(clusterId); Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName()); for (int i = 0; i < clusters.size(); i++) { OCluster cluster = clusters.get(i); Integer clusterId = cluster.getClusterNumber(); if (clusterId == null) { clusterId = db.getClusterIdByName(cluster.getClusterName());
@Override public OMoveVertexStatement copy() { OMoveVertexStatement result = new OMoveVertexStatement(-1); result.source = source.copy(); result.targetClass = targetClass == null ? null : targetClass.copy(); result.targetCluster = targetCluster == null ? null : targetCluster.copy(); result.updateOperations = updateOperations == null ? null : updateOperations.copy(); result.batch = batch == null ? null : batch.copy(); return result; }
private OSelectStatement createSelectStatement(String targetClass, String targetCluster, ORid targetRid, OWhereClause filter) { OSelectStatement prefetchStm = new OSelectStatement(-1); prefetchStm.setWhereClause(filter); OFromClause from = new OFromClause(-1); OFromItem fromItem = new OFromItem(-1); if (targetRid != null) { fromItem.setRids(Collections.singletonList(targetRid)); } else if (targetClass != null) { fromItem.setIdentifier(new OIdentifier(targetClass)); } else if (targetCluster != null) { fromItem.setCluster(new OCluster(targetCluster)); } from.setItem(fromItem); prefetchStm.setTarget(from); return prefetchStm; }
@Override public int hashCode() { int result = targetClass != null ? targetClass.hashCode() : 0; result = 31 * result + (targetClusterName != null ? targetClusterName.hashCode() : 0); result = 31 * result + (targetCluster != null ? targetCluster.hashCode() : 0); result = 31 * result + (targetIndex != null ? targetIndex.hashCode() : 0); result = 31 * result + (insertBody != null ? insertBody.hashCode() : 0); result = 31 * result + (returnStatement != null ? returnStatement.hashCode() : 0); result = 31 * result + (selectStatement != null ? selectStatement.hashCode() : 0); result = 31 * result + (selectInParentheses ? 1 : 0); result = 31 * result + (selectWithFrom ? 1 : 0); result = 31 * result + (unsafe ? 1 : 0); return result; }
if (inputParams != null ? !inputParams.equals(oFromItem.inputParams) : oFromItem.inputParams != null) return false; if (cluster != null ? !cluster.equals(oFromItem.cluster) : oFromItem.cluster != null) return false; if (clusterList != null ? !clusterList.equals(oFromItem.clusterList) : oFromItem.clusterList != null)