Class AnalyticsResult
- java.lang.Object
-
- com.couchbase.client.java.analytics.AnalyticsResult
-
public class AnalyticsResult extends Object
The result of an analytics query, including rows and associated metadata.- Since:
- 3.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyticsMetaData
metaData()
Returns theAnalyticsMetaData
giving access to the additional metadata associated with this analytics query.<T> List<T>
rowsAs(TypeRef<T> target)
Returns all rows, converted into instances of the target type.<T> List<T>
rowsAs(Class<T> target)
Returns all rows, converted into instances of the target class.List<JsonObject>
rowsAsObject()
Returns all rows, converted intoJsonObject
s.String
toString()
-
-
-
Method Detail
-
rowsAs
public <T> List<T> rowsAs(Class<T> target)
Returns all rows, converted into instances of the target class.- Type Parameters:
T
- the generic type to cast the rows into.- Parameters:
target
- the target class to deserialize into.- Returns:
- the Rows as a list of the generic target type.
- Throws:
DecodingFailureException
- if any row could not be successfully deserialized.
-
rowsAs
public <T> List<T> rowsAs(TypeRef<T> target)
Returns all rows, converted into instances of the target type.- Type Parameters:
T
- the generic type to cast the rows into.- Parameters:
target
- the target type to deserialize into.- Returns:
- the Rows as a list of the generic target type.
- Throws:
DecodingFailureException
- if any row could not be successfully deserialized.
-
rowsAsObject
public List<JsonObject> rowsAsObject()
Returns all rows, converted intoJsonObject
s.- Returns:
- the Rows as a list of JsonObjects.
- Throws:
DecodingFailureException
- if any row could not be successfully deserialized.
-
metaData
public AnalyticsMetaData metaData()
Returns theAnalyticsMetaData
giving access to the additional metadata associated with this analytics query.- Returns:
- the analytics metadata.
-
-