Package com.attivio.sdk.search.fields
Class Constant
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.Constant
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public final class Constant extends FieldExpression
Constant value FieldExpression.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.fields.FieldExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description Constant()Constant(boolean value)Construct a new Constant.Constant(byte[] value)Constant(double value)Construct a new Constant.Constant(float value)Construct a new Constant.Constant(int value)Construct a new Constant.Constant(long value)Construct a new Constant.Constant(Point value)Construct a new Constant.Constant(java.lang.String value)Construct a new Constant.Constant(java.math.BigDecimal value)Constant(java.util.Date value)Construct a new Constant.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstantdateValue(StringParser parser)static ConstantdecimalValue(StringParser parser)static ConstantdoubleValue(StringParser parser)booleanequals(java.lang.Object other)static ConstantfloatValue(StringParser parser)SchemaField.TypegetType(Schema schema)Resolve the type for this expression.java.lang.ObjectgetValue()Get the value.booleanhasChildren()Returnstrueif this field expression has any sub FieldExpressions.inthashCode()static ConstantintValue(StringParser parser)booleanisConstant()Returnstrueif this field expression evaluates to a constant value.booleanisNull()Returnstrueif this constant is null.static ConstantlongValue(StringParser parser)static ConstantpointValue(StringParser parser)voidsetValue(boolean value)Set the value.voidsetValue(byte[] value)Set the value.voidsetValue(double value)Set the value.voidsetValue(float value)Set the value.voidsetValue(int value)Set the value.voidsetValue(long value)Set the value.voidsetValue(Point value)Set the value.voidsetValue(java.lang.String value)Set the value.voidsetValue(java.math.BigDecimal value)Set the value.voidsetValue(java.util.Date value)Set the value.static ConstantstringValue(StringParser parser)protected voidtoString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.static ConstantvalueOf(java.lang.Object value)-
Methods inherited from class com.attivio.sdk.search.fields.FieldExpression
apply, clone, copyOf, forEachField, forEachPhrase, forEachQuery, getDefaultName, getFieldName, isConstant, parse, quote, rewrite, rewrite, rewriteChildren, toString, toString, valueOf
-
-
-
-
Constructor Detail
-
Constant
public Constant()
-
Constant
public Constant(java.lang.String value)
Construct a new Constant.
-
Constant
public Constant(java.math.BigDecimal value)
-
Constant
public Constant(java.util.Date value)
Construct a new Constant.
-
Constant
public Constant(Point value)
Construct a new Constant.
-
Constant
public Constant(boolean value)
Construct a new Constant.
-
Constant
public Constant(int value)
Construct a new Constant.
-
Constant
public Constant(long value)
Construct a new Constant.
-
Constant
public Constant(float value)
Construct a new Constant.
-
Constant
public Constant(double value)
Construct a new Constant.
-
Constant
public Constant(byte[] value)
-
-
Method Detail
-
hasChildren
public boolean hasChildren()
Returnstrueif this field expression has any sub FieldExpressions.- Specified by:
hasChildrenin classFieldExpression
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getTypein classFieldExpression
-
isConstant
public boolean isConstant()
Returnstrueif this field expression evaluates to a constant value.- Specified by:
isConstantin classFieldExpression
-
isNull
public boolean isNull()
Returnstrueif this constant is null.
-
getValue
public java.lang.Object getValue()
Get the value.
-
setValue
public void setValue(byte[] value)
Set the value.
-
setValue
public void setValue(java.lang.String value)
Set the value.
-
setValue
public void setValue(java.math.BigDecimal value)
Set the value.
-
setValue
public void setValue(java.util.Date value)
Set the value.
-
setValue
public void setValue(Point value)
Set the value.
-
setValue
public void setValue(int value)
Set the value.
-
setValue
public void setValue(long value)
Set the value.
-
setValue
public void setValue(float value)
Set the value.
-
setValue
public void setValue(double value)
Set the value.
-
setValue
public void setValue(boolean value)
Set the value.
-
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 boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFieldExpression
-
valueOf
public static Constant valueOf(java.lang.Object value)
-
dateValue
public static Constant dateValue(StringParser parser)
-
stringValue
public static Constant stringValue(StringParser parser)
-
intValue
public static Constant intValue(StringParser parser)
-
longValue
public static Constant longValue(StringParser parser)
-
floatValue
public static Constant floatValue(StringParser parser)
-
doubleValue
public static Constant doubleValue(StringParser parser)
-
decimalValue
public static Constant decimalValue(StringParser parser)
-
pointValue
public static Constant pointValue(StringParser parser)
-
-