org.springframework.data.document.mongodb.repository
Class MongoQueryCreator
java.lang.Object
org.springframework.data.document.mongodb.repository.MongoQueryCreator
class MongoQueryCreator
- extends
Custom query creator to create Mongo criterias.
- Author:
- Oliver Gierke
Field Summary |
private static Log |
LOG
|
Method Summary |
protected Query |
and(Part part,
Query base,
java.util.Iterator<java.lang.Object> iterator)
|
protected Query |
complete(Query query,
Sort sort)
|
protected Query |
create(Part part,
java.util.Iterator<java.lang.Object> iterator)
|
private Criteria |
from(Type type,
Criteria criteria,
java.util.Iterator<java.lang.Object> parameters)
Populates the given CriteriaDefinition depending on the Type given. |
private java.lang.Object[] |
nextAsArray(java.util.Iterator<java.lang.Object> iterator)
|
protected Query |
or(Query base,
Query query)
|
private java.util.regex.Pattern |
toLikeRegex(java.lang.String source)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final Log LOG
MongoQueryCreator
public MongoQueryCreator(PartTree tree,
ParameterAccessor accessor)
- Creates a new
MongoQueryCreator
from the given PartTree
and ParametersParameterAccessor
.
- Parameters:
tree
- accessor
-
create
protected Query create(Part part,
java.util.Iterator<java.lang.Object> iterator)
and
protected Query and(Part part,
Query base,
java.util.Iterator<java.lang.Object> iterator)
or
protected Query or(Query base,
Query query)
complete
protected Query complete(Query query,
Sort sort)
from
private Criteria from(Type type,
Criteria criteria,
java.util.Iterator<java.lang.Object> parameters)
- Populates the given
CriteriaDefinition
depending on the Type
given.
- Parameters:
type
- criteria
- parameters
-
- Returns:
nextAsArray
private java.lang.Object[] nextAsArray(java.util.Iterator<java.lang.Object> iterator)
toLikeRegex
private java.util.regex.Pattern toLikeRegex(java.lang.String source)