|
||||||||||
| 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
|
| Constructor Summary | |
|---|---|
StackMobQuery(String objectName)
|
|
| Method Summary | |
|---|---|
StackMobQuery |
expandDepthIs(Integer i)
set the expand depth of this query. |
StackMobQueryWithField |
field(String field)
|
StackMobQuery |
fieldIsEqualTo(String field,
String val)
add an "=" to your query. |
StackMobQuery |
fieldIsGreaterThan(String field,
String val)
same as fieldIsLessThan(String, String), except applies ">" instead of "<" |
StackMobQuery |
fieldIsGreaterThanOrEqualTo(String field,
String val)
same as fieldIsLessThan(String, String), except applies ">=" instead of "<" |
StackMobQuery |
fieldIsIn(String field,
List<String> values)
add an "IN" to your query. |
StackMobQuery |
fieldIsLessThan(String field,
String val)
same as fieldIsLessThan(String, String), except works with Strings |
StackMobQuery |
fieldIslessThanOrEqualTo(String field,
String val)
same as fieldIsLessThan(String, String), except applies "<=" instead of "<" |
Map<String,String> |
getArguments()
|
String |
getObjectName()
|
| 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 String getObjectName()
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 expandDepthIs(Integer i)
i - the expand depth. at time of writing, StackMob restricts expand depth to maximum 3
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||