public class Condition extends FieldExpression
FieldExpression.StringMode
Modifier and Type | Field and Description |
---|---|
protected FieldExpression |
condition |
protected FieldExpression |
falseValue
The Second argument
|
protected FieldExpression |
trueValue
The First argument
|
alias, EMPTY_ARRAY
Constructor and Description |
---|
Condition(FieldExpression condition,
FieldExpression trueValue,
FieldExpression falseValue) |
Condition(FieldExpression condition,
FieldExpression trueValue,
FieldExpression falseValue,
String alias)
Construct a new Condition.
|
Condition(String alias)
Construct a new Condition with an
alias . |
Modifier and Type | Method and Description |
---|---|
Condition |
clone() |
boolean |
equalsIgnoreAlias(FieldExpression other)
Returns
true if other is the same as this , with the exception of alias. |
FieldExpression |
getCondition()
Get the condition expression.
|
FieldExpression |
getFalseValue()
Get the false value expression.
|
FieldExpression |
getTrueValue()
Get the true value expression.
|
SchemaField.Type |
getType(Schema schema)
Resolve the type for this expression.
|
boolean |
hasChildren()
Returns
true if this field expression has any sub FieldExpressions. |
int |
hashCode() |
boolean |
isConstant()
Returns
true if this field expression evaluates to a constant value. |
void |
rewrite(QueryHandler handler,
boolean recursive)
Rewrite any query objects in this FieldExpression using
handler . |
FieldExpression |
rewriteChildren(FieldExpressionHandler handler)
Traverse this FieldExpression using
handler to visit/rewrite direct child elements if this expression. |
void |
setCondition(FieldExpression value)
Set the condition expression.
|
void |
setFalseValue(FieldExpression value)
Get the true value expression.
|
void |
setTrueValue(FieldExpression value)
Get the true value expression.
|
protected void |
toString(StringBuilder buffer,
FieldExpression.StringMode mode)
Writes the string representation of this field expression to
buffer . |
as, containsAlias, copyOf, equals, equalsIgnoreAlias, getAlias, getDefaultAlias, getFieldName, handleFieldExpression, isConstant, quote, rewrite, setAlias, toString, toString
protected FieldExpression condition
protected FieldExpression trueValue
protected FieldExpression falseValue
public Condition(String alias)
alias
.public Condition(FieldExpression condition, FieldExpression trueValue, FieldExpression falseValue)
public Condition(FieldExpression condition, FieldExpression trueValue, FieldExpression falseValue, String alias)
public boolean isConstant()
true
if this field expression evaluates to a constant value.isConstant
in class FieldExpression
public SchemaField.Type getType(Schema schema)
getType
in class FieldExpression
public FieldExpression getCondition()
public void setCondition(FieldExpression value)
public FieldExpression getTrueValue()
public void setTrueValue(FieldExpression value)
public FieldExpression getFalseValue()
public void setFalseValue(FieldExpression value)
public boolean hasChildren()
true
if this field expression has any sub FieldExpressions.hasChildren
in class FieldExpression
public void rewrite(QueryHandler handler, boolean recursive)
handler
.rewrite
in class FieldExpression
public FieldExpression rewriteChildren(FieldExpressionHandler handler)
handler
to visit/rewrite direct child elements if this expression.
NOTE: this method traverses direct child expressions (if any) only.
rewriteChildren
in class FieldExpression
protected void toString(StringBuilder buffer, FieldExpression.StringMode mode)
buffer
.
NOTE: the alias will not be written to buffer by this function.
toString
in class FieldExpression
public final boolean equalsIgnoreAlias(FieldExpression other)
true
if other
is the same as this
, with the exception of alias.equalsIgnoreAlias
in class FieldExpression
public int hashCode()
hashCode
in class FieldExpression
public Condition clone()
clone
in class FieldExpression
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.