com.unboundid.scim.sdk
Class SCIMFilter

java.lang.Object
  extended by com.unboundid.scim.sdk.SCIMFilter

public class SCIMFilter
extends Object

This class represents a SCIM query filter.


Constructor Summary
SCIMFilter(SCIMFilterType filterType, AttributePath filterAttribute, String filterValue, boolean quoteFilterValue, List<SCIMFilter> filterComponents)
          Create a new SCIM filter from the provided information.
 
Method Summary
static SCIMFilter createAndFilter(List<SCIMFilter> filterComponents)
          Create a new and filter.
static SCIMFilter createContainsFilter(AttributePath filterAttribute, String filterValue)
          Create a new contains filter.
static SCIMFilter createEqualityFilter(AttributePath filterAttribute, String filterValue)
          Create a new equality filter.
static SCIMFilter createGreaterOrEqualFilter(AttributePath filterAttribute, String filterValue)
          Create a new greater or equal filter.
static SCIMFilter createGreaterThanFilter(AttributePath filterAttribute, String filterValue)
          Create a new greater than filter.
static SCIMFilter createLessOrEqualFilter(AttributePath filterAttribute, String filterValue)
          Create a new less or equal filter.
static SCIMFilter createLessThanFilter(AttributePath filterAttribute, String filterValue)
          Create a new less than filter.
static SCIMFilter createOrFilter(List<SCIMFilter> filterComponents)
          Create a new or filter.
static SCIMFilter createPresenceFilter(AttributePath filterAttribute)
          Create a new presence filter.
static SCIMFilter createStartsWithFilter(AttributePath filterAttribute, String filterValue)
          Create a new starts with filter.
 AttributePath getFilterAttribute()
          Retrieve the attribute or sub-attribute to filter by, or null if not applicable for this filter type.
 List<SCIMFilter> getFilterComponents()
          Retrieve the filter components for an 'and' or 'or' filter.
 SCIMFilterType getFilterType()
          Retrieve the filter type.
 String getFilterValue()
          Retrieve the filter attribute value.
 boolean isQuoteFilterValue()
          Determine whether the filter attribute value is quoted in the string representation of the filter.
static SCIMFilter parse(String filterString)
          Parse a filter from its string representation.
 String toString()
          
 void toString(StringBuilder builder)
          Append the string representation of the filter to the provided buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SCIMFilter

public SCIMFilter(SCIMFilterType filterType,
                  AttributePath filterAttribute,
                  String filterValue,
                  boolean quoteFilterValue,
                  List<SCIMFilter> filterComponents)
Create a new SCIM filter from the provided information.

Parameters:
filterType - The filter type.
filterAttribute - The attribute or sub-attribute to filter by, or null if not applicable.
filterValue - The filter attribute value, or null if not applicable.
quoteFilterValue - Specifies whether the filter value is quoted in the string representation of the filter.
filterComponents - The filter components for 'or' and 'and' filter types, or null if not applicable.
Method Detail

parse

public static SCIMFilter parse(String filterString)
                        throws SCIMException
Parse a filter from its string representation.

Parameters:
filterString - The string representation of the filter expression.
Returns:
The parsed filter.
Throws:
SCIMException - If the filter string could not be parsed.

createAndFilter

public static SCIMFilter createAndFilter(List<SCIMFilter> filterComponents)
Create a new and filter.

Parameters:
filterComponents - The filter components.
Returns:
A new and filter.

createOrFilter

public static SCIMFilter createOrFilter(List<SCIMFilter> filterComponents)
Create a new or filter.

Parameters:
filterComponents - The filter components.
Returns:
A new or filter.

createEqualityFilter

public static SCIMFilter createEqualityFilter(AttributePath filterAttribute,
                                              String filterValue)
Create a new equality filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
filterValue - The filter attribute value.
Returns:
A new equality filter.

createContainsFilter

public static SCIMFilter createContainsFilter(AttributePath filterAttribute,
                                              String filterValue)
Create a new contains filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
filterValue - The filter attribute value.
Returns:
A new contains filter.

createStartsWithFilter

public static SCIMFilter createStartsWithFilter(AttributePath filterAttribute,
                                                String filterValue)
Create a new starts with filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
filterValue - The filter attribute value.
Returns:
A new starts with filter.

createPresenceFilter

public static SCIMFilter createPresenceFilter(AttributePath filterAttribute)
Create a new presence filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
Returns:
A new presence filter.

createGreaterThanFilter

public static SCIMFilter createGreaterThanFilter(AttributePath filterAttribute,
                                                 String filterValue)
Create a new greater than filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
filterValue - The filter attribute value.
Returns:
A new greater than filter.

createGreaterOrEqualFilter

public static SCIMFilter createGreaterOrEqualFilter(AttributePath filterAttribute,
                                                    String filterValue)
Create a new greater or equal filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
filterValue - The filter attribute value.
Returns:
A new greater or equal filter.

createLessThanFilter

public static SCIMFilter createLessThanFilter(AttributePath filterAttribute,
                                              String filterValue)
Create a new less than filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
filterValue - The filter attribute value.
Returns:
A new less than filter.

createLessOrEqualFilter

public static SCIMFilter createLessOrEqualFilter(AttributePath filterAttribute,
                                                 String filterValue)
Create a new less or equal filter.

Parameters:
filterAttribute - The attribute or sub-attribute to filter by.
filterValue - The filter attribute value.
Returns:
A new less or equal filter.

getFilterType

public SCIMFilterType getFilterType()
Retrieve the filter type.

Returns:
The filter type.

getFilterAttribute

public AttributePath getFilterAttribute()
Retrieve the attribute or sub-attribute to filter by, or null if not applicable for this filter type.

Returns:
The attribute or sub-attribute to filter by

getFilterValue

public String getFilterValue()
Retrieve the filter attribute value.

Returns:
The filter attribute value, or null if not applicable for this filter type.

isQuoteFilterValue

public boolean isQuoteFilterValue()
Determine whether the filter attribute value is quoted in the string representation of the filter.

Returns:
true if the filter attribute value is quoted in the string representation of the filter.

getFilterComponents

public List<SCIMFilter> getFilterComponents()
Retrieve the filter components for an 'and' or 'or' filter.

Returns:
The filter components for an 'and' or 'or' filter.

toString

public String toString()

Overrides:
toString in class Object

toString

public void toString(StringBuilder builder)
Append the string representation of the filter to the provided buffer.

Parameters:
builder - The buffer to which the string representation of the filter is to be appended.


Copyright © 2011-2012 UnboundID. All Rights Reserved.