public abstract class AbstractCriterionBuilder<T extends AbstractCriterionBuilder<T>> extends AbstractCriterion
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<DocumentCriterion> |
criteria |
protected java.util.Stack<java.lang.String> |
propertyStack |
| Constructor and Description |
|---|
AbstractCriterionBuilder() |
| Modifier and Type | Method and Description |
|---|---|
T |
add(DocumentCriterion criterion)
Adds a
Criterion to the query. |
T |
add(java.lang.String property,
Criterion criterion)
Adds a
FieldCriterion to the query using
the given property and criterion. |
void |
clear()
Clears the query.
|
T |
pop()
Pops a property off of the property stack.
|
T |
push(java.lang.String property)
Pushed a property onto the property stack.
|
protected abstract T |
self() |
com.mongodb.DBObject |
toQueryObject(ObjectMapper mapper)
Returns the query representation of the
Criterion. |
protected java.util.Stack<java.lang.String> propertyStack
protected java.util.List<DocumentCriterion> criteria
protected abstract T self()
public void clear()
public T push(java.lang.String property)
AbstractQueryCriterion for chainingpublic T pop()
AbstractQueryCriterion for chainingpublic T add(java.lang.String property, Criterion criterion)
FieldCriterion to the query using
the given property and criterion.property - the property namecriterion - the CriterionAbstractQueryCriterion for chainingpublic T add(DocumentCriterion criterion)
Criterion to the query.criterion - the CriterionAbstractQueryCriterion for chainingpublic com.mongodb.DBObject toQueryObject(ObjectMapper mapper)
Criterion.
Most of the time this will be a DBObject, but
it can be anything accepted by the MongoDB java driver.toQueryObject in interface CriteriontoQueryObject in class AbstractCriterionmapper - the ObjectMapperObjectCopyright © 2013. All Rights Reserved.