T
- The type of the value of the custom object.public final class CustomObjectDraft<T> extends Base
CustomObjectUpsertCommand
,
CustomObject
Modifier and Type | Method and Description |
---|---|
String |
getContainer() |
com.fasterxml.jackson.databind.JavaType |
getJavaType() |
String |
getKey() |
T |
getValue() |
Long |
getVersion() |
static <T> CustomObjectDraft<T> |
ofUnversionedUpdate(CustomObject<T> customObject,
T newValue,
Class<T> valueClass)
Creates a draft for updating a custom object.
|
static <T> CustomObjectDraft<T> |
ofUnversionedUpdate(CustomObject<T> customObject,
T newValue,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
Creates a draft for updating a custom object.
|
static CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode> |
ofUnversionedUpsert(String container,
String key,
com.fasterxml.jackson.databind.JsonNode value)
Creates a draft for creating or updating a custom object.
|
static <T> CustomObjectDraft<T> |
ofUnversionedUpsert(String container,
String key,
T value,
Class<T> valueClass)
Creates a draft for creating or updating a custom object.
|
static <T> CustomObjectDraft<T> |
ofUnversionedUpsert(String container,
String key,
T value,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
Creates a draft for creating or updating a custom object.
|
static <T> CustomObjectDraft<T> |
ofVersionedUpdate(CustomObject<T> customObject,
T newValue,
Class<T> valueClass)
Creates a draft for updating a custom object.
|
static <T> CustomObjectDraft<T> |
ofVersionedUpdate(CustomObject<T> customObject,
T newValue,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
Creates a draft for updating a custom object.
|
static <T> CustomObjectDraft<T> |
ofVersionedUpsert(String container,
String key,
T value,
Long version,
Class<T> valueClass)
Creates a draft for creating or updating a custom object.
|
static <T> CustomObjectDraft<T> |
ofVersionedUpsert(String container,
String key,
T value,
Long version,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
Creates a draft for creating or updating a custom object.
|
public T getValue()
public static <T> CustomObjectDraft<T> ofVersionedUpdate(CustomObject<T> customObject, T newValue, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
T
- The type of the value of the custom object.customObject
- the custom object to override (provides key, container and version)newValue
- the value which should be assigned to the custom objectvalueTypeReference
- the type reference to deserialize the updated custom object from the API responsepublic static <T> CustomObjectDraft<T> ofVersionedUpdate(CustomObject<T> customObject, T newValue, Class<T> valueClass)
T
- The type of the value of the custom object.customObject
- the custom object to override (provides key, container and version)newValue
- the value which should be assigned to the custom objectvalueClass
- the class of the value, if it not uses generics like lists, typically for POJOspublic static <T> CustomObjectDraft<T> ofUnversionedUpdate(CustomObject<T> customObject, T newValue, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
T
- The type of the value of the custom object.customObject
- the custom object to override (provides key, container and version)newValue
- the value which should be assigned to the custom objectvalueTypeReference
- the type reference to deserialize the updated custom object from the API responsepublic static <T> CustomObjectDraft<T> ofUnversionedUpdate(CustomObject<T> customObject, T newValue, Class<T> valueClass)
T
- The type of the value of the custom object.customObject
- the custom object to override (provides key, container and version)newValue
- the value which should be assigned to the custom objectvalueClass
- the class of the value, if it not uses generics like lists, typically for POJOspublic static <T> CustomObjectDraft<T> ofUnversionedUpsert(String container, String key, T value, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
T
- The type of the value of the custom object.container
- the containerkey
- the keyvalue
- the value which should be assigned to the custom objectvalueTypeReference
- the type reference to deserialize the updated custom object from the API responsepublic static <T> CustomObjectDraft<T> ofUnversionedUpsert(String container, String key, T value, Class<T> valueClass)
T
- The type of the value of the custom object.container
- the containerkey
- the keyvalue
- the value which should be assigned to the custom objectvalueClass
- the class of the value, if it not uses generics like lists, typically for POJOspublic static <T> CustomObjectDraft<T> ofVersionedUpsert(String container, String key, T value, Long version, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
T
- The type of the value of the custom object.container
- the containerkey
- the keyvalue
- the value which should be assigned to the custom objectversion
- the version for optimistic lockingvalueTypeReference
- the type reference to deserialize the updated custom object from the API responsepublic static <T> CustomObjectDraft<T> ofVersionedUpsert(String container, String key, T value, Long version, Class<T> valueClass)
T
- The type of the value of the custom object.container
- the containerkey
- the keyvalue
- the value which should be assigned to the custom objectversion
- the version for optimistic lockingvalueClass
- the class of the value, if it not uses generics like lists, typically for POJOspublic static CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode> ofUnversionedUpsert(String container, String key, com.fasterxml.jackson.databind.JsonNode value)
CustomObjectDraft(String, String, Object, Long, com.fasterxml.jackson.core.type.TypeReference)
with pure JSON as value for the custom object.container
- the containerkey
- the keyvalue
- the value which should be assigned to the custom objectpublic String getContainer()
public String getKey()
public com.fasterxml.jackson.databind.JavaType getJavaType()