public abstract class ETRestObject extends ETApiObject
ETRestObject
represents an object
available via the REST API.Constructor and Description |
---|
ETRestObject() |
Modifier and Type | Method and Description |
---|---|
static <T extends ETRestObject> |
create(ETClient client,
List<T> objects) |
static <T extends ETRestObject> |
delete(ETClient client,
List<T> objects) |
static <T extends ETRestObject> |
deserialize(ETClient client,
String payload,
Class<T> type) |
static <T extends ETRestObject> |
deserialize(ETClient client,
String payload,
Class<T> type,
String totalCount,
String collection) |
protected static String |
getInternalProperty(Class<? extends ETRestObject> type,
String name) |
static <T extends ETRestObject> |
retrieve(ETClient client,
Class<T> type,
Integer page,
Integer pageSize,
ETFilter filter) |
String |
serialize() |
static String |
toFilterString(ETExpression expression) |
static <T extends ETRestObject> |
update(ETClient client,
List<T> objects) |
getAllModified, getId, getModified, setId, setModified
getAllFields, getAllFields, getClient, getField, getField, setClient, toString
public static <T extends ETRestObject> ETResponse<T> retrieve(ETClient client, Class<T> type, Integer page, Integer pageSize, ETFilter filter) throws ETSdkException
T
- The type which extends from ETRestObjectclient
- The ETClient objecttype
- The class type to retrievepage
- The page numberpageSize
- The page sizefilter
- The ETFilter objectETSdkException
public static <T extends ETRestObject> ETResponse<T> create(ETClient client, List<T> objects) throws ETSdkException
T
- The type which extends from ETRestObjectclient
- The ETClient objectobjects
- The List of objects to createETSdkException
public static <T extends ETRestObject> ETResponse<T> update(ETClient client, List<T> objects) throws ETSdkException
T
- The type which extends from ETRestObjectclient
- The ETClient objectobjects
- The List of objects to updateETSdkException
public static <T extends ETRestObject> ETResponse<T> delete(ETClient client, List<T> objects) throws ETSdkException
T
- The type which extends from ETRestObjectclient
- The ETClient objectobjects
- The List of objects to deleteETSdkException
public String serialize()
public static <T extends ETRestObject> T deserialize(ETClient client, String payload, Class<T> type)
T
- The type which extends from ETRestObjectclient
- The ETClient objectpayload
- The payload to deserializetype
- The class type to deserializepublic static <T extends ETRestObject> ETResponse<T> deserialize(ETClient client, String payload, Class<T> type, String totalCount, String collection)
T
- The type which extends from ETRestObjectclient
- The ETClient objectpayload
- The payload to deserializetype
- The class type to deserializetotalCount
- The total countcollection
- The collectionprotected static String getInternalProperty(Class<? extends ETRestObject> type, String name) throws ETSdkException
ETSdkException
public static String toFilterString(ETExpression expression) throws ETSdkException
expression
- The ETExpression object as filterETSdkException
Copyright © 2017. All rights reserved.