|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stackmob.sdk.api.StackMobQuery
public class StackMobQuery
A class that builds queries to execute on the StackMob platform. Example usage:
//this code:
StackMobQuery query = new StackMobQuery("user").field("age").isGreaterThan(20).isLessThanOrEqualTo(40).field("friend").in(Arrays.asList("joe", "bob", "alice").getQuery();
//is identical to this code:
StackMobQuery query = new StackMobQuery("user").fieldIsGreaterThan("user", 20).fieldIsLessThanOrEqualTo("user", 40).fieldIsIn("user", Arrays.asList("joe", "bob", "alice");
A few helpful notes about this object:
| Nested Class Summary | |
|---|---|
static class |
StackMobQuery.Operator
|
static class |
StackMobQuery.Ordering
|
| Constructor Summary | |
|---|---|
StackMobQuery(String objectName)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StackMobQuery(String objectName)
| Method Detail |
|---|
public static StackMobQuery objects(String objectName)
public String getObjectName()
public Map<String,String> getHeaders()
public Map<String,String> getArguments()
public StackMobQueryWithField field(String field)
public StackMobQuery fieldIsIn(String field,
List<String> values)
field - the field whose value to testvalues - the values against which to match
public StackMobQuery fieldIsLessThan(String field,
String val)
fieldIsLessThan(String, String), except works with Strings
field - the field whose value to testval - the value against which to test
public StackMobQuery fieldIslessThanOrEqualTo(String field,
String val)
fieldIsLessThan(String, String), except applies "<=" instead of "<"
field - the field whose value to testval - the value against which to test
public StackMobQuery fieldIsGreaterThan(String field,
String val)
fieldIsLessThan(String, String), except applies ">" instead of "<"
field - the field whose value to testval - the value against which to test
public StackMobQuery fieldIsGreaterThanOrEqualTo(String field,
String val)
fieldIsLessThan(String, String), except applies ">=" instead of "<"
field - the field whose value to testval - the value against which to test
public StackMobQuery fieldIsEqualTo(String field,
String val)
field - the field whose value to testval - the value against which to test
public StackMobQuery fieldIsOrderedBy(String field,
StackMobQuery.Ordering ordering)
field - the field to order byordering - the ordering of that field
public StackMobQuery expandDepthIs(Integer i)
i - the expand depth. at time of writing, StackMob restricts expand depth to maximum 3
public StackMobQuery isInRange(Integer start,
Integer end)
start - the starting object number (inclusive)end - the ending object number (inclusive)
public StackMobQuery isInRange(Integer start)
isInRange(Integer, Integer), except does not specify an end to the range.
instead, gets all objects from a starting point (including)
start - the starting object number
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||