|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.labkey.remoteapi.Command<ResponseType>
org.labkey.remoteapi.query.BaseQueryCommand<ResponseType>
public abstract class BaseQueryCommand<ResponseType extends CommandResponse>
Created by IntelliJ IDEA. User: brittp Date: Jun 24, 2009 Time: 10:11:39 PM
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.labkey.remoteapi.Command |
|---|
Command.CommonParameters |
| Field Summary | |
|---|---|
protected ContainerFilter |
_containerFilter
|
protected java.util.List<Filter> |
_filters
|
protected int |
_maxRows
|
protected int |
_offset
|
protected java.util.List<Sort> |
_sorts
|
| Fields inherited from class org.labkey.remoteapi.Command |
|---|
CONTENT_TYPE_JSON |
| Constructor Summary | |
|---|---|
BaseQueryCommand(BaseQueryCommand<ResponseType> source)
|
|
BaseQueryCommand(java.lang.String controllerName,
java.lang.String actionName)
|
|
| Method Summary | |
|---|---|
void |
addFilter(Filter filter)
Adds a new filter to the list. |
void |
addFilter(java.lang.String columnName,
java.lang.Object value,
Filter.Operator operator)
Constructs and adds a new filter to the list. |
void |
addSort(Sort sort)
Adds a new sort definition to the current list. |
void |
addSort(java.lang.String columnName,
Sort.Direction direction)
Constructs and adds a new sort definition to the current list. |
ContainerFilter |
getContainerFilter()
Returns the container filter set for this command |
java.util.List<Filter> |
getFilters()
Returns the current list of filters, or null if none are defined. |
int |
getMaxRows()
Returns the current row limit value. |
int |
getOffset()
Returns the index of the first row in the resultset to return (defaults to 0). |
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
Returns the current parameter map, or null if a map has not yet been set. |
protected java.lang.String |
getSortQueryStringParam()
Constructs the sort query string parameter from the current list of sort definitions. |
java.util.List<Sort> |
getSorts()
Returns the current list of sort definitions. |
void |
setContainerFilter(ContainerFilter containerFilter)
Sets the container filter for the sql to be executed. |
void |
setFilters(java.util.List<Filter> filters)
Sets the current list of filters. |
void |
setMaxRows(int maxRows)
Sets the current row limit value. |
void |
setOffset(int offset)
Sets the index of the first row in the resultset to return from the server. |
void |
setSorts(java.util.List<Sort> sorts)
Sets the current set of sort definitions. |
| Methods inherited from class org.labkey.remoteapi.Command |
|---|
copy, createMethod, createResponse, execute, getActionName, getActionUrl, getControllerName, getHttpMethod, getParamValueAsString, getQueryString, getRequiredVersion, getTimeout, setParameters, setRequiredVersion, setTimeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _maxRows
protected int _offset
protected java.util.List<Sort> _sorts
protected java.util.List<Filter> _filters
protected ContainerFilter _containerFilter
| Constructor Detail |
|---|
public BaseQueryCommand(BaseQueryCommand<ResponseType> source)
public BaseQueryCommand(java.lang.String controllerName,
java.lang.String actionName)
| Method Detail |
|---|
public int getMaxRows()
public void setMaxRows(int maxRows)
maxRows rows will be returned from the server.
maxRows - The maximum number of rows to return, or -1 to get all rows (default)public int getOffset()
public void setOffset(int offset)
setMaxRows(int) to return pages of
rows at a time from the server.
offset - The current offset index.public java.util.List<Sort> getSorts()
public void setSorts(java.util.List<Sort> sorts)
sorts - The new list of sort definitions.public void addSort(Sort sort)
sort - The new sort definition.
public void addSort(java.lang.String columnName,
Sort.Direction direction)
addSort(new Sort(columnName, direction))
columnName - The column name.direction - The sort direction.Sortpublic java.util.List<Filter> getFilters()
public void setFilters(java.util.List<Filter> filters)
filters - The new list of filters.public void addFilter(Filter filter)
filter - The new filter definition.
public void addFilter(java.lang.String columnName,
java.lang.Object value,
Filter.Operator operator)
addFilter(new Filter(columnName, value, operator))
columnName - The column name.value - The filter value.operator - The filter operator.Filterpublic ContainerFilter getContainerFilter()
public void setContainerFilter(ContainerFilter containerFilter)
containerFilter - the filter to apply to the query (may be null)protected java.lang.String getSortQueryStringParam()
public java.util.Map<java.lang.String,java.lang.Object> getParameters()
Command
getParameters in class Command<ResponseType extends CommandResponse>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||