public abstract class MongoDBAbstractQueryBuilder extends Object
Expression
.
Must be customized by defining an implementation for the walkReference(String)
method.
Modifier and Type | Class and Description |
---|---|
static class |
MongoDBAbstractQueryBuilder.FieldInfo |
Modifier and Type | Field and Description |
---|---|
protected MongoDBConverter |
converter |
protected static String |
DATE_CAST |
protected String |
elemMatchPrefix
Prefix to remove for $elemMatch (including final dot), or
null if there's no current prefix to remove. |
protected Expression |
expression |
protected static String |
LIKE_ANCHORED_PROP |
protected boolean |
likeAnchored |
static Long |
LONG_ONE |
static Long |
LONG_ZERO |
static Double |
MINUS_ONE |
static Double |
ONE |
protected org.bson.Document |
query |
protected static Pattern |
SLASH_WILDCARD_SLASH |
Constructor and Description |
---|
MongoDBAbstractQueryBuilder(MongoDBConverter converter,
Expression expression) |
protected static final String DATE_CAST
protected static final String LIKE_ANCHORED_PROP
protected final MongoDBConverter converter
protected final Expression expression
protected org.bson.Document query
protected String elemMatchPrefix
null
if there's no current prefix to remove.protected boolean likeAnchored
protected static final Pattern SLASH_WILDCARD_SLASH
public MongoDBAbstractQueryBuilder(MongoDBConverter converter, Expression expression)
public void walk()
public org.bson.Document getQuery()
public org.bson.Document walkExpression(Expression expr)
protected void checkDateLiteralForCast(Operator op, Operand value, String name)
protected void checkDateLiteralForCast(Operand value, String name)
protected Object pushDownNot(Object object)
protected org.bson.Document newDocumentWithField(MongoDBAbstractQueryBuilder.FieldInfo fieldInfo, Object value)
public org.bson.Document walkIsNull(Operand value)
public org.bson.Document walkIsNotNull(Operand value)
public org.bson.Document walkAndOrMultiExpression(MultiExpression expr)
public org.bson.Document walkAndOr(Expression expr)
protected org.bson.Document walkAndOr(Expression expr, List<? extends Operand> values)
protected String stripElemMatchPrefix(String field)
protected Object checkBoolean(MongoDBAbstractQueryBuilder.FieldInfo fieldInfo, Object right)
public org.bson.Document walkBetween(Operand lvalue, Operand rvalue, boolean positive)
public org.bson.Document walkLike(Operand lvalue, Operand rvalue, boolean positive, boolean caseInsensitive)
public Object walkOperand(Operand op)
public Object walkLiteral(Literal lit)
public Object walkBooleanLiteral(BooleanLiteral lit)
public Date walkDateLiteral(DateLiteral lit)
public Double walkDoubleLiteral(DoubleLiteral lit)
public Long walkIntegerLiteral(IntegerLiteral lit)
public String walkStringLiteral(StringLiteral lit)
public List<Object> walkLiteralList(LiteralList litList)
protected List<Object> walkOperandList(List<? extends Operand> values)
public Object walkFunction(Function func)
protected MongoDBAbstractQueryBuilder.FieldInfo walkReference(Operand value)
public MongoDBAbstractQueryBuilder.FieldInfo walkReference(Reference ref)
protected abstract MongoDBAbstractQueryBuilder.FieldInfo walkReference(String name)
Copyright © 2019 Nuxeo. All rights reserved.