Package com.contentstack.sdk
Class QueryResult
java.lang.Object
com.contentstack.sdk.QueryResult
QueryResult works as the Query Response that works as getter as per the Json Key
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.json.JSONObjectReturns class's content type if call to fetch contentType executed successfully.intgetCount()Returns count of objects available.
Note : To retrieve this data,Query.includeCount()orQuery.count()should be added inQuerywhile querying.org.json.JSONArrayReturns class's schema if call to fetch schema executed successfully.void
-
Constructor Details
-
QueryResult
public QueryResult()
-
-
Method Details
-
getResultObjects
- Returns:
- List of
Entryobjects list.
Example :
List<Entry> list = queryResultObject.getResultObjects();
-
getCount
public int getCount()Returns count of objects available.
Note : To retrieve this data,Query.includeCount()orQuery.count()should be added inQuerywhile querying.- Returns:
- int count
Example :
int count = queryResultObject.getCount();
-
getSchema
public org.json.JSONArray getSchema()Returns class's schema if call to fetch schema executed successfully.- Returns:
- JSONArray schema Array
Example :
JSONArray schemaArray = queryResultObject.getSchema();
-
getContentType
public org.json.JSONObject getContentType()Returns class's content type if call to fetch contentType executed successfully.- Returns:
- JSONObject contentObject
Example :
JSONObject contentObject = queryResultObject.getContentType();
-
setJSON
-