LiFilters Reference


Package: applicasa.LiCore.communication
Declared In: applicasa.LiCore.communication.LiFilters

Overview


Applicasa's LiQuery class aims to ease and enhance the need to store necessary data in a remote datastore and subsequently query it from an application with minimal fuss. To that end, LiQuery provides the standard querying interface for all application data developers store in Applicasa, along with highly customizable filtering and paging operations.

Of course, building up useful queries always requires the ability to filter results to a specific set of required results. LiFilters offers the ability to define simple and complex filters that can be added to an LiQuery object to perform any kind of query applications need.


Tasks


Creating and Defining Filters

LiFilters(LiField, Operation, Object)
LiFilters(LiFilters, Condition, LiFilters)
LiFilters(List, Condition)
NOT


Constructor Methods


LiFilters(LiField, Operation, Object)

Defines a simple filter with a given field, value, and operation.

public LiFilters(LiField lifield, Operation operation, Object value)

Parameters:

lifield
An LiField enum value indicating what datastore object field should be used for filtering. Valid values can be found in the *Data.java downloaded SDK files.

operation
An Operation enum value indicating what type of operation should be performed on the given field and value. Valid values are GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, EQUAL, LIKE, NOT_EQUAL, and INRADIUS.

value
An Object value used to filter a given field by the provided operation type.

Return Value:

An LiFilters object that can be passed to an LiQuery object or another LiFilters object for building up complex queries.

LiFilters(LiFilters, Condition, LiFilters)

Defines a complex filter that accepts two LiFilters objects and an operator for combining the filters.

public LiFilters(LiFilters lifilter, Condition condition, LiFilters lifilter2)

Parameters:

lifilter
An LiFilters object that will be the first part of the complex filter.

lifilter2
An LiFilters object that will be the second part of the complex filter.

condition
A Condition enum value that indicates what type of operator to use in combining the filters. Valid values are AND and OR.

Return Value:

An LiFilters object that can be passed to an LiQuery object or another LiFilters object for building up complex queries.

LiFilters(List, Condition)

Returns an LiFilters object that will combine an acceptable List of LiFilters and a Condition operator.

public LiFilters(List<LiFilters> lifilter2, Condition condition)

Parameters:

lifilter2
A List of LiFilters.

condition
A Condition enum value that indicates what type of operator to use in combining the filters. Valid values are AND and OR.

Return Value:

An LiFilters object that can be passed to an LiQuery object or another LiFilters object for building up complex queries.


Instance Methods


NOT

Modifies an LiFilters object to negate the operation being performed.

public LiFilters NOT();

Return Value:

An LiFilters object that negates the already defined filter (thus, it requires that a LiFilters object has already been defined).


  « Back to SDK Class List