Package com.google.cloud.datastore
Class BaseEntity.Builder<K extends IncompleteKey,B extends BaseEntity.Builder<K,B>>
- java.lang.Object
-
- com.google.cloud.datastore.BaseEntity.Builder<K,B>
-
- Direct Known Subclasses:
Entity.Builder,FullEntity.Builder,ProjectionEntity.Builder
- Enclosing class:
- BaseEntity<K extends IncompleteKey>
public abstract static class BaseEntity.Builder<K extends IncompleteKey,B extends BaseEntity.Builder<K,B>> extends Object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract BaseEntity<K>build()Bclear()Clears all the properties.protected Kkey()Bremove(String name)Removes a property with the givenname.Bset(String name, boolean value)Sets a property of typeBooleanValue.Bset(String name, boolean first, boolean second, boolean... others)Sets a list property containing elements of typeBooleanValue.Bset(String name, double value)Sets a property of typeDoubleValue.Bset(String name, double first, double second, double... others)Sets a list property containing elements of typeDoubleValue.Bset(String name, long value)Sets a property of typeLongValue.Bset(String name, long first, long second, long... others)Sets a list property containing elements of typeLongValue.Bset(String name, Blob value)Sets a property of typeBlobValue.Bset(String name, Blob first, Blob second, Blob... others)Sets a list property containing elements of typeBlobValue.Bset(String name, FullEntity<?> value)Sets a property of typeEntityValue.Bset(String name, FullEntity<?> first, FullEntity<?> second, FullEntity<?>... others)Sets a list property containing elements of typeEntityValue.Bset(String name, Key value)Sets a property of typeKeyValue.Bset(String name, Key first, Key second, Key... others)Sets a list property containing elements of typeKeyValue.Bset(String name, LatLng value)Sets a property of typeLatLng.Bset(String name, LatLng first, LatLng second, LatLng... others)Sets a list property containing elements of typeLatLng.Bset(String name, Value<?> value)Sets a property.Bset(String name, Value<?> first, Value<?> second, Value<?>... others)Sets a property of typeListValue.Bset(String name, com.google.cloud.Timestamp value)Sets a property of typeTimestampValue.Bset(String name, com.google.cloud.Timestamp first, com.google.cloud.Timestamp second, com.google.cloud.Timestamp... others)Sets a list property containing elements of typeTimestampValue.Bset(String name, String value)Sets a property of typeStringValue.Bset(String name, String first, String second, String... others)Sets a list property containing elements of typeStringValue.Bset(String name, List<? extends Value<?>> values)Sets a property of typeListValue.BsetKey(K key)Sets the key for the entity.BsetNull(String name)Sets a property of typeNullValue.protected Map<String,Value<?>>setProperties()protected BsetProperties(Map<String,Value<?>> properties)
-
-
-
Method Detail
-
key
protected K key()
-
clear
public B clear()
Clears all the properties.
-
set
public B set(String name, Value<?> value)
Sets a property.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, String value)
Sets a property of typeStringValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, String first, String second, String... others)
Sets a list property containing elements of typeStringValue.- Parameters:
name- name of the propertyfirst- the first string in the listsecond- the second string in the listothers- other strings in the list
-
set
public B set(String name, long value)
Sets a property of typeLongValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, long first, long second, long... others)
Sets a list property containing elements of typeLongValue.- Parameters:
name- name of the propertyfirst- the first long in the listsecond- the second long in the listothers- other longs in the list
-
set
public B set(String name, double value)
Sets a property of typeDoubleValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, double first, double second, double... others)
Sets a list property containing elements of typeDoubleValue.- Parameters:
name- name of the propertyfirst- the first double in the listsecond- the second double in the listothers- other doubles in the list
-
set
public B set(String name, boolean value)
Sets a property of typeBooleanValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, boolean first, boolean second, boolean... others)
Sets a list property containing elements of typeBooleanValue.- Parameters:
name- name of the propertyfirst- the first boolean in the listsecond- the second boolean in the listothers- other booleans in the list
-
set
public B set(String name, com.google.cloud.Timestamp value)
Sets a property of typeTimestampValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, com.google.cloud.Timestamp first, com.google.cloud.Timestamp second, com.google.cloud.Timestamp... others)
Sets a list property containing elements of typeTimestampValue.- Parameters:
name- name of the propertyfirst- the firstTimestampin the listsecond- the secondTimestampin the listothers- otherTimestamps in the list
-
set
public B set(String name, LatLng value)
Sets a property of typeLatLng.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, LatLng first, LatLng second, LatLng... others)
Sets a list property containing elements of typeLatLng.
-
set
public B set(String name, Key value)
Sets a property of typeKeyValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, Key first, Key second, Key... others)
Sets a list property containing elements of typeKeyValue.
-
set
public B set(String name, FullEntity<?> value)
Sets a property of typeEntityValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, FullEntity<?> first, FullEntity<?> second, FullEntity<?>... others)
Sets a list property containing elements of typeEntityValue.- Parameters:
name- name of the propertyfirst- the firstFullEntityin the listsecond- the secondFullEntityin the listothers- other entities in the list
-
set
public B set(String name, List<? extends Value<?>> values)
Sets a property of typeListValue.- Parameters:
name- name of the propertyvalues- list of values associated with the property
-
set
public B set(String name, Value<?> first, Value<?> second, Value<?>... others)
Sets a property of typeListValue.- Parameters:
name- name of the propertyfirst- the first value in the listsecond- the second value in the listothers- other values in the list
-
set
public B set(String name, Blob value)
Sets a property of typeBlobValue.- Parameters:
name- name of the propertyvalue- value associated with the property
-
set
public B set(String name, Blob first, Blob second, Blob... others)
Sets a list property containing elements of typeBlobValue.
-
setNull
public B setNull(String name)
Sets a property of typeNullValue.- Parameters:
name- name of the property
-
build
public abstract BaseEntity<K> build()
-
-