public void deserialize(OResult fromResult) { item = new OFromItem(-1); item.deserialize(fromResult.getProperty("item")); }
private OSelectStatement buildSelectStatement(String className, OWhereClause oWhereClause) { OSelectStatement stm = new OSelectStatement(-1); stm.whereClause = oWhereClause; stm.target = new OFromClause(-1); stm.target.item = new OFromItem(-1); stm.target.item.identifier = new OIdentifier(className); return stm; }
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; }
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; }
for (OBinaryCondition cond : indexedFunctConditions) { OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.item = item; from.item.setIdentifier(new OIdentifier(oClass.getName()));
OSelectStatement select = new OSelectStatement(-1); select.setTarget(new OFromClause(-1)); select.getTarget().setItem(new OFromItem(-1)); if (clazz != null) { select.getTarget().getItem().setIdentifier(new OIdentifier(clazz));
private OSelectStatement indexChainToStatement(OModifier modifier, OClass clazz, OExpression right, OCommandContext ctx) { OClass queryClass = clazz; OSelectStatement result = new OSelectStatement(-1); result.target = new OFromClause(-1); result.target.setItem(new OFromItem(-1)); result.target.getItem().identifier = new OIdentifier(queryClass.getName()); result.whereClause = new OWhereClause(-1); OBinaryCondition base = new OBinaryCondition(-1); result.whereClause.baseExpression = new ONotBlock(-1); ((ONotBlock) result.whereClause.baseExpression).sub = base; ((ONotBlock) result.whereClause.baseExpression).negate = false; base.left = new OExpression(-1); base.left.mathExpression = new OBaseExpression(-1); ((OBaseExpression) base.left.mathExpression).identifier = new OBaseIdentifier(modifier.suffix.identifier); ((OBaseExpression) base.left.mathExpression).modifier = modifier.next == null ? null : modifier.next.copy(); base.operator = new OEqualsCompareOperator(-1); base.right = right.copy(); return result; } }
} else if (paramValue instanceof OClass) { OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.setItem(item); item.setIdentifier(new OIdentifier(((OClass) paramValue).getName())); OFromItem item = new OFromItem(-1); from.setItem(item); item.setIdentifier(new OIdentifier((String) paramValue));
} else if (paramValue instanceof OClass) { OFromClause from = new OFromClause(-1); OFromItem item = new OFromItem(-1); from.setItem(item); item.setIdentifier(new OIdentifier(((OClass) paramValue).getName())); OFromItem item = new OFromItem(-1); from.setItem(item); item.setIdentifier(new OIdentifier((String) paramValue));
final public OFromItem FromItem() throws ParseException { OFromItem jjtn000 = new OFromItem(JJTFROMITEM); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);
public ODeleteExecutionPlan createExecutionPlan(OCommandContext ctx, boolean enableProfiling) { ODeleteExecutionPlan result = new ODeleteExecutionPlan(ctx); if (leftExpression != null || rightExpression != null) { handleGlobalLet(result, new OIdentifier("$__ORIENT_DELETE_EDGE_fromV"), leftExpression, ctx, enableProfiling); handleGlobalLet(result, new OIdentifier("$__ORIENT_DELETE_EDGE_toV"), rightExpression, ctx, enableProfiling); handleFetchFromTo(result, ctx, "$__ORIENT_DELETE_EDGE_fromV", "$__ORIENT_DELETE_EDGE_toV", className, targetClusterName, enableProfiling); handleWhere(result, ctx, whereClause, enableProfiling); } else if (whereClause != null) { OFromClause fromClause = new OFromClause(-1); OFromItem item = new OFromItem(-1); if (className == null) { item.setIdentifier(new OIdentifier("E")); } else { item.setIdentifier(className); } fromClause.setItem(item); handleTarget(result, ctx, fromClause, this.whereClause, enableProfiling); } else { handleTargetClass(result, ctx, className, enableProfiling); handleTargetCluster(result, ctx, targetClusterName, enableProfiling); handleTargetRids(result, ctx, rids, enableProfiling); } handleLimit(result, ctx, this.limit, enableProfiling); handleCastToEdge(result, ctx, enableProfiling); handleDelete(result, ctx, enableProfiling); handleReturn(result, ctx, enableProfiling); return result; }