public class QueryVersionVisitor extends VisitorAdapter
Constructor and Description |
---|
QueryVersionVisitor()
Creates a new QueryVersionVisitor.
|
Modifier and Type | Method and Description |
---|---|
Version |
getMaximumServerVersion()
Returns the version of the server that removed the ability to process the
visited query.
|
Version |
getRequiredServerVersion()
Returns the required server version to support the visited query.
|
static VersionRange |
version(Document query)
Helper to returns the required server version to support the query
operators.
|
protected void |
visitName(String name)
Overridden to determine the version of the server required based on the
query operators.
|
visit, visitArray, visitBinary, visitBoolean, visitDBPointer, visitDocument, visitDouble, visitInteger, visitJavaScript, visitJavaScript, visitLong, visitMaxKey, visitMinKey, visitMongoTimestamp, visitNull, visitObjectId, visitRegularExpression, visitString, visitSymbol, visitTimestamp
public QueryVersionVisitor()
public static VersionRange version(Document query)
query
- The query to inspect.null
.public Version getMaximumServerVersion()
public Version getRequiredServerVersion()
protected void visitName(String name)
Overridden to determine the version of the server required based on the query operators.
Extension point forVisitor
implementation only interested in the
name of the elements.visitName
in class VisitorAdapter
name
- The name of the element.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.