@Immutable public final class RetrieveThings extends org.eclipse.ditto.signals.commands.base.AbstractCommand<RetrieveThings> implements ThingQueryCommand<RetrieveThings>, org.eclipse.ditto.signals.commands.base.WithNamespace
Things based on the the passed in List of
Thing IDs.| Modifier and Type | Class and Description |
|---|---|
static class |
RetrieveThings.Builder
Builder to facilitate creation of
RetrieveThings instances. |
ThingCommand.JsonFieldsorg.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T>| Modifier and Type | Field and Description |
|---|---|
static org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray> |
JSON_THING_IDS |
static String |
NAME
Name of the "Retrieve Things" command.
|
static String |
TYPE
Type of this command.
|
RESOURCE_TYPE, TYPE_PREFIX| Modifier and Type | Method and Description |
|---|---|
protected void |
appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate) |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object obj) |
static RetrieveThings |
fromJson(org.eclipse.ditto.json.JsonObject jsonObject,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a new
RetrieveThings from a JSON object. |
static RetrieveThings |
fromJson(String jsonString,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a new
RetrieveThings from a JSON string. |
static RetrieveThings.Builder |
getBuilder(List<String> thingIds)
Returns a builder for a command for retrieving the Things.
|
static RetrieveThings.Builder |
getBuilder(RetrieveThings retrieveThings)
Returns a builder for a command for retrieving Things.
|
static RetrieveThings.Builder |
getBuilder(String... thingIds)
Returns a builder for a command for retrieving the Things.
|
Optional<String> |
getNamespace() |
org.eclipse.ditto.json.JsonPointer |
getResourcePath() |
Optional<org.eclipse.ditto.json.JsonFieldSelector> |
getSelectedFields()
Returns the selected fields which are to be included in the JSON of the retrieved entity.
|
String |
getThingId() |
List<String> |
getThingIds()
Returns an unmodifiable unsorted List of the identifiers of the
Things to be retrieved. |
int |
hashCode() |
RetrieveThings |
setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders) |
String |
toString() |
getDittoHeaders, getManifest, getType, toJsonclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, getResourceType, getTypePrefixgetImplementedSchemaVersion, toJson, toJsontoJson, toJsonString, toJsonStringgetLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonStringpublic static final String NAME
public static final String TYPE
public static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray> JSON_THING_IDS
public static RetrieveThings.Builder getBuilder(String... thingIds)
thingIds - one or more Thing IDs to be retrieved.NullPointerException - if authorizationContext is null.public static RetrieveThings.Builder getBuilder(List<String> thingIds)
thingIds - the Thing IDs to be retrieved.NullPointerException - if authorizationContext is null.public static RetrieveThings.Builder getBuilder(RetrieveThings retrieveThings)
retrieveThings - a RetrieveThings object which acts as template for the new builder.NullPointerException - if authorizationContext is null.public static RetrieveThings fromJson(String jsonString, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
RetrieveThings from a JSON string.jsonString - the JSON string of which the command is to be created.dittoHeaders - the headers of the command.NullPointerException - if jsonString is null.IllegalArgumentException - if jsonString is empty.org.eclipse.ditto.json.JsonParseException - if the passed in jsonString was not in the expected
format.public static RetrieveThings fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
RetrieveThings from a JSON object.jsonObject - the JSON object of which the command is to be created.dittoHeaders - the headers of the command.NullPointerException - if jsonObject is null.org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected
format.public List<String> getThingIds()
Things to be retrieved.public Optional<String> getNamespace()
getNamespace in interface org.eclipse.ditto.signals.commands.base.WithNamespacepublic Optional<org.eclipse.ditto.json.JsonFieldSelector> getSelectedFields()
ThingQueryCommandgetSelectedFields in interface ThingQueryCommand<RetrieveThings>public String getThingId()
getThingId in interface org.eclipse.ditto.signals.base.WithThingIdpublic org.eclipse.ditto.json.JsonPointer getResourcePath()
getResourcePath in interface org.eclipse.ditto.signals.base.WithResourceprotected void appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
appendPayload in class org.eclipse.ditto.signals.commands.base.AbstractCommand<RetrieveThings>public RetrieveThings setDittoHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
setDittoHeaders in interface org.eclipse.ditto.model.base.headers.WithDittoHeaders<RetrieveThings>setDittoHeaders in interface org.eclipse.ditto.signals.commands.base.Command<RetrieveThings>setDittoHeaders in interface ThingQueryCommand<RetrieveThings>setDittoHeaders in interface ThingCommand<RetrieveThings>public int hashCode()
hashCode in class org.eclipse.ditto.signals.commands.base.AbstractCommand<RetrieveThings>public boolean equals(@Nullable Object obj)
equals in class org.eclipse.ditto.signals.commands.base.AbstractCommand<RetrieveThings>protected boolean canEqual(@Nullable Object other)
canEqual in class org.eclipse.ditto.signals.commands.base.AbstractCommand<RetrieveThings>public String toString()
toString in class org.eclipse.ditto.signals.commands.base.AbstractCommand<RetrieveThings>Copyright © 2017–2018 Eclipse Foundation. All rights reserved.