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 FieldExpressionconditionprotected FieldExpressionfalseValueThe Second argumentprotected FieldExpressiontrueValueThe 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 Conditionclone()booleanequals(java.lang.Object other)FieldExpressionforEachField(java.util.function.Function<FieldExpression,FieldExpression> handler)Applieshandlerfor eachFieldExpressionargument.FieldExpressiongetCondition()Get the condition expression.FieldExpressiongetFalseValue()Get the false value expression.FieldExpressiongetTrueValue()Get the true value expression.SchemaField.TypegetType(Schema schema)Resolve the type for this expression.booleanhasChildren()Returnstrueif this field expression has any sub FieldExpressions.inthashCode()booleanisConstant()Returnstrueif this field expression evaluates to a constant value.voidrewrite(QueryHandler handler, boolean recursive)Rewrite any query objects in this FieldExpression usinghandler.voidsetCondition(FieldExpression value)Set the condition expression.voidsetFalseValue(FieldExpression value)Get the true value expression.voidsetTrueValue(FieldExpression value)Get the true value expression.protected voidtoString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.static ConditionvalueOf(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()
Returnstrueif this field expression evaluates to a constant value.- Specified by:
isConstantin classFieldExpression
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getTypein 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()
Returnstrueif this field expression has any sub FieldExpressions.- Specified by:
hasChildrenin classFieldExpression
-
rewrite
public void rewrite(QueryHandler handler, boolean recursive)
Rewrite any query objects in this FieldExpression usinghandler.- Overrides:
rewritein classFieldExpression
-
forEachField
public FieldExpression forEachField(java.util.function.Function<FieldExpression,FieldExpression> handler)
- Overrides:
forEachFieldin classFieldExpression
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.- Specified by:
toStringin classFieldExpression
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFieldExpression
-
clone
public Condition clone()
- Overrides:
clonein classFieldExpression
-
valueOf
public static Condition valueOf(StringParser reader)
-
-