public class JestResult extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
JestResult.MetaField |
| Modifier and Type | Field and Description |
|---|---|
protected String |
errorMessage |
static String |
ES_METADATA_ID |
static String |
ES_METADATA_VERSION |
protected boolean |
isSucceeded |
protected com.fasterxml.jackson.databind.JsonNode |
jsonObject |
protected String |
jsonString |
protected static com.google.common.collect.ImmutableList<JestResult.MetaField> |
META_FIELDS |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected String |
pathToResult |
protected int |
responseCode |
| Constructor and Description |
|---|
JestResult(JestResult source) |
JestResult(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
createSourceObject(com.fasterxml.jackson.databind.JsonNode source,
Class<T> type) |
protected List<com.fasterxml.jackson.databind.JsonNode> |
extractSource() |
protected List<com.fasterxml.jackson.databind.JsonNode> |
extractSource(boolean addEsMetadataFields) |
String |
getErrorMessage() |
Map<String,Map> |
getJsonMap()
Deprecated.
|
com.fasterxml.jackson.databind.JsonNode |
getJsonObject() |
String |
getJsonString() |
protected String[] |
getKeys() |
String |
getPathToResult() |
int |
getResponseCode() |
<T> T |
getSourceAsObject(Class<T> clazz) |
<T> T |
getSourceAsObject(Class<T> clazz,
boolean addEsMetadataFields) |
<T> List<T> |
getSourceAsObjectList(Class<T> type) |
<T> List<T> |
getSourceAsObjectList(Class<T> type,
boolean addEsMetadataFields) |
String |
getSourceAsString() |
List<String> |
getSourceAsStringList() |
Object |
getValue(String key) |
boolean |
isSucceeded() |
void |
setErrorMessage(String errorMessage)
manually set an error message, eg. for the cases where non-200 response code is received
|
void |
setJsonMap(Map<String,Object> resultMap) |
void |
setJsonObject(com.fasterxml.jackson.databind.JsonNode jsonObject) |
void |
setJsonString(String jsonString) |
void |
setPathToResult(String pathToResult) |
void |
setResponseCode(int responseCode) |
void |
setSucceeded(boolean succeeded) |
public static final String ES_METADATA_ID
public static final String ES_METADATA_VERSION
protected static final com.google.common.collect.ImmutableList<JestResult.MetaField> META_FIELDS
protected com.fasterxml.jackson.databind.JsonNode jsonObject
protected String jsonString
protected String pathToResult
protected int responseCode
protected boolean isSucceeded
protected String errorMessage
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
public JestResult(JestResult source)
public JestResult(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public String getPathToResult()
public void setPathToResult(String pathToResult)
public boolean isSucceeded()
public void setSucceeded(boolean succeeded)
public String getJsonString()
public void setJsonString(String jsonString)
public String getErrorMessage()
public int getResponseCode()
public void setResponseCode(int responseCode)
public void setErrorMessage(String errorMessage)
public com.fasterxml.jackson.databind.JsonNode getJsonObject()
public void setJsonObject(com.fasterxml.jackson.databind.JsonNode jsonObject)
@Deprecated public Map<String,Map> getJsonMap()
public String getSourceAsString()
public List<String> getSourceAsStringList()
public <T> T getSourceAsObject(Class<T> clazz)
public <T> T getSourceAsObject(Class<T> clazz, boolean addEsMetadataFields)
public <T> List<T> getSourceAsObjectList(Class<T> type, boolean addEsMetadataFields)
protected List<com.fasterxml.jackson.databind.JsonNode> extractSource()
protected List<com.fasterxml.jackson.databind.JsonNode> extractSource(boolean addEsMetadataFields)
protected <T> T createSourceObject(com.fasterxml.jackson.databind.JsonNode source,
Class<T> type)
protected String[] getKeys()
Copyright © 2018. All rights reserved.