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()
B
clear()
Clears all the properties.protected K
key()
B
remove(String name)
Removes a property with the givenname
.B
set(String name, boolean value)
Sets a property of typeBooleanValue
.B
set(String name, boolean first, boolean second, boolean... others)
Sets a list property containing elements of typeBooleanValue
.B
set(String name, double value)
Sets a property of typeDoubleValue
.B
set(String name, double first, double second, double... others)
Sets a list property containing elements of typeDoubleValue
.B
set(String name, long value)
Sets a property of typeLongValue
.B
set(String name, long first, long second, long... others)
Sets a list property containing elements of typeLongValue
.B
set(String name, Blob value)
Sets a property of typeBlobValue
.B
set(String name, Blob first, Blob second, Blob... others)
Sets a list property containing elements of typeBlobValue
.B
set(String name, FullEntity<?> value)
Sets a property of typeEntityValue
.B
set(String name, FullEntity<?> first, FullEntity<?> second, FullEntity<?>... others)
Sets a list property containing elements of typeEntityValue
.B
set(String name, Key value)
Sets a property of typeKeyValue
.B
set(String name, Key first, Key second, Key... others)
Sets a list property containing elements of typeKeyValue
.B
set(String name, LatLng value)
Sets a property of typeLatLng
.B
set(String name, LatLng first, LatLng second, LatLng... others)
Sets a list property containing elements of typeLatLng
.B
set(String name, Value<?> value)
Sets a property.B
set(String name, Value<?> first, Value<?> second, Value<?>... others)
Sets a property of typeListValue
.B
set(String name, com.google.cloud.Timestamp value)
Sets a property of typeTimestampValue
.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
.B
set(String name, String value)
Sets a property of typeStringValue
.B
set(String name, String first, String second, String... others)
Sets a list property containing elements of typeStringValue
.B
set(String name, List<? extends Value<?>> values)
Sets a property of typeListValue
.B
setKey(K key)
Sets the key for the entity.B
setNull(String name)
Sets a property of typeNullValue
.protected Map<String,Value<?>>
setProperties()
protected B
setProperties(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 firstTimestamp
in the listsecond
- the secondTimestamp
in the listothers
- otherTimestamp
s 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 firstFullEntity
in the listsecond
- the secondFullEntity
in 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()
-
-