gsonBuilder
Constructor and Description |
---|
QueryRequest(com.google.gson.JsonObject collection)
Create a new query request for the specified collection.
|
QueryRequest(String type)
Create a new query request for the specified type.
|
Modifier and Type | Method and Description |
---|---|
QueryRequest |
clone()
Clone this request.
|
Fetch |
getFetch()
Get the current list of fields to be returned on the matching objects.
|
int |
getLimit()
Get the maximum number of records to be returned from the query.
|
String |
getOrder()
Set the order by which the result set will be sorted.
|
int |
getPageSize()
Get the page size of the result set.
|
String |
getProject()
Get the project which the result set should be scoped to.
|
QueryFilter |
getQueryFilter()
Get the filter by which the result set will be narrowed down.
|
int |
getStart()
Get the start index of the result set.
|
protected String |
getTypeEndpoint() |
String |
getWorkspace()
Get the workspace which the result set should be scoped to.
|
boolean |
isScopedDown()
If a project has been specified, get whether to include matching objects in child projects in the result set.
|
boolean |
isScopedUp()
If a project has been specified, get whether to include matching objects in parent projects in the result set.
|
void |
setFetch(Fetch fetch)
Set the current list of fields to be returned on the matching objects.
|
void |
setLimit(int limit)
Set the maximum number of records to be returned from the query.
|
void |
setOrder(String order)
Get the order by which the result set will be sorted.
|
void |
setPageSize(int pageSize)
Set the page size of the result set.
|
void |
setProject(String projectRef)
Specify the project which the result set should be scoped to.
|
void |
setQueryFilter(QueryFilter queryFilter)
Set a filter by which the result set will be narrowed down.
|
void |
setScopedDown(boolean scopeDown)
If a project has been specified, set whether to include matching objects in child projects in the result set.
|
void |
setScopedUp(boolean scopeUp)
If a project has been specified, set whether to include matching objects in parent projects in the result set.
|
void |
setStart(int start)
Set the 1-based start index of the result set.
|
void |
setWorkspace(String workspaceRef)
Specify the workspace which the result set should be scoped to.
|
String |
toUrl()
Convert this request into a url compatible with the WSAPI.
|
addParam, getGsonBuilder, getParams, setGsonBuilder, setParams
public QueryRequest(String type)
type
- The WSAPI type to be queried, e.g. Defectpublic QueryRequest(com.google.gson.JsonObject collection)
collection
- The collection to query. Should have a _ref property.public QueryFilter getQueryFilter()
public void setQueryFilter(QueryFilter queryFilter)
queryFilter
- the filterpublic String getOrder()
The default is ObjectID ASC.
public void setOrder(String order)
order
- the orderpublic String getWorkspace()
public void setWorkspace(String workspaceRef)
Specify the workspace which the result set should be scoped to.
The default is the user's default workspace.workspaceRef
- the ref of the workspace to scope to. May be an absolute or relative ref, e.g. /workspace/1234public String getProject()
public void setProject(String projectRef)
Specify the project which the result set should be scoped to.
The default is the user's default project. Specifying null will cause the result to be scoped to the entire specified workspace.projectRef
- the ref of the project to scope to. May be null or an absolute or relative ref, e.g. /project/1234public boolean isScopedUp()
public void setScopedUp(boolean scopeUp)
If a project has been specified, set whether to include matching objects in parent projects in the result set.
Defaults to false.scopeUp
- whether to include matching objects in parent projectspublic boolean isScopedDown()
public void setScopedDown(boolean scopeDown)
If a project has been specified, set whether to include matching objects in child projects in the result set.
Defaults to true.scopeDown
- whether to include matching objects in child projectspublic int getStart()
public void setStart(int start)
start
- the start indexpublic Fetch getFetch()
Get the current list of fields to be returned on the matching objects.
By default all fields will be returned in the response (fetch=true).public void setFetch(Fetch fetch)
fetch
- the list of fields to be returned.public int getPageSize()
public void setPageSize(int pageSize)
Set the page size of the result set.
The default is 200.pageSize
- the new page size. Must be between 1 and 200 inclusive.public int getLimit()
public void setLimit(int limit)
Set the maximum number of records to be returned from the query.
If not set only one page of data will be returned byRallyRestApi.query(com.rallydev.rest.request.QueryRequest)
limit
- the maximum number of records to be returnedpublic QueryRequest clone()
public String toUrl()
Convert this request into a url compatible with the WSAPI.
The current criteria set on this request and any other parameters will be included.protected String getTypeEndpoint()
Copyright © 2016. All Rights Reserved.