public interface QueryRequest<T>
Modifier and Type | Method and Description |
---|---|
QueryRequest<T> |
expand(java.lang.String... paths)
Requests Reference fields to be expanded in the returned objects.
|
QueryResult<T> |
fetch()
Executes the request and returns the result.
|
play.libs.F.Promise<QueryResult<T>> |
fetchAsync()
Executes the request asynchronously and returns a future providing the result.
|
QueryRequest<T> |
page(int page)
Sets the page number for paging through results.
|
QueryRequest<T> |
pageSize(int pageSize)
Sets the size of a page for paging through results.
|
QueryResult<T> fetch()
play.libs.F.Promise<QueryResult<T>> fetchAsync()
QueryRequest<T> page(int page)
QueryRequest<T> pageSize(int pageSize)
QueryRequest<T> expand(java.lang.String... paths)
As an illustration, here is how reference expansion looks at the underlying JSON transport level. Given a customer object:
{
"name": "John Doe"
"customerGroup": {
"typeId": "customer-group",
"id": "7ba61480-6a72-4a2a-a72e-cd39f75a7ef2"
}
}
This is what the result looks like when the path 'customerGroup' has been expanded:
{
"name": "John Doe"
"customerGroup": {
typeId: "customer-group",
id: "7ba61480-6a72-4a2a-a72e-cd39f75a7ef2"
obj: {
"name": "Gold"
}
}
}
paths
- The paths to be expanded, such as 'customerGroup'.