LiQuery Reference
Package: applicasa.LiCore.communication
Declared In: applicasa.LiCore.communication.LiQuery
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.
Tasks
Creating and Defining Queries
setGeoFilter(LiField, LiLocation, double)
setFilter(LiFilters)
addOrderBy(LiField, SortType)
setPager(int, int)
Instance Methods
setGeoFilter(LiField, LiLocation, double)
Sets a location-based filter on a given data field with a provided field, location, and radius.
public void setGeoFilter(LiField lifield, LiLocation location, double radius)
Parameters:
lifield
An enum value indicating which LiField is to be used for location-based filtering. Available LiField enum values can be found in *Data.java files included in the Applicasa SDK.
location
An LiLocation instance indicating the location value that will be used for filtering.
radius
A double value indicating the radius from location by which lifield should be filtered.
setFilter(LiFilters)
Sets the query's filtering action.
public void setFilter(LiFilters lifilters)
Parameters:
lifilters
An LiFilters instance that defines what type of filter operation is to be performed by the query.
addOrderBy(LiField, SortType)
Adds an ORDER_BY clause to the query.
public void addOrderBy(LiField liField, SortType sortType)
Parameters:
lifield
An enum value indicating which LiField is to be used for location-based filtering. Available LiField enum values can be found in *Data.java files included in the Applicasa SDK.
sortType
An enum value indicating what type of sorting should be done on the lifield. Valid values are ASCENDING and DESCENDING.
setPager(int, int)
Sets the desired page and records per page to return when using a paginated query.
public void setPager(int page, int recsPerPage)
Parameters:
page
An int value indicating which page of results to return.
recsPerPage
An int value indicating how many records should be returned per page of results.