public final class MobileServiceQuery<E> extends Object
Constructor and Description |
---|
MobileServiceQuery()
Creates an empty MobileServiceQuery
|
Modifier and Type | Method and Description |
---|---|
MobileServiceQuery<E> |
add()
Add operator.
|
MobileServiceQuery<E> |
add(MobileServiceQuery<?> otherQuery)
Add operator.
|
MobileServiceQuery<E> |
add(Number val)
Add operator.
|
MobileServiceQuery<E> |
and()
Conditional and.
|
MobileServiceQuery<E> |
and(MobileServiceQuery<?> otherQuery)
Conditional and.
|
MobileServiceQuery<E> |
ceiling(MobileServiceQuery<?> otherQuery)
The smallest integral value greater than or equal to the parameter value.
|
MobileServiceQuery<E> |
concat(MobileServiceQuery<?> str1,
MobileServiceQuery<?> str2)
String value which is the first and second parameter values merged
together with the first parameter value coming first in the result.
|
MobileServiceQuery<E> |
day(MobileServiceQuery<?> otherQuery)
The day component value of the parameter value.
|
MobileServiceQuery<E> |
day(String field)
The day component value of the parameter value.
|
MobileServiceQuery<E> |
div()
Divide operator.
|
MobileServiceQuery<E> |
div(MobileServiceQuery<?> otherQuery)
Divide operator.
|
MobileServiceQuery<E> |
div(Number val)
Divide operator.
|
MobileServiceQuery<E> |
endsWith(MobileServiceQuery<?> field,
MobileServiceQuery<?> end)
Whether the end of the first parameter value matches the second parameter
value.
|
MobileServiceQuery<E> |
endsWith(String field,
String end)
Whether the end of the first parameter value matches the second parameter
value.
|
MobileServiceQuery<E> |
eq()
Equal comparison operator.
|
MobileServiceQuery<E> |
eq(boolean booleanValue)
Equal comparison operator.
|
MobileServiceQuery<E> |
eq(Date dateValue)
Equal comparison operator.
|
MobileServiceQuery<E> |
eq(MobileServiceQuery<?> otherQuery)
Equal comparison operator.
|
MobileServiceQuery<E> |
eq(Number numberValue)
Equal comparison operator.
|
MobileServiceQuery<E> |
eq(String stringValue)
Equal comparison operator.
|
void |
execute(E callback)
Executes the query
|
MobileServiceQuery<E> |
field(String fieldName)
Specifies the field to use
|
MobileServiceQuery<E> |
floor(MobileServiceQuery<?> otherQuery)
The largest integral value less than or equal to the parameter value.
|
MobileServiceQuery<E> |
ge()
Greater than or equal comparison operator.
|
MobileServiceQuery<E> |
ge(Date dateValue)
Greater than or equal comparison operator.
|
MobileServiceQuery<E> |
ge(MobileServiceQuery<?> otherQuery)
Greater than or equal comparison operator.
|
MobileServiceQuery<E> |
ge(Number numberValue)
Greater than or equal comparison operator.
|
String |
getQueryText()
Returns the main text of the query
|
String |
getRowSetModifiers()
Returns the string representation of the rowset's modifiers
|
MobileServiceQuery<E> |
gt()
Greater than comparison operator.
|
MobileServiceQuery<E> |
gt(Date dateValue)
Greater than comparison operator.
|
MobileServiceQuery<E> |
gt(MobileServiceQuery<?> otherQuery)
Greater than comparison operator.
|
MobileServiceQuery<E> |
gt(Number numberValue)
Greater than comparison operator.
|
MobileServiceQuery<E> |
hour(MobileServiceQuery<?> otherQuery)
The hour component value of the parameter value.
|
MobileServiceQuery<E> |
hour(String field)
The hour component value of the parameter value.
|
MobileServiceQuery<E> |
includeInlineCount()
The inlinecount property specifies whether or not to retrieve a property
with the number of records returned.
|
MobileServiceQuery<E> |
indexOf(MobileServiceQuery<?> haystack,
MobileServiceQuery<?> needle)
Index of the first occurrence of the second parameter value in the first
parameter value or -1 otherwise.
|
MobileServiceQuery<E> |
indexOf(String field,
String needle)
Index of the first occurrence of the second parameter value in the first
parameter value or -1 otherwise.
|
MobileServiceQuery<E> |
le()
Less than or equal comparison operator.
|
MobileServiceQuery<E> |
le(Date dateValue)
Less than or equal comparison operator.
|
MobileServiceQuery<E> |
le(MobileServiceQuery<?> otherQuery)
Less than or equal comparison operator.
|
MobileServiceQuery<E> |
le(Number numberValue)
Less than or equal comparison operator.
|
MobileServiceQuery<E> |
length(MobileServiceQuery<?> exp)
The number of characters in the specified parameter value.
|
MobileServiceQuery<E> |
length(String field)
The number of characters in the specified parameter value.
|
MobileServiceQuery<E> |
lt()
Less than comparison operator.
|
MobileServiceQuery<E> |
lt(Date dateValue)
Less than comparison operator.
|
MobileServiceQuery<E> |
lt(MobileServiceQuery<?> otherQuery)
Less than comparison operator.
|
MobileServiceQuery<E> |
lt(Number numberValue)
Less than comparison operator.
|
MobileServiceQuery<E> |
minute(MobileServiceQuery<?> otherQuery)
The minute component value of the parameter value.
|
MobileServiceQuery<E> |
minute(String field)
The minute component value of the parameter value.
|
MobileServiceQuery<E> |
mod()
Reminder (or modulo) operator.
|
MobileServiceQuery<E> |
mod(MobileServiceQuery<?> otherQuery)
Reminder (or modulo) operator.
|
MobileServiceQuery<E> |
mod(Number val)
Reminder (or modulo) operator.
|
MobileServiceQuery<E> |
month(MobileServiceQuery<?> otherQuery)
The month component value of the parameter value.
|
MobileServiceQuery<E> |
month(String field)
The month component value of the parameter value.
|
MobileServiceQuery<E> |
mul()
Multiply operator.
|
MobileServiceQuery<E> |
mul(MobileServiceQuery<?> otherQuery)
Multiply operator.
|
MobileServiceQuery<E> |
mul(Number val)
Multiply operator.
|
MobileServiceQuery<E> |
ne()
Not equal comparison operator.
|
MobileServiceQuery<E> |
ne(boolean booleanValue)
Not equal comparison operator.
|
MobileServiceQuery<E> |
ne(Date dateValue)
Not equal comparison operator.
|
MobileServiceQuery<E> |
ne(MobileServiceQuery<?> otherQuery)
Not equal comparison operator.
|
MobileServiceQuery<E> |
ne(Number numberValue)
Not equal comparison operator.
|
MobileServiceQuery<E> |
ne(String stringValue)
Not equal comparison operator.
|
MobileServiceQuery<E> |
not()
Logical not.
|
MobileServiceQuery<E> |
not(boolean booleanValue)
Logical not.
|
MobileServiceQuery<E> |
not(MobileServiceQuery<?> otherQuery)
Logical not.
|
MobileServiceQuery<E> |
or()
Conditional or.
|
MobileServiceQuery<E> |
or(MobileServiceQuery<?> otherQuery)
Conditional or.
|
MobileServiceQuery<E> |
orderBy(String field,
QueryOrder order)
Adds a new order by statement
|
MobileServiceQuery<E> |
parameter(String parameter,
String value)
Adds a new user-defined parameter to the query
|
MobileServiceQuery<E> |
replace(MobileServiceQuery<?> str,
MobileServiceQuery<?> find,
MobileServiceQuery<?> replace)
Finds the second string parameter in the first parameter string value and
replaces it with the third parameter value.
|
MobileServiceQuery<E> |
replace(String field,
String find,
String replace)
Finds the second string parameter in the first parameter string value and
replaces it with the third parameter value.
|
MobileServiceQuery<E> |
round(MobileServiceQuery<?> otherQuery)
The nearest integral value to the parameter value.
|
MobileServiceQuery<E> |
second(MobileServiceQuery<?> otherQuery)
The second component value of the parameter value.
|
MobileServiceQuery<E> |
second(String field)
The second component value of the parameter value.
|
MobileServiceQuery<E> |
select(String... fields)
Specifies the fields to retrieve
|
void |
setQueryText(String queryText)
Sets the main text of the query
|
MobileServiceQuery<E> |
skip(int skip)
Sets the number of records to skip over a given number of elements in a
sequence and then return the remainder.
|
MobileServiceQuery<E> |
startsWith(MobileServiceQuery<?> field,
MobileServiceQuery<?> start)
Whether the beginning of the first parameter values matches the second
parameter value.
|
MobileServiceQuery<E> |
startsWith(String field,
String start)
Whether the beginning of the first parameter values matches the second
parameter value.
|
MobileServiceQuery<E> |
sub()
Subtract operator.
|
MobileServiceQuery<E> |
sub(MobileServiceQuery<?> otherQuery)
Subtract operator.
|
MobileServiceQuery<E> |
sub(Number val)
Subtract operator.
|
MobileServiceQuery<E> |
subString(MobileServiceQuery<?> str,
MobileServiceQuery<?> pos)
String value starting at the character index specified by the second
parameter value in the first parameter string value.
|
MobileServiceQuery<E> |
subString(MobileServiceQuery<?> str,
MobileServiceQuery<?> pos,
MobileServiceQuery<?> length)
String value starting at the character index specified by the second
parameter value in the first parameter string value.
|
MobileServiceQuery<E> |
subString(String field,
int pos)
String value starting at the character index specified by the second
parameter value in the first parameter string value.
|
MobileServiceQuery<E> |
subString(String field,
int pos,
int length)
String value starting at the character index specified by the second
parameter value in the first parameter string value.
|
MobileServiceQuery<E> |
subStringOf(MobileServiceQuery<?> str1,
MobileServiceQuery<?> str2)
Whether the first parameter string value occurs in the second parameter
string value.
|
MobileServiceQuery<E> |
subStringOf(String str,
String field)
Whether the string parameter occurs in the field
|
MobileServiceQuery<E> |
toLower(MobileServiceQuery<?> exp)
String value with the contents of the parameter value converted to lower
case.
|
MobileServiceQuery<E> |
toLower(String field)
String value with the contents of the parameter value converted to lower
case.
|
MobileServiceQuery<E> |
top(int top)
Sets the number of records to return
|
String |
toString()
Returns the string representation of the query
|
MobileServiceQuery<E> |
toUpper(MobileServiceQuery<?> exp)
String value with the contents of the parameter value converted to upper
case.
|
MobileServiceQuery<E> |
toUpper(String field)
String value with the contents of the parameter value converted to upper
case.
|
MobileServiceQuery<E> |
trim(MobileServiceQuery<?> exp)
String value with the contents of the parameter value with all leading
and trailing white-space characters removed.
|
MobileServiceQuery<E> |
trim(String field)
String value with the contents of the parameter value with all leading
and trailing white-space characters removed.
|
MobileServiceQuery<E> |
val(boolean val)
Specifies a boolean value
|
MobileServiceQuery<E> |
val(Date date)
Specifies a date value
|
MobileServiceQuery<E> |
val(Number number)
Specifies a numeric value
|
MobileServiceQuery<E> |
val(String s)
Specifies a string value
|
MobileServiceQuery<E> |
year(MobileServiceQuery<?> otherQuery)
The year component value of the parameter value.
|
MobileServiceQuery<E> |
year(String field)
The year component value of the parameter value.
|
public MobileServiceQuery()
public String getQueryText()
public void setQueryText(String queryText)
queryText
- The text to setpublic String toString()
public String getRowSetModifiers() throws UnsupportedEncodingException
UnsupportedEncodingException
public void execute(E callback)
callback
- Callback to invoke when the operation is completedpublic MobileServiceQuery<E> parameter(String parameter, String value)
parameter
- The parameter namevalue
- The parameter valuepublic MobileServiceQuery<E> orderBy(String field, QueryOrder order)
field
- FieldNameorder
- Sorting orderpublic MobileServiceQuery<E> top(int top)
top
- Number of records to returnpublic MobileServiceQuery<E> skip(int skip)
skip
- public MobileServiceQuery<E> includeInlineCount()
public MobileServiceQuery<E> select(String... fields)
fields
- Names of the fields to retrievepublic MobileServiceQuery<E> field(String fieldName)
fieldName
- The field to usepublic MobileServiceQuery<E> val(Number number)
number
- The numeric value to usepublic MobileServiceQuery<E> val(boolean val)
number
- The boolean value to usepublic MobileServiceQuery<E> val(String s)
number
- The string value to usepublic MobileServiceQuery<E> val(Date date)
number
- The date value to usepublic MobileServiceQuery<E> and()
public MobileServiceQuery<E> and(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> or()
public MobileServiceQuery<E> or(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> not()
public MobileServiceQuery<E> not(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> not(boolean booleanValue)
booleanValue
- public MobileServiceQuery<E> ge()
public MobileServiceQuery<E> ge(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> ge(Number numberValue)
numberValue
- public MobileServiceQuery<E> ge(Date dateValue)
dateValue
- public MobileServiceQuery<E> le()
public MobileServiceQuery<E> le(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> le(Number numberValue)
numberValue
- public MobileServiceQuery<E> le(Date dateValue)
dateValue
- public MobileServiceQuery<E> gt()
public MobileServiceQuery<E> gt(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> gt(Number numberValue)
numberValue
- public MobileServiceQuery<E> gt(Date dateValue)
dateValue
- public MobileServiceQuery<E> lt()
public MobileServiceQuery<E> lt(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> lt(Number numberValue)
numberValue
- public MobileServiceQuery<E> lt(Date dateValue)
dateValue
- public MobileServiceQuery<E> eq()
public MobileServiceQuery<E> eq(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> eq(Number numberValue)
numberValue
- public MobileServiceQuery<E> eq(boolean booleanValue)
booleanValue
- public MobileServiceQuery<E> eq(String stringValue)
stringValue
- public MobileServiceQuery<E> eq(Date dateValue)
dateValue
- public MobileServiceQuery<E> ne()
public MobileServiceQuery<E> ne(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> ne(Number numberValue)
numberValue
- public MobileServiceQuery<E> ne(boolean booleanValue)
booleanValue
- public MobileServiceQuery<E> ne(String stringValue)
stringValue
- public MobileServiceQuery<E> ne(Date dateValue)
dateValue
- public MobileServiceQuery<E> add()
public MobileServiceQuery<E> add(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> add(Number val)
val
- public MobileServiceQuery<E> sub()
public MobileServiceQuery<E> sub(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> sub(Number val)
val
- public MobileServiceQuery<E> mul()
public MobileServiceQuery<E> mul(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> mul(Number val)
otherQuery
- public MobileServiceQuery<E> div()
public MobileServiceQuery<E> div(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> div(Number val)
val
- public MobileServiceQuery<E> mod()
public MobileServiceQuery<E> mod(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> mod(Number val)
val
- public MobileServiceQuery<E> year(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> year(String field)
field
- public MobileServiceQuery<E> month(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> month(String field)
field
- public MobileServiceQuery<E> day(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> day(String field)
field
- public MobileServiceQuery<E> hour(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> hour(String field)
field
- public MobileServiceQuery<E> minute(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> minute(String field)
field
- public MobileServiceQuery<E> second(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> second(String field)
field
- public MobileServiceQuery<E> floor(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> ceiling(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> round(MobileServiceQuery<?> otherQuery)
otherQuery
- public MobileServiceQuery<E> toLower(MobileServiceQuery<?> exp)
exp
- public MobileServiceQuery<E> toLower(String field)
field
- public MobileServiceQuery<E> toUpper(MobileServiceQuery<?> exp)
exp
- public MobileServiceQuery<E> toUpper(String field)
field
- public MobileServiceQuery<E> length(MobileServiceQuery<?> exp)
exp
- public MobileServiceQuery<E> length(String field)
field
- public MobileServiceQuery<E> trim(MobileServiceQuery<?> exp)
exp
- public MobileServiceQuery<E> trim(String field)
field
- public MobileServiceQuery<E> startsWith(MobileServiceQuery<?> field, MobileServiceQuery<?> start)
field
- The field to evaluatestart
- Start valuepublic MobileServiceQuery<E> startsWith(String field, String start)
field
- The field to evaluatestart
- Start valuepublic MobileServiceQuery<E> endsWith(MobileServiceQuery<?> field, MobileServiceQuery<?> end)
field
- The field to evaluateend
- End valuepublic MobileServiceQuery<E> endsWith(String field, String end)
field
- The field to evaluateend
- End valuepublic MobileServiceQuery<E> subStringOf(MobileServiceQuery<?> str1, MobileServiceQuery<?> str2)
str1
- First stringstr2
- Second stringpublic MobileServiceQuery<E> subStringOf(String str, String field)
str2
- String to searchfield
- Field to search inpublic MobileServiceQuery<E> concat(MobileServiceQuery<?> str1, MobileServiceQuery<?> str2)
str1
- First stringstr2
- Second stringpublic MobileServiceQuery<E> indexOf(MobileServiceQuery<?> haystack, MobileServiceQuery<?> needle)
haystack
- String contentneedle
- Value to search forpublic MobileServiceQuery<E> indexOf(String field, String needle)
field
- Field to search instr
- Value to search forpublic MobileServiceQuery<E> subString(MobileServiceQuery<?> str, MobileServiceQuery<?> pos)
str
- String contentpos
- Starting positionpublic MobileServiceQuery<E> subString(String field, int pos)
field
- Field to scanpos
- Starting positionpublic MobileServiceQuery<E> subString(MobileServiceQuery<?> str, MobileServiceQuery<?> pos, MobileServiceQuery<?> length)
str
- String contentpos
- Starting positionlength
- Lengthpublic MobileServiceQuery<E> subString(String field, int pos, int length)
field
- Field to scanpos
- Starting positionlength
- Lengthpublic MobileServiceQuery<E> replace(MobileServiceQuery<?> str, MobileServiceQuery<?> find, MobileServiceQuery<?> replace)
str
- String contentfind
- Search valuereplace
- Replace valuepublic MobileServiceQuery<E> replace(String field, String find, String replace)
field
- Field to scanfind
- Search valuereplace
- Replace value