Class BaseEntity.Builder<K,B> (2.18.5)

public abstract static class BaseEntity.Builder<K,B>

Inheritance

java.lang.Object > BaseEntity.Builder<K,B>

Type Parameters

NameDescription
K
B

Methods

build()

public abstract BaseEntity<K> build()
Returns
TypeDescription
BaseEntity<K>

clear()

public B clear()

Clears all the properties.

Returns
TypeDescription
B

key()

protected K key()
Returns
TypeDescription
K

remove(String name)

public B remove(String name)

Removes a property with the given name.

Parameter
NameDescription
nameString
Returns
TypeDescription
B

set(String name, boolean value)

public B set(String name, boolean value)

Sets a property of type BooleanValue.

Parameters
NameDescription
nameString

name of the property

valueboolean

value associated with the property

Returns
TypeDescription
B

set(String name, boolean first, boolean second, boolean[] others)

public B set(String name, boolean first, boolean second, boolean[] others)

Sets a list property containing elements of type BooleanValue.

Parameters
NameDescription
nameString

name of the property

firstboolean

the first boolean in the list

secondboolean

the second boolean in the list

othersboolean[]

other booleans in the list

Returns
TypeDescription
B

set(String name, Timestamp value)

public B set(String name, Timestamp value)

Sets a property of type TimestampValue.

Parameters
NameDescription
nameString

name of the property

valuecom.google.cloud.Timestamp

value associated with the property

Returns
TypeDescription
B

set(String name, Timestamp first, Timestamp second, Timestamp[] others)

public B set(String name, Timestamp first, Timestamp second, Timestamp[] others)

Sets a list property containing elements of type TimestampValue.

Parameters
NameDescription
nameString

name of the property

firstcom.google.cloud.Timestamp

the first Timestamp in the list

secondcom.google.cloud.Timestamp

the second Timestamp in the list

otherscom.google.cloud.Timestamp[]

other Timestamps in the list

Returns
TypeDescription
B

set(String name, Blob value)

public B set(String name, Blob value)

Sets a property of type BlobValue.

Parameters
NameDescription
nameString

name of the property

valueBlob

value associated with the property

Returns
TypeDescription
B

set(String name, Blob first, Blob second, Blob[] others)

public B set(String name, Blob first, Blob second, Blob[] others)

Sets a list property containing elements of type BlobValue.

Parameters
NameDescription
nameString

name of the property

firstBlob

the first Blob in the list

secondBlob

the second Blob in the list

othersBlob[]

other Blobs in the list

Returns
TypeDescription
B

set(String name, FullEntity<?> value)

public B set(String name, FullEntity<?> value)

Sets a property of type EntityValue.

Parameters
NameDescription
nameString

name of the property

valueFullEntity<?>

value associated with the property

Returns
TypeDescription
B

set(String name, FullEntity<?> first, FullEntity<?> second, FullEntity<?>[] others)

public B set(String name, FullEntity<?> first, FullEntity<?> second, FullEntity<?>[] others)

Sets a list property containing elements of type EntityValue.

Parameters
NameDescription
nameString

name of the property

firstFullEntity<?>

the first FullEntity in the list

secondFullEntity<?>

the second FullEntity in the list

othersFullEntity<?>[]

other entities in the list

Returns
TypeDescription
B

set(String name, Key value)

public B set(String name, Key value)

Sets a property of type KeyValue.

Parameters
NameDescription
nameString

name of the property

valueKey

value associated with the property

Returns
TypeDescription
B

set(String name, Key first, Key second, Key[] others)

public B set(String name, Key first, Key second, Key[] others)

Sets a list property containing elements of type KeyValue.

Parameters
NameDescription
nameString

name of the property

firstKey

the first Key in the list

secondKey

the second Key in the list

othersKey[]

other Keys in the list

Returns
TypeDescription
B

set(String name, LatLng value)

public B set(String name, LatLng value)

Sets a property of type LatLng.

Parameters
NameDescription
nameString

name of the property

valueLatLng

value associated with the property

Returns
TypeDescription
B

set(String name, LatLng first, LatLng second, LatLng[] others)

public B set(String name, LatLng first, LatLng second, LatLng[] others)

Sets a list property containing elements of type LatLng.

Parameters
NameDescription
nameString

name of the property

firstLatLng

the first LatLng in the list

secondLatLng

the second LatLng in the list

othersLatLng[]

other LatLngs in the list

Returns
TypeDescription
B

set(String name, Value<?> value)

public B set(String name, Value<?> value)

Sets a property.

Parameters
NameDescription
nameString

name of the property

valueValue<?>

value associated with the property

Returns
TypeDescription
B

set(String name, Value<?> first, Value<?> second, Value<?>[] others)

public B set(String name, Value<?> first, Value<?> second, Value<?>[] others)

Sets a property of type ListValue.

Parameters
NameDescription
nameString

name of the property

firstValue<?>

the first value in the list

secondValue<?>

the second value in the list

othersValue<?>[]

other values in the list

Returns
TypeDescription
B

set(String name, double value)

public B set(String name, double value)

Sets a property of type DoubleValue.

Parameters
NameDescription
nameString

name of the property

valuedouble

value associated with the property

Returns
TypeDescription
B

set(String name, double first, double second, double[] others)

public B set(String name, double first, double second, double[] others)

Sets a list property containing elements of type DoubleValue.

Parameters
NameDescription
nameString

name of the property

firstdouble

the first double in the list

seconddouble

the second double in the list

othersdouble[]

other doubles in the list

Returns
TypeDescription
B

set(String name, String value)

public B set(String name, String value)

Sets a property of type StringValue.

Parameters
NameDescription
nameString

name of the property

valueString

value associated with the property

Returns
TypeDescription
B

set(String name, String first, String second, String[] others)

public B set(String name, String first, String second, String[] others)

Sets a list property containing elements of type StringValue.

Parameters
NameDescription
nameString

name of the property

firstString

the first string in the list

secondString

the second string in the list

othersString[]

other strings in the list

Returns
TypeDescription
B

set(String name, List<? extends Value<?>> values)

public B set(String name, List<? extends Value<?>> values)

Sets a property of type ListValue.

Parameters
NameDescription
nameString

name of the property

valuesList<? extends com.google.cloud.datastore.Value<?>>

list of values associated with the property

Returns
TypeDescription
B

set(String name, long value)

public B set(String name, long value)

Sets a property of type LongValue.

Parameters
NameDescription
nameString

name of the property

valuelong

value associated with the property

Returns
TypeDescription
B

set(String name, long first, long second, long[] others)

public B set(String name, long first, long second, long[] others)

Sets a list property containing elements of type LongValue.

Parameters
NameDescription
nameString

name of the property

firstlong

the first long in the list

secondlong

the second long in the list

otherslong[]

other longs in the list

Returns
TypeDescription
B

setKey(K key)

public B setKey(K key)

Sets the key for the entity.

Parameter
NameDescription
keyK
Returns
TypeDescription
B

setNull(String name)

public B setNull(String name)

Sets a property of type NullValue.

Parameter
NameDescription
nameString

name of the property

Returns
TypeDescription
B

setProperties()

protected Map<String,Value<?>> setProperties()
Returns
TypeDescription
Map<String,Value<?>>

setProperties(Map<String,Value<?>> properties)

protected B setProperties(Map<String,Value<?>> properties)
Parameter
NameDescription
propertiesMap<String,Value<?>>
Returns
TypeDescription
B