servicenow.community.soap
Class GlideFilter

java.lang.Object
  extended by servicenow.community.soap.GlideFilter

public class GlideFilter
extends java.lang.Object

This class encapsulates an Encoded Query. It is used to restrict the number of records return by a BulkFetcher. The following two examples are equivalent.

Example 1:

 GlideFilter filter = new GlideFilter("category=network^active=true");
 
Example 2:
 GlideFilter filter = new GlideFilter()
    .addFilter("category", "=", "network")
    .addFilter("active", "=", "true");
 

Author:
Giles Lewis

Field Summary
static java.lang.String CONTAINS
           
static java.lang.String EQUALS
           
static java.lang.String GREATER_THAN
           
static java.lang.String IN
           
static java.lang.String LESS_THAN
           
static java.lang.String NOT_EQUALS
           
static java.lang.String STARTS_WITH
           
 
Constructor Summary
GlideFilter()
           
GlideFilter(GlideFilter filter)
          Make a copy of a GlideFilter
GlideFilter(java.lang.String encodedQuery)
          Create a filter from an Encoded Query string.
 
Method Summary
 GlideFilter addCreatedFilter(GlideDateTime starting, GlideDateTime ending)
          Adds a datetime range to a filter.
 GlideFilter addFilter(GlideFilter newQuery)
           
 GlideFilter addFilter(java.lang.String newQuery)
          Add an encoded query to a GlideFilter
 GlideFilter addFilter(java.lang.String field, java.lang.String relop, java.lang.String value)
          Augment a GlideFilter using a name and a value.
 GlideFilter addUpdatedFilter(GlideDateTime starting, GlideDateTime ending)
          Adds a datetime range to a filter.
 boolean isEmpty()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EQUALS

public static final java.lang.String EQUALS
See Also:
Constant Field Values

NOT_EQUALS

public static final java.lang.String NOT_EQUALS
See Also:
Constant Field Values

LESS_THAN

public static final java.lang.String LESS_THAN
See Also:
Constant Field Values

GREATER_THAN

public static final java.lang.String GREATER_THAN
See Also:
Constant Field Values

STARTS_WITH

public static final java.lang.String STARTS_WITH
See Also:
Constant Field Values

CONTAINS

public static final java.lang.String CONTAINS
See Also:
Constant Field Values

IN

public static final java.lang.String IN
See Also:
Constant Field Values
Constructor Detail

GlideFilter

public GlideFilter()

GlideFilter

public GlideFilter(java.lang.String encodedQuery)
Create a filter from an Encoded Query string.
 GlideFilter filter = new GlideFilter("category=network^active=true");
 

Parameters:
encodedQuery - Encoded query string

GlideFilter

public GlideFilter(GlideFilter filter)
Make a copy of a GlideFilter

Method Detail

isEmpty

public boolean isEmpty()

addFilter

public GlideFilter addFilter(java.lang.String field,
                             java.lang.String relop,
                             java.lang.String value)
Augment a GlideFilter using a name and a value.
 GlideFilter filter = new GlideFilter()
    .addFilter("category", "=", "network")
    .addFilter("active", "=", "true");
 


addUpdatedFilter

public GlideFilter addUpdatedFilter(GlideDateTime starting,
                                    GlideDateTime ending)
Adds a datetime range to a filter.

Parameters:
starting - Select records updated on or after this datetime
ending - Select records updated before this datetime
Returns:
The modified original filter

addCreatedFilter

public GlideFilter addCreatedFilter(GlideDateTime starting,
                                    GlideDateTime ending)
Adds a datetime range to a filter.

Parameters:
starting - Select records created on or after this datetime
ending - Select records created before this datetime
Returns:
The modified original filter

addFilter

public GlideFilter addFilter(java.lang.String newQuery)
Add an encoded query to a GlideFilter
 filter.addFilter("category=network");
 

Parameters:
newQuery - An encoded query string
Returns:
The modified original filter

addFilter

public GlideFilter addFilter(GlideFilter newQuery)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object