public OInsertBody copy() { OInsertBody result = new OInsertBody(-1); result.identifierList = identifierList == null ? null : identifierList.stream().map(x -> x.copy()).collect(Collectors.toList()); result.valueExpressions = valueExpressions == null ? null : valueExpressions.stream().map(sub -> sub.stream().map(x -> x.copy()).collect(Collectors.toList())) .collect(Collectors.toList()); result.setExpressions = setExpressions == null ? null : setExpressions.stream().map(x -> x.copy()).collect(Collectors.toList()); result.content = content == null ? null : content.copy(); result.contentInputParam = contentInputParam == null ? null : contentInputParam.copy(); return result; }
public static OInputParameter deserializeFromOResult(OResult doc) { try { OInputParameter result = (OInputParameter) Class.forName(doc.getProperty("__class")).getConstructor(Integer.class) .newInstance(-1); result.deserialize(doc); } catch (Exception e) { throw OException.wrapException(new OCommandExecutionException(""), e); } return null; }
public Integer evaluate(OCommandContext ctx) { if (this.num != null) { return num.getValue().intValue(); } else if (inputParam != null) { Object obj = inputParam.getValue(ctx.getInputParameters()); if (obj == null || !(obj instanceof Number)) { throw new OCommandExecutionException("" + obj + " is not a number (BATCH)"); } return ((Number) obj).intValue(); } return -1; }
final public OInputParameter InputParameter() throws ParseException { OInputParameter jjtn000 = new OInputParameter(JJTINPUTPARAMETER); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));OInputParameter result; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { jjtn000.jjtSetLastToken(getToken(0)); {if (true) return result;} } catch (Throwable jjte000) { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtn000.jjtSetLastToken(getToken(0));
public void toString(Map<Object, Object> params, StringBuilder builder) { if (inputValue != null) { inputValue.toString(params, builder); } else if (expressionValue != null) { expressionValue.toString(params, builder); } else if (integer != null) { builder.append(integer); } }
public OResult serialize() { OResultInternal result = (OResultInternal) super.serialize(); result.setProperty("paramNumber", paramNumber); 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")); } } }
Object o = iterator.next(); OExpression exp = new OExpression(-1); exp.value = toParsedTree(o); coll.expressions.add(exp); item.leftString = "" + ((Map.Entry) entry).getKey(); OExpression exp = new OExpression(-1); exp.value = toParsedTree(((Map.Entry) entry).getValue()); item.right = exp; json.items.add(item);
public void toString(Map<Object, Object> params, StringBuilder builder) { if (num == null && inputParam == null) { return; } builder.append(" BATCH "); if (num != null) { num.toString(params, builder); } else { inputParam.toString(params, builder); } }
public OResult serialize() { OResultInternal result = (OResultInternal) super.serialize(); result.setProperty("paramNumber", paramNumber); result.setProperty("paramName", paramName); 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")); } } }
public Object getValue(OResult iCurrentRecord, Object iResult, OCommandContext ctx) { Object result = null; if (inputParam != null) { result = inputParam.getValue(ctx.getInputParameters()); } else if (expression != null) { result = expression.execute(iCurrentRecord, ctx); } else if (integer != null) { result = integer; } if (result == null) { return null; } if (result instanceof Number) { return ((Number) result).intValue(); } return result; }
public OBatch copy() { OBatch result = new OBatch(-1); result.inputParam = inputParam == null ? null : inputParam.copy(); result.num = num == null ? null : num.copy(); return result; }
public void toString(Map<Object, Object> params, StringBuilder builder) { if (num == null && inputParam == null) { return; } builder.append(" LIMIT "); if (num != null) { num.toString(params, builder); } else { inputParam.toString(params, builder); } }
public OResult serialize() { OResultInternal result = new OResultInternal(); if (num != null) { result.setProperty("num", num.serialize()); } if (inputParam != null) { result.setProperty("inputParam", inputParam.serialize()); } return result; }
public void deserialize(OResult fromResult) { if (fromResult.getProperty("inputValue") != null) { inputValue = OInputParameter.deserializeFromOResult(fromResult.getProperty("inputValue")); } if (fromResult.getProperty("toSelector") != null) { expressionValue = new OMathExpression(-1); expressionValue.deserialize(fromResult.getProperty("expressionValue")); } integer = fromResult.getProperty("integer"); } }
public Integer getValue(OIdentifiable iCurrentRecord, Object iResult, OCommandContext ctx) { Object result = null; if (inputValue != null) { result = inputValue.getValue(ctx.getInputParameters()); } else if (expressionValue != null) { result = expressionValue.execute(iCurrentRecord, ctx); } else if (integer != null) { result = integer; } if (result == null) { return null; } if (result instanceof Number) { return ((Number) result).intValue(); } return null; }
public OSkip copy() { OSkip result = new OSkip(-1); result.num = num == null ? null : num.copy(); result.inputParam = inputParam == null ? null : inputParam.copy(); return result; }
public void toString(Map<Object, Object> params, StringBuilder builder) { if (num == null && inputParam == null) { return; } builder.append(" SKIP "); if (num != null) { num.toString(params, builder); } else { inputParam.toString(params, builder); } }
public OResult serialize() { OResultInternal result = new OResultInternal(); if (num != null) { result.setProperty("num", num.serialize()); } if (inputParam != null) { result.setProperty("inputParam", inputParam.serialize()); } return result; }