public interface StoreDeleteCommand extends MetaModelReferenceExpansionDsl<Store,StoreDeleteCommand,StoreExpansionModel<Store>>, DeleteCommand<Store>
Store.
final String key = SphereTestUtils.randomKey(); final LocalizedString name = SphereTestUtils.randomLocalizedString(); final StoreDraft storeDraft = StoreDraft.of(key, name); final Store store = client().executeBlocking(StoreCreateCommand.of(storeDraft)); Assertions.assertThat(store).isNotNull(); client().executeBlocking(StoreDeleteCommand.ofKey(store.getKey(), store.getVersion())); final Query<Store> query = StoreQuery.of() .withPredicates(m -> m.id().is(store.getId())); Assertions.assertThat(client().executeBlocking(query).head()).isEmpty();See the test code.
Store| Modifier and Type | Method and Description |
|---|---|
static StoreDeleteCommand |
of(Versioned<Store> versioned)
Creates a command object to delete a
Store by ID. |
static StoreDeleteCommand |
ofKey(String key,
Long version)
Creates a command object to delete a
Store by its key. |
plusExpansionPaths, withExpansionPathsplusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPathsexpansionPathscanDeserialize, deserialize, httpRequestIntentstatic StoreDeleteCommand of(Versioned<Store> versioned)
Store by ID.versioned - the object to delete (so directly a Store) or just the version/ID information of itstatic StoreDeleteCommand ofKey(String key, Long version)
Store by its key.key - the key of the Store to delete, see Store.getKey()version - `the current version of the Store, see Resource.getVersion()