public interface FilterParams
| Modifier and Type | Interface and Description |
|---|---|
static class |
FilterParams.RowLock
The type of row lock.
|
static class |
FilterParams.RowLockOptions
Options that define the behavior while retrieving locked rows.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArg(java.lang.String name,
java.lang.Object value)
Set binding.
|
void |
clearArgs()
Remove all current bindings.
|
java.lang.Object |
getArgs()
Get binding arguments.
|
java.lang.Object |
getCollection()
Get X Protocol Collection object.
|
java.lang.Object |
getCriteria()
Get the search criteria.
|
java.lang.Object |
getFields()
Get X Protocol Projection objects.
|
java.lang.Object |
getGrouping()
Get X Protocol Expr objects for groupBy.
|
java.lang.Object |
getGroupingCriteria()
Get X Protocol Expr objects for grouping criteria.
|
java.lang.Long |
getLimit()
Get max number of rows to filter.
|
FilterParams.RowLock |
getLock()
Get
FilterParams.RowLock value. |
FilterParams.RowLockOptions |
getLockOption()
Get
FilterParams.RowLockOptions value. |
java.lang.Long |
getOffset()
Get number of rows to skip before finding others.
|
java.lang.Object |
getOrder()
Get X Protocol Order objects.
|
boolean |
isRelational()
Are relational columns identifiers allowed?
|
void |
setCriteria(java.lang.String criteriaString)
Parse criteriaString into X Protocol Expr object.
|
void |
setFields(java.lang.String... projection)
Parse projection expressions into X Protocol Projection objects.
|
void |
setGrouping(java.lang.String... groupBy)
Parse groupBy expressions into X Protocol Expr objects.
|
void |
setGroupingCriteria(java.lang.String having)
Parse having expressions into X Protocol Expr objects.
|
void |
setLimit(java.lang.Long limit)
Set maximum rows to find.
|
void |
setLock(FilterParams.RowLock rowLock)
Set
FilterParams.RowLock value. |
void |
setLockOption(FilterParams.RowLockOptions rowLockOption)
Set
FilterParams.RowLockOptions value. |
void |
setOffset(java.lang.Long offset)
Set number of rows to skip before finding others.
|
void |
setOrder(java.lang.String... orderExpression)
Parse order expressions into X Protocol Order objects.
|
boolean |
supportsOffset()
Whether offset clause is supported in the statement or not.
|
void |
verifyAllArgsBound()
Verify that all arguments are bound.
|
java.lang.Object getCollection()
java.lang.Object getOrder()
void setOrder(java.lang.String... orderExpression)
DocResult docs = this.collection.find().orderBy("$._id").execute();
docs = this.collection.find().sort("$.x", "$.y").execute();
orderExpression - order expressionsjava.lang.Long getLimit()
void setLimit(java.lang.Long limit)
For example, to find the 3 first rows:
docs = this.collection.find().orderBy("$._id").limit(3).execute();
limit - maximum rows to findjava.lang.Long getOffset()
void setOffset(java.lang.Long offset)
For example, to skip 1 row and find other 3 rows:
docs = this.collection.find().orderBy("$._id").limit(3).skip(1).execute();
offset - maximum rows to skipboolean supportsOffset()
Note that setting offset values is always possible, even if they are not supported.
true if offset clause is supportedjava.lang.Object getCriteria()
void setCriteria(java.lang.String criteriaString)
docs = this.collection.find("$.x1 = 29 | 15").execute();
table.delete().where("age == 13").execute();
criteriaString - expressionjava.lang.Object getArgs()
void addArg(java.lang.String name,
java.lang.Object value)
this.collection.find("a = :arg1 or b = :arg2").bind("arg1", 1).bind("arg2", 2).execute();
name - bind keyvalue - bind valuevoid verifyAllArgsBound()
WrongArgumentException if any placeholder argument is not bound.void clearArgs()
boolean isRelational()
void setFields(java.lang.String... projection)
collection.find().fields("CAST($.x as SIGNED) as x").execute();
table.select("_id, name, birthday, age").execute();
table.select("age as age_group, count(name) as cnt, something").execute();
projection - projection expressionjava.lang.Object getFields()
void setGrouping(java.lang.String... groupBy)
SelectStatement stmt = table.select("age as age_group, count(name) as cnt, something");
stmt.groupBy("something", "age_group");
groupBy - groupBy expressionjava.lang.Object getGrouping()
void setGroupingCriteria(java.lang.String having)
SelectStatement stmt = table.select("age as age_group, count(name) as cnt, something");
stmt.groupBy("something", "age_group");
stmt.having("cnt > 1");
having - having expressionjava.lang.Object getGroupingCriteria()
FilterParams.RowLock getLock()
FilterParams.RowLock value.FilterParams.RowLockvoid setLock(FilterParams.RowLock rowLock)
FilterParams.RowLock value.rowLock - FilterParams.RowLockFilterParams.RowLockOptions getLockOption()
FilterParams.RowLockOptions value.FilterParams.RowLockOptionsvoid setLockOption(FilterParams.RowLockOptions rowLockOption)
FilterParams.RowLockOptions value.rowLockOption - FilterParams.RowLockOptions