Java Code Examples for com.google.datastore.v1.ArrayValue#newBuilder()
The following examples show how to use
com.google.datastore.v1.ArrayValue#newBuilder() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DatastoreHelper.java From google-cloud-datastore with Apache License 2.0 | 5 votes |
/** * Make a list value containing the specified values. */ public static Value.Builder makeValue(Value value1, Value value2, Value... rest) { ArrayValue.Builder arrayValue = ArrayValue.newBuilder(); arrayValue.addValues(value1); arrayValue.addValues(value2); arrayValue.addAllValues(Arrays.asList(rest)); return Value.newBuilder().setArrayValue(arrayValue); }
Example 2
Source File: DatastoreHelper.java From google-cloud-datastore with Apache License 2.0 | 5 votes |
/** * Make an array value containing the specified values. */ public static Value.Builder makeValue(Value.Builder value1, Value.Builder value2, Value.Builder... rest) { ArrayValue.Builder arrayValue = ArrayValue.newBuilder(); arrayValue.addValues(value1); arrayValue.addValues(value2); for (Value.Builder builder : rest) { arrayValue.addValues(builder); } return Value.newBuilder().setArrayValue(arrayValue); }