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 Constant
dateValue(StringParser parser)
static Constant
decimalValue(StringParser parser)
static Constant
doubleValue(StringParser parser)
boolean
equals(java.lang.Object other)
static Constant
floatValue(StringParser parser)
SchemaField.Type
getType(Schema schema)
Resolve the type for this expression.java.lang.Object
getValue()
Get the value.boolean
hasChildren()
Returnstrue
if this field expression has any sub FieldExpressions.int
hashCode()
static Constant
intValue(StringParser parser)
boolean
isConstant()
Returnstrue
if this field expression evaluates to a constant value.boolean
isNull()
Returnstrue
if this constant is null.static Constant
longValue(StringParser parser)
static Constant
pointValue(StringParser parser)
void
setValue(boolean value)
Set the value.void
setValue(byte[] value)
Set the value.void
setValue(double value)
Set the value.void
setValue(float value)
Set the value.void
setValue(int value)
Set the value.void
setValue(long value)
Set the value.void
setValue(Point value)
Set the value.void
setValue(java.lang.String value)
Set the value.void
setValue(java.math.BigDecimal value)
Set the value.void
setValue(java.util.Date value)
Set the value.static Constant
stringValue(StringParser parser)
protected void
toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.static Constant
valueOf(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()
Returnstrue
if this field expression has any sub FieldExpressions.- Specified by:
hasChildren
in classFieldExpression
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getType
in classFieldExpression
-
isConstant
public boolean isConstant()
Returnstrue
if this field expression evaluates to a constant value.- Specified by:
isConstant
in classFieldExpression
-
isNull
public boolean isNull()
Returnstrue
if 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:
toString
in classFieldExpression
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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)
-
-