T - type of the value of the custom objectpublic interface CustomObjectDeleteCommand<T> extends DeleteCommand<CustomObject<T>>
Deletes a custom object in Composable Commerce.
final String key = randomKey(); final Foo foo = new Foo("bar", 7L); final CustomObject<Foo> customObject = client().executeBlocking(CustomObjectUpsertCommand .of(CustomObjectDraft.ofUnversionedUpsert(CONTAINER, key, foo, Foo.class))); final CustomObject<Foo> deletedObject = client().executeBlocking(CustomObjectDeleteCommand.of(CONTAINER, key, Foo.class)); assertThat(deletedObject.getValue()).isEqualTo(foo); assertThat(client().executeBlocking(CustomObjectByKeyGet.of(CONTAINER, key, Foo.class))) .as("get request") .isNull();See the test code.
CustomObject| Modifier and Type | Method and Description |
|---|---|
static <T> DeleteCommand<CustomObject<T>> |
of(CustomObject<T> customObject,
Class<T> valueClass)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(CustomObject<T> customObject,
Class<T> valueClass,
boolean eraseData)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(CustomObject<T> customObject,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(CustomObject<T> customObject,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference,
boolean eraseData)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String id,
Long version,
Class<T> valueClass)
Deletes a custom object by id with optimistic concurrency control and returns the old custom object with the in
valueClass specified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String id,
Long version,
Class<T> valueClass,
boolean eraseData)
Deletes a custom object by id with optimistic concurrency control and returns the old custom object with the in
valueClass specified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String id,
Long version,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
Deletes a custom object by id with optimistic concurrency control and returns the old custom object with the in
valueTypeReference specified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String id,
Long version,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference,
boolean eraseData)
Deletes a custom object by id with optimistic concurrency control and returns the old custom object with the in
valueTypeReference specified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String container,
String key,
Class<T> valueClass)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String container,
String key,
Class<T> valueClass,
boolean eraseData)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String container,
String key,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static <T> DeleteCommand<CustomObject<T>> |
of(String container,
String key,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference,
boolean eraseData)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with the in
valueTypeReferencespecified value type. |
static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> |
ofJsonNode(CustomObject<?> customObject)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with a JsonNode value type.
|
static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> |
ofJsonNode(CustomObject<?> customObject,
boolean eraseData)
Deletes a custom object without optimistic concurrency control and uses the delete endpoint via container and key and returns the old custom object with a JsonNode value type.
|
static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> |
ofJsonNode(String id,
Long version)
Deletes a custom object by id with optimistic concurrency control and returns the old custom object with a JsonNode value type.
|
static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> |
ofJsonNode(String id,
Long version,
boolean eraseData)
Deletes a custom object by id with optimistic concurrency control and returns the old custom object with a JsonNode value type.
|
static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> |
ofJsonNode(String container,
String key)
Deletes a custom object without optimistic concurrency control and returns the old custom object with a JsonNode value type.
|
static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> |
ofJsonNode(String container,
String key,
boolean eraseData)
Deletes a custom object without optimistic concurrency control and returns the old custom object with a JsonNode value type.
|
canDeserialize, deserialize, httpRequestIntentstatic <T> DeleteCommand<CustomObject<T>> of(CustomObject<T> customObject, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
valueTypeReferencespecified value type.T - type of the value of the custom objectcustomObject - the custom object to deletevalueTypeReference - the type reference to deserialize the updated custom object from the API responsestatic <T> DeleteCommand<CustomObject<T>> of(CustomObject<T> customObject, Class<T> valueClass)
valueTypeReferencespecified value type.T - type of the value of the custom objectcustomObject - the custom object to deletevalueClass - the class of the value, if it not uses generics like lists, typically for POJOsstatic <T> DeleteCommand<CustomObject<T>> of(String container, String key, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
valueTypeReferencespecified value type.T - type of the value of the custom objectcontainer - the container name of the custom object to deletekey - the key name of the custom object to deletevalueTypeReference - the type reference to deserialize the updated custom object from the API responsestatic <T> DeleteCommand<CustomObject<T>> of(String container, String key, Class<T> valueClass)
valueTypeReferencespecified value type.T - type of the value of the custom objectcontainer - the container name of the custom object to deletekey - the key name of the custom object to deletevalueClass - the class of the value, if it not uses generics like lists, typically for POJOsstatic DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> ofJsonNode(CustomObject<?> customObject)
TypeReference but lacking the accessible value in the result.customObject - the custom object to deletestatic DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> ofJsonNode(String container, String key)
TypeReference but lacking the accessible value in the result.container - the container name of the custom object to deletekey - the key name of the custom object to deletestatic DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> ofJsonNode(String id, Long version)
TypeReference but lacking the accessible value in the result.id - the id of the custom object to deleteversion - the version of the custom object to deletestatic <T> DeleteCommand<CustomObject<T>> of(String id, Long version, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference)
valueTypeReference specified value type.
Convenience method to not specify the TypeReference but lacking the accessible value in the result.T - type of the value of the custom objectid - the id of the custom object to deleteversion - the version of the custom object to deletevalueTypeReference - the type reference to deserialize the updated custom object from the API responsestatic <T> DeleteCommand<CustomObject<T>> of(String id, Long version, Class<T> valueClass)
valueClass specified value type.
final String key = randomKey(); final Foo foo = new Foo("bar", 7L); final CustomObject<Foo> customObject = client().executeBlocking(CustomObjectUpsertCommand .of(CustomObjectDraft.ofUnversionedUpsert(CONTAINER, key, foo, Foo.class))); final String id = customObject.getId(); final Long version = customObject.getVersion(); final CustomObject<Foo> deletedObject = client().executeBlocking(CustomObjectDeleteCommand.of(id, version, Foo.class)); assertThat(deletedObject.getValue()).isEqualTo(foo); assertThat(client().executeBlocking(CustomObjectByKeyGet.of(CONTAINER, key, Foo.class))) .as("get request") .isNull();See the test code.
T - type of the value of the custom objectid - the id of the custom object to deleteversion - the version of the custom object to deletevalueClass - the class of the value, if it not uses generics like lists, typically for POJOsstatic <T> DeleteCommand<CustomObject<T>> of(CustomObject<T> customObject, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference, boolean eraseData)
valueTypeReferencespecified value type.T - type of the value of the custom objectcustomObject - the custom object to deletevalueTypeReference - the type reference to deserialize the updated custom object from the API responseeraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static <T> DeleteCommand<CustomObject<T>> of(CustomObject<T> customObject, Class<T> valueClass, boolean eraseData)
valueTypeReferencespecified value type.T - type of the value of the custom objectcustomObject - the custom object to deletevalueClass - the class of the value, if it not uses generics like lists, typically for POJOseraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static <T> DeleteCommand<CustomObject<T>> of(String container, String key, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference, boolean eraseData)
valueTypeReferencespecified value type.T - type of the value of the custom objectcontainer - the container name of the custom object to deletekey - the key name of the custom object to deletevalueTypeReference - the type reference to deserialize the updated custom object from the API responseeraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static <T> DeleteCommand<CustomObject<T>> of(String container, String key, Class<T> valueClass, boolean eraseData)
valueTypeReferencespecified value type.T - type of the value of the custom objectcontainer - the container name of the custom object to deletekey - the key name of the custom object to deletevalueClass - the class of the value, if it not uses generics like lists, typically for POJOseraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> ofJsonNode(CustomObject<?> customObject, boolean eraseData)
TypeReference but lacking the accessible value in the result.customObject - the custom object to deleteeraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> ofJsonNode(String container, String key, boolean eraseData)
TypeReference but lacking the accessible value in the result.container - the container name of the custom object to deletekey - the key name of the custom object to deleteeraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static DeleteCommand<CustomObject<com.fasterxml.jackson.databind.JsonNode>> ofJsonNode(String id, Long version, boolean eraseData)
TypeReference but lacking the accessible value in the result.id - the id of the custom object to deleteversion - the version of the custom object to deleteeraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static <T> DeleteCommand<CustomObject<T>> of(String id, Long version, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference, boolean eraseData)
valueTypeReference specified value type.
Convenience method to not specify the TypeReference but lacking the accessible value in the result.T - type of the value of the custom objectid - the id of the custom object to deleteversion - the version of the custom object to deletevalueTypeReference - the type reference to deserialize the updated custom object from the API responseeraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static <T> DeleteCommand<CustomObject<T>> of(String id, Long version, Class<T> valueClass, boolean eraseData)
valueClass specified value type.
final String key = randomKey(); final Foo foo = new Foo("bar", 7L); final CustomObject<Foo> customObject = client().executeBlocking(CustomObjectUpsertCommand .of(CustomObjectDraft.ofUnversionedUpsert(CONTAINER, key, foo, Foo.class))); final String id = customObject.getId(); final Long version = customObject.getVersion(); final CustomObject<Foo> deletedObject = client().executeBlocking(CustomObjectDeleteCommand.of(id, version, Foo.class)); assertThat(deletedObject.getValue()).isEqualTo(foo); assertThat(client().executeBlocking(CustomObjectByKeyGet.of(CONTAINER, key, Foo.class))) .as("get request") .isNull();See the test code.
T - type of the value of the custom objectid - the id of the custom object to deleteversion - the version of the custom object to deletevalueClass - the class of the value, if it not uses generics like lists, typically for POJOseraseData - If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.