public abstract class LocationObjectQuery
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LocationObjectQuery.LocationObjectQueryFormatType
Query format (long or short).
|
static class |
LocationObjectQuery.LocationObjectQueryOrderByOrderType
Order-by order (ascending or descending).
|
| Modifier and Type | Field and Description |
|---|---|
protected Location |
mLocation |
protected JSONObject |
mProperties |
protected java.lang.String |
orderBy |
protected LocationObjectQuery.LocationObjectQueryOrderByOrderType |
orderByOrderType |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributes(java.util.Map<java.lang.String,java.lang.String> newAttributes)
Adds the specified set of attributes to the query's attributes.
|
void |
addID(int id)
Adds the specified ID to the list of the IDs the query will search for.
|
void |
addIDs(java.util.List<java.lang.Integer> ids)
Adds the specified list of IDs to the query's IDs.
|
void |
clearAttributes()
Removes all the attribute values.
|
void |
clearIDs()
Removes all the IDs.
|
protected JSONObject |
cloneProperties() |
protected java.lang.String |
createOrderByString() |
protected void |
execute(LocationObjectQueryRestCallback callback) |
abstract void |
execute(LocationObjectsQueryCallback callback)
Asynchronously executes the query, invoking the specified completion handler block when finished.
|
JSONObject |
getAttributes()
Gets the user-defined attributes on which the location query will search.
|
java.lang.String |
getDescription()
Gets the location object's user-defined description on which the query's result will be filtered
with a case-insensitive partial match of this string.
|
LocationObjectQuery.LocationObjectQueryFormatType |
getFormat()
Gets the format of the result returned by the query, which can be 'long' or 'short'.
|
protected abstract java.lang.String |
getIDPropertyName() |
java.util.List<java.lang.Integer> |
getIDs()
Gets a list of IDs that the query's result will be filtered to match with.
|
protected int |
getIntProperty(java.lang.String key) |
protected JSONArray |
getJSONArrayProperty(java.lang.String key) |
int |
getLimit()
Gets the maximum number of items to return.
|
java.lang.String |
getName()
Gets the location object's user-defined name on which the query's result will be filtered
with a case-insensitive partial match of this string.
|
int |
getOffset()
Gets the zero-based index of the first item to return in the results.
|
protected java.lang.String |
getOrderBy() |
protected java.lang.String |
getOrderByAttribute() |
LocationObjectQuery.LocationObjectQueryOrderByOrderType |
getOrderByOrder()
Gets the order (ascending or descending) in which the query results will be sorted when returned.
|
JSONObject |
getProperties()
Gets the query's raw properties.
|
protected java.lang.String |
getResourceDir() |
java.lang.String |
getSearch()
Gets the search parameter on which the location query will search for either description or name.
|
protected java.lang.String |
getStringProperty(java.lang.String key) |
void |
insertID(int id,
int index)
Inserts the specified ID at the specified index of the list of IDs that the query will search for.
|
void |
removeAttribute(java.lang.String key)
Removes the specified attribute's value.
|
void |
removeID(int id)
Removes the specified ID from the list of the IDs that the query will search for.
|
void |
removeIDAtIndex(int index)
Removes the ID at the specified index from the list of IDs that the query will search for.
|
protected void |
removeProperty(java.lang.String key) |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Sets the specified attribute's value.
|
void |
setAttributes(JSONObject attributes)
Sets the user-defined attributes on which the location query will search.
|
void |
setDescription(java.lang.String description)
Sets the location object's description on which the query's result will be filtered.
|
void |
setFormat(LocationObjectQuery.LocationObjectQueryFormatType format)
Sets the format of the result returned by the query, which can be 'long' or 'short'.
|
void |
setIDs(java.util.List<java.lang.Integer> ids)
Sets the list of IDs that the query's result will be filtered to match with.
|
void |
setLimit(int limit)
Sets the maximum number of items to return.
|
void |
setName(java.lang.String name)
Sets the location object's name on which the query's result will be filtered.
|
void |
setOffset(int offset)
Gets the zero-based index of the first item to return in the results.
|
protected void |
setOrderBy(java.lang.String orderBy) |
void |
setOrderByOrder(LocationObjectQuery.LocationObjectQueryOrderByOrderType orderByOrder)
Gets the order (ascending or descending) in which the query results will be sorted when returned.
|
protected void |
setProperty(java.lang.String key,
java.lang.Object value) |
void |
setSearch(java.lang.String search)
Sets the search parameter on which the location query will search for either description or name.
|
protected Location mLocation
protected JSONObject mProperties
protected java.lang.String orderBy
protected LocationObjectQuery.LocationObjectQueryOrderByOrderType orderByOrderType
public JSONObject getProperties()
public java.lang.String getName()
public void setName(java.lang.String name)
name - The name for search as a string.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - The description for search as a string.public java.lang.String getSearch()
public void setSearch(java.lang.String search)
search - The search parameter as a string.public JSONObject getAttributes()
public void setAttributes(JSONObject attributes)
attributes - The attributes as a JSONObject.public void setAttribute(java.lang.String key,
java.lang.Object value)
key - The attribute's user-defined key.value - The attribute's user-defined value.public void removeAttribute(java.lang.String key)
key - The attribute's user-defined key.public void addAttributes(java.util.Map<java.lang.String,java.lang.String> newAttributes)
newAttributes - The query's new set of attributes.public void clearAttributes()
public java.util.List<java.lang.Integer> getIDs()
public void setIDs(java.util.List<java.lang.Integer> ids)
ids - A list of IDs.public void addIDs(java.util.List<java.lang.Integer> ids)
ids - The set of IDs to be added to the query's current list of IDs.public void addID(int id)
id - The ID to add to the query's list of IDs.public void insertID(int id,
int index)
id - The ID to add to the query's list of IDs.index - The index at which to insert the new ID.public void removeID(int id)
id - The ID to remove for the query's list of IDs.public void removeIDAtIndex(int index)
index - The index of the ID to remove from the query's list of IDs.public void clearIDs()
public LocationObjectQuery.LocationObjectQueryFormatType getFormat()
public void setFormat(LocationObjectQuery.LocationObjectQueryFormatType format)
format - The format as a LocationObjectQueryFormatType enum.public LocationObjectQuery.LocationObjectQueryOrderByOrderType getOrderByOrder()
public void setOrderByOrder(LocationObjectQuery.LocationObjectQueryOrderByOrderType orderByOrder)
orderByOrder - The order as a LocationObjectQueryOrderByOrderType enum.public int getOffset()
public void setOffset(int offset)
offset - The offset as an integer.public int getLimit()
public void setLimit(int limit)
limit - The limit as an integer.public abstract void execute(LocationObjectsQueryCallback callback)
callback - The callback invoked when the request to the Location service is finished.protected abstract java.lang.String getIDPropertyName()
protected void execute(LocationObjectQueryRestCallback callback)
protected java.lang.String createOrderByString()
protected java.lang.String getOrderBy()
protected java.lang.String getOrderByAttribute()
protected void setOrderBy(java.lang.String orderBy)
protected java.lang.String getResourceDir()
protected void setProperty(java.lang.String key,
java.lang.Object value)
protected void removeProperty(java.lang.String key)
protected java.lang.String getStringProperty(java.lang.String key)
protected int getIntProperty(java.lang.String key)
protected JSONArray getJSONArrayProperty(java.lang.String key)
protected JSONObject cloneProperties()