public JsonObject toJsonObject(TaskQueryVariableValue variable) { JsonObject jsonObject = JsonUtil.createObject(); JsonUtil.addField(jsonObject, "name", variable.getName()); JsonUtil.addFieldRawValue(jsonObject, "value", variable.getValue()); JsonUtil.addField(jsonObject, "operator", variable.getOperator().name()); return jsonObject; }
public JsonObject toJsonObject(TaskQueryVariableValue variable) { JsonObject jsonObject = JsonUtil.createObject(); JsonUtil.addField(jsonObject, "name", variable.getName()); JsonUtil.addFieldRawValue(jsonObject, "value", variable.getValue()); JsonUtil.addField(jsonObject, "operator", variable.getOperator().name()); return jsonObject; }
public JsonObject toJsonObject(QueryEntityRelationCondition filteringProperty) { JsonObject jsonObject = JsonUtil.createObject(); JsonUtil.addField(jsonObject, BASE_PROPERTY, filteringProperty.getProperty().getName()); QueryProperty comparisonProperty = filteringProperty.getComparisonProperty(); if (comparisonProperty != null) { JsonUtil.addField(jsonObject, COMPARISON_PROPERTY, comparisonProperty.getName()); } Object scalarValue = filteringProperty.getScalarValue(); if (scalarValue != null) { JsonUtil.addFieldRawValue(jsonObject, SCALAR_VALUE, scalarValue); } return jsonObject; }
public JsonObject toJsonObject(QueryEntityRelationCondition filteringProperty) { JsonObject jsonObject = JsonUtil.createObject(); JsonUtil.addField(jsonObject, BASE_PROPERTY, filteringProperty.getProperty().getName()); QueryProperty comparisonProperty = filteringProperty.getComparisonProperty(); if (comparisonProperty != null) { JsonUtil.addField(jsonObject, COMPARISON_PROPERTY, comparisonProperty.getName()); } Object scalarValue = filteringProperty.getScalarValue(); if (scalarValue != null) { JsonUtil.addFieldRawValue(jsonObject, SCALAR_VALUE, scalarValue); } return jsonObject; }