public class ExpressionTransformationContextSupport<T extends ExpressionNode> extends Object
ExpressionNode transformation.| Constructor and Description |
|---|
ExpressionTransformationContextSupport(T currentNode,
ExpressionNode parentNode,
com.mongodb.DBObject previousOperationObject)
Creates a new
ExpressionTransformationContextSupport for the given ExpressionNodes and an optional
previous operation. |
| Modifier and Type | Method and Description |
|---|---|
com.mongodb.DBObject |
addToPreviousOperation(Object value)
Adds the given value to the previous operation and returns it.
|
Object |
addToPreviousOrReturn(Object value)
Adds the given value to the previous operation if one is present or returns the value to add as is.
|
T |
getCurrentNode()
Returns the current
ExpressionNode. |
ExpressionNode |
getParentNode()
Returns the parent
ExpressionNode or null if none available. |
com.mongodb.DBObject |
getPreviousOperationObject()
Returns the previously accumulated operaton object or null if none available.
|
boolean |
hasPreviousOperation()
Returns whether a previous operation is present.
|
boolean |
parentIsSameOperation()
Returns whether the parent node is of the same operation as the current node.
|
public ExpressionTransformationContextSupport(T currentNode, ExpressionNode parentNode, com.mongodb.DBObject previousOperationObject)
ExpressionTransformationContextSupport for the given ExpressionNodes and an optional
previous operation.currentNode - must not be null.parentNode - previousOperationObject - public T getCurrentNode()
ExpressionNode.public ExpressionNode getParentNode()
ExpressionNode or null if none available.public com.mongodb.DBObject getPreviousOperationObject()
addToPreviousOrReturn(Object) to transparently do if one is
present.hasPreviousOperation(),
addToPreviousOrReturn(Object)public boolean hasPreviousOperation()
public boolean parentIsSameOperation()
public com.mongodb.DBObject addToPreviousOperation(Object value)
value - Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.