Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.labkey.remoteapi.query
Class Filter

    java.lang.Object
      org.labkey.remoteapi.query.Filter

    public class Filter

extends java.lang.Object

Represents a filter definition for a query

Nested Class Summary
`static class` | `Filter.Operator`

Constructor Summary
`Filter(Filter source)`
`Filter(java.lang.String columnName, java.lang.Object value)` Constructs a new equality Filter for the given column name and value.
`Filter(java.lang.String columnName, java.lang.Object value, Filter.Operator operator)` Constructs a filter with a given column name, value and operator.

Method Summary
`java.lang.String` | `getColumnName()`
`Filter.Operator` | `getOperator()`
`java.lang.String` | `getQueryStringParamName()` Returns the query string parameter name for this filter.
`java.lang.String` | `getQueryStringParamValue()` Returns the query string parameter value (not URL-encoded).
`java.lang.Object` | `getValue()`
`void` | `setColumnName(java.lang.String columnName)`
`void` | `setOperator(Filter.Operator operator)`
`void` | `setValue(java.lang.Object value)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Filter

    public Filter(java.lang.String columnName,
                  java.lang.Object value)

  Constructs a new equality Filter for the given column name and value. By default, the operator will be set to `Filter.Operator.EQUAL`.

  Parameters:
    `columnName` - The column name.
    `value` - The value it should be equal to.

### Filter

    public Filter(java.lang.String columnName,
                  java.lang.Object value,
                  Filter.Operator operator)

  Constructs a filter with a given column name, value and operator.

  Parameters:
    `columnName` - The column name to filter.
    `value` - The value to compare it to.
    `operator` - The operator for the comparisson.

### Filter

    public Filter(Filter source)

Method Detail

### getColumnName

    public java.lang.String getColumnName()

### setColumnName

    public void setColumnName(java.lang.String columnName)

### getOperator

    public Filter.Operator getOperator()

### setOperator

    public void setOperator(Filter.Operator operator)

### getValue

    public java.lang.Object getValue()

### setValue

    public void setValue(java.lang.Object value)

### getQueryStringParamName

    public java.lang.String getQueryStringParamName()

  Returns the query string parameter name for this filter. Because query string parameters contain only two items (name = value), we encode the operator in the name, and this method returns the appropriate encoding.

  Returns:
    The query string parameter name.

### getQueryStringParamValue

    public java.lang.String getQueryStringParamValue()

  Returns the query string parameter value (not URL-encoded). By default, this simply returns the results of the `value.toString()`. Extended classes may override this to do a different string encoding. Note that this value will be URL-encoded by the caller, so do not URL-encode the value returned from this method.

  Returns:
    The query string parameter value.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD