Package com.parse
Class ParseQuery.State.Builder<T extends ParseObject>
- java.lang.Object
-
- com.parse.ParseQuery.State.Builder<T>
-
- Enclosing class:
- ParseQuery.State<T extends ParseObject>
public static class ParseQuery.State.Builder<T extends ParseObject> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder(ParseQuery.State state)
Builder(ParseQuery.State.Builder<T> builder)
Builder(java.lang.Class<T> subclass)
Builder(java.lang.String className)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParseQuery.State.Builder<T>
addAscendingOrder(java.lang.String key)
Also sorts the results in ascending order by the given key.ParseQuery.State.Builder<T>
addCondition(java.lang.String key, java.lang.String condition, java.lang.Object value)
ParseQuery.State.Builder<T>
addCondition(java.lang.String key, java.lang.String condition, java.util.Collection<?> value)
ParseQuery.State.Builder<T>
addDescendingOrder(java.lang.String key)
Also sorts the results in descending order by the given key.ParseQuery.State<T>
build()
ParseQuery.State.Builder<T>
fromLocalDatastore()
ParseQuery.State.Builder<T>
fromNetwork()
ParseQuery.State.Builder<T>
fromPin()
ParseQuery.State.Builder<T>
fromPin(java.lang.String pinName)
ParseQuery.CachePolicy
getCachePolicy()
java.lang.String
getClassName()
int
getLimit()
long
getMaxCacheAge()
int
getSkip()
ParseQuery.State.Builder<T>
ignoreACLs()
ParseQuery.State.Builder<T>
include(java.lang.String key)
Include nestedParseObject
s for the provided key.boolean
isFromLocalDatstore()
boolean
isFromNetwork()
ParseQuery.State.Builder<T>
maxDistance(java.lang.String key, double maxDistance)
static <T extends ParseObject>
ParseQuery.State.Builder<T>or(java.util.List<ParseQuery.State.Builder<T>> builders)
ParseQuery.State.Builder<T>
orderByAscending(java.lang.String key)
Sorts the results in ascending order by the given key.ParseQuery.State.Builder<T>
orderByDescending(java.lang.String key)
Sorts the results in descending order by the given key.ParseQuery.State.Builder<T>
selectKeys(java.util.Collection<java.lang.String> keys)
Restrict the fields of returnedParseObject
s to only include the provided keys.ParseQuery.State.Builder<T>
setCachePolicy(ParseQuery.CachePolicy cachePolicy)
ParseQuery.State.Builder<T>
setLimit(int limit)
ParseQuery.State.Builder<T>
setMaxCacheAge(long maxCacheAge)
ParseQuery.State.Builder<T>
setSkip(int skip)
ParseQuery.State.Builder<T>
setTracingEnabled(boolean trace)
ParseQuery.State.Builder<T>
whereDoesNotMatchKeyInQuery(java.lang.String key, java.lang.String keyInQuery, ParseQuery.State.Builder<?> builder)
ParseQuery.State.Builder<T>
whereDoesNotMatchQuery(java.lang.String key, ParseQuery.State.Builder<?> builder)
ParseQuery.State.Builder<T>
whereEqualTo(java.lang.String key, java.lang.Object value)
Add a constraint to the query that requires a particular key's value to be equal to the provided value.ParseQuery.State.Builder<T>
whereGeoIntersects(java.lang.String key, ParseGeoPoint point)
ParseQuery.State.Builder<T>
whereGeoWithin(java.lang.String key, java.util.List<ParseGeoPoint> points)
ParseQuery.State.Builder<T>
whereMatchesKeyInQuery(java.lang.String key, java.lang.String keyInQuery, ParseQuery.State.Builder<?> builder)
ParseQuery.State.Builder<T>
whereMatchesQuery(java.lang.String key, ParseQuery.State.Builder<?> builder)
ParseQuery.State.Builder<T>
whereNear(java.lang.String key, ParseGeoPoint point)
ParseQuery.State.Builder<T>
whereText(java.lang.String key, java.lang.String value)
ParseQuery.State.Builder<T>
whereWithin(java.lang.String key, ParseGeoPoint southwest, ParseGeoPoint northeast)
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.String className)
-
Builder
public Builder(java.lang.Class<T> subclass)
-
Builder
public Builder(ParseQuery.State state)
-
Builder
public Builder(ParseQuery.State.Builder<T> builder)
-
-
Method Detail
-
or
public static <T extends ParseObject> ParseQuery.State.Builder<T> or(java.util.List<ParseQuery.State.Builder<T>> builders)
-
getClassName
public java.lang.String getClassName()
-
whereEqualTo
public ParseQuery.State.Builder<T> whereEqualTo(java.lang.String key, java.lang.Object value)
Add a constraint to the query that requires a particular key's value to be equal to the provided value.- Parameters:
key
- The key to check.value
- The value that theParseObject
must contain.- Returns:
- this, so you can chain this call.
-
whereDoesNotMatchKeyInQuery
public ParseQuery.State.Builder<T> whereDoesNotMatchKeyInQuery(java.lang.String key, java.lang.String keyInQuery, ParseQuery.State.Builder<?> builder)
-
whereMatchesKeyInQuery
public ParseQuery.State.Builder<T> whereMatchesKeyInQuery(java.lang.String key, java.lang.String keyInQuery, ParseQuery.State.Builder<?> builder)
-
whereDoesNotMatchQuery
public ParseQuery.State.Builder<T> whereDoesNotMatchQuery(java.lang.String key, ParseQuery.State.Builder<?> builder)
-
whereMatchesQuery
public ParseQuery.State.Builder<T> whereMatchesQuery(java.lang.String key, ParseQuery.State.Builder<?> builder)
-
whereNear
public ParseQuery.State.Builder<T> whereNear(java.lang.String key, ParseGeoPoint point)
-
maxDistance
public ParseQuery.State.Builder<T> maxDistance(java.lang.String key, double maxDistance)
-
whereWithin
public ParseQuery.State.Builder<T> whereWithin(java.lang.String key, ParseGeoPoint southwest, ParseGeoPoint northeast)
-
whereGeoWithin
public ParseQuery.State.Builder<T> whereGeoWithin(java.lang.String key, java.util.List<ParseGeoPoint> points)
-
whereGeoIntersects
public ParseQuery.State.Builder<T> whereGeoIntersects(java.lang.String key, ParseGeoPoint point)
-
whereText
public ParseQuery.State.Builder<T> whereText(java.lang.String key, java.lang.String value)
-
addCondition
public ParseQuery.State.Builder<T> addCondition(java.lang.String key, java.lang.String condition, java.util.Collection<?> value)
-
addCondition
public ParseQuery.State.Builder<T> addCondition(java.lang.String key, java.lang.String condition, java.lang.Object value)
-
orderByAscending
public ParseQuery.State.Builder<T> orderByAscending(java.lang.String key)
Sorts the results in ascending order by the given key.- Parameters:
key
- The key to order by.- Returns:
- this, so you can chain this call.
-
addAscendingOrder
public ParseQuery.State.Builder<T> addAscendingOrder(java.lang.String key)
Also sorts the results in ascending order by the given key.The previous sort keys have precedence over this key.
- Parameters:
key
- The key to order by- Returns:
- this, so you can chain this call.
-
orderByDescending
public ParseQuery.State.Builder<T> orderByDescending(java.lang.String key)
Sorts the results in descending order by the given key.- Parameters:
key
- The key to order by.- Returns:
- this, so you can chain this call.
-
addDescendingOrder
public ParseQuery.State.Builder<T> addDescendingOrder(java.lang.String key)
Also sorts the results in descending order by the given key.The previous sort keys have precedence over this key.
- Parameters:
key
- The key to order by- Returns:
- this, so you can chain this call.
-
include
public ParseQuery.State.Builder<T> include(java.lang.String key)
Include nestedParseObject
s for the provided key.You can use dot notation to specify which fields in the included object that are also fetched.
- Parameters:
key
- The key that should be included.- Returns:
- this, so you can chain this call.
-
selectKeys
public ParseQuery.State.Builder<T> selectKeys(java.util.Collection<java.lang.String> keys)
Restrict the fields of returnedParseObject
s to only include the provided keys.If this is called multiple times, then all of the keys specified in each of the calls will be included.
Note: This option will be ignored when querying from the local datastore. This is done since all the keys will be in memory anyway and there will be no performance gain from removing them.
- Parameters:
keys
- The set of keys to include in the result.- Returns:
- this, so you can chain this call.
-
getLimit
public int getLimit()
-
setLimit
public ParseQuery.State.Builder<T> setLimit(int limit)
-
getSkip
public int getSkip()
-
setSkip
public ParseQuery.State.Builder<T> setSkip(int skip)
-
setTracingEnabled
public ParseQuery.State.Builder<T> setTracingEnabled(boolean trace)
-
getCachePolicy
public ParseQuery.CachePolicy getCachePolicy()
-
setCachePolicy
public ParseQuery.State.Builder<T> setCachePolicy(ParseQuery.CachePolicy cachePolicy)
-
getMaxCacheAge
public long getMaxCacheAge()
-
setMaxCacheAge
public ParseQuery.State.Builder<T> setMaxCacheAge(long maxCacheAge)
-
isFromNetwork
public boolean isFromNetwork()
-
fromNetwork
public ParseQuery.State.Builder<T> fromNetwork()
-
fromLocalDatastore
public ParseQuery.State.Builder<T> fromLocalDatastore()
-
isFromLocalDatstore
public boolean isFromLocalDatstore()
-
fromPin
public ParseQuery.State.Builder<T> fromPin()
-
fromPin
public ParseQuery.State.Builder<T> fromPin(java.lang.String pinName)
-
ignoreACLs
public ParseQuery.State.Builder<T> ignoreACLs()
-
build
public ParseQuery.State<T> build()
-
-