Package com.attivio.sdk.search.fields
Class Condition
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.Condition
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class Condition extends FieldExpression
Conditional Expression.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
Fields Modifier and Type Field Description protected FieldExpression
condition
protected FieldExpression
falseValue
The Second argumentprotected FieldExpression
trueValue
The First argument-
Fields inherited from class com.attivio.sdk.search.fields.FieldExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description Condition()
Condition(FieldExpression condition, FieldExpression trueValue, FieldExpression falseValue)
Construct a new Condition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Condition
clone()
boolean
equals(java.lang.Object other)
FieldExpression
forEachField(java.util.function.Function<FieldExpression,FieldExpression> handler)
Applieshandler
for eachFieldExpression
argument.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()
Returnstrue
if this field expression has any sub FieldExpressions.int
hashCode()
boolean
isConstant()
Returnstrue
if this field expression evaluates to a constant value.void
rewrite(QueryHandler handler, boolean recursive)
Rewrite any query objects in this FieldExpression usinghandler
.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(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.static Condition
valueOf(StringParser reader)
-
Methods inherited from class com.attivio.sdk.search.fields.FieldExpression
apply, copyOf, forEachPhrase, forEachQuery, getDefaultName, getFieldName, isConstant, parse, quote, rewrite, rewriteChildren, toString, toString, valueOf
-
-
-
-
Field Detail
-
condition
protected FieldExpression condition
-
trueValue
protected FieldExpression trueValue
The First argument
-
falseValue
protected FieldExpression falseValue
The Second argument
-
-
Constructor Detail
-
Condition
public Condition()
-
Condition
public Condition(FieldExpression condition, FieldExpression trueValue, FieldExpression falseValue)
Construct a new Condition.
-
-
Method Detail
-
isConstant
public boolean isConstant()
Returnstrue
if this field expression evaluates to a constant value.- Specified by:
isConstant
in classFieldExpression
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getType
in classFieldExpression
-
getCondition
public FieldExpression getCondition()
Get the condition expression.
-
setCondition
public void setCondition(FieldExpression value)
Set the condition expression.
-
getTrueValue
public FieldExpression getTrueValue()
Get the true value expression.
-
setTrueValue
public void setTrueValue(FieldExpression value)
Get the true value expression.
-
getFalseValue
public FieldExpression getFalseValue()
Get the false value expression.
-
setFalseValue
public void setFalseValue(FieldExpression value)
Get the true value expression.
-
hasChildren
public boolean hasChildren()
Returnstrue
if this field expression has any sub FieldExpressions.- Specified by:
hasChildren
in classFieldExpression
-
rewrite
public void rewrite(QueryHandler handler, boolean recursive)
Rewrite any query objects in this FieldExpression usinghandler
.- Overrides:
rewrite
in classFieldExpression
-
forEachField
public FieldExpression forEachField(java.util.function.Function<FieldExpression,FieldExpression> handler)
- Overrides:
forEachField
in classFieldExpression
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.- Specified by:
toString
in classFieldExpression
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classFieldExpression
-
clone
public Condition clone()
- Overrides:
clone
in classFieldExpression
-
valueOf
public static Condition valueOf(StringParser reader)
-
-