@Immutable
public class ConditionalExpression
extends java.lang.Object
MutationCondition
.Modifier and Type | Class and Description |
---|---|
static class |
ConditionalExpression.Operator |
Constructor and Description |
---|
ConditionalExpression(java.lang.String columnName,
boolean booleanValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
byte[] blobValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
java.nio.ByteBuffer blobValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
double doubleValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
float floatValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
int intValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
long bigIntValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
java.lang.String textValue,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0. Use
ConditionBuilder
to build a condition instead |
ConditionalExpression(java.lang.String columnName,
Value<?> value,
ConditionalExpression.Operator operator)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this object.
|
long |
getBigIntValue()
Returns the BIGINT value to compare with the target column.
|
java.nio.ByteBuffer |
getBlobValue()
Returns the BLOB value to compare with the target column as a ByteBuffer type.
|
java.nio.ByteBuffer |
getBlobValueAsByteBuffer()
Returns the BLOB value to compare with the target column as a ByteBuffer type.
|
byte[] |
getBlobValueAsBytes()
Returns the BLOB value to compare with the target column as a byte array type.
|
boolean |
getBooleanValue()
Returns the BOOLEAN value to compare with the target column.
|
Column<?> |
getColumn()
Returns the target column used to compare.
|
java.time.LocalDate |
getDateValue()
Returns the DATE value to compare with the target column.
|
double |
getDoubleValue()
Returns the DOUBLE value to compare with the target column.
|
float |
getFloatValue()
Returns the FLOAT value to compare with the target column.
|
int |
getIntValue()
Returns the INT value to compare with the target column.
|
java.lang.String |
getName()
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
ConditionalExpression.Operator |
getOperator()
Returns the operator used to compare the target column.
|
java.lang.String |
getTextValue()
Returns the TEXT value to compare with the target column.
|
java.time.Instant |
getTimestampTZValue()
Returns the TIMESTAMPTZ value to compare with the target column.
|
java.time.LocalDateTime |
getTimestampValue()
Returns the TIMESTAMP value to compare with the target column.
|
java.time.LocalTime |
getTimeValue()
Returns the TIME value to compare with the target column.
|
Value<?> |
getValue()
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
java.lang.Object |
getValueAsObject()
Returns the value to compare with the target column as an Object type.
|
int |
hashCode() |
java.lang.String |
toString() |
@Deprecated public ConditionalExpression(java.lang.String columnName, Value<?> value, ConditionalExpression.Operator operator)
ConditionalExpression
with the specified column name, value and operator.
A conditional expression will be "<columnName> <operator> <value>
".
Value
's name won't be used to create an expression, so giving anonymous Value
makes more sense and is more readable.
columnName
- a name of target columnvalue
- a value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, boolean booleanValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columnbooleanValue
- a BOOLEAN value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, int intValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columnintValue
- an INT value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, long bigIntValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columnbigIntValue
- a BIGINT value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, float floatValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columnfloatValue
- a FLOAT value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, double doubleValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columndoubleValue
- a DOUBLE value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, java.lang.String textValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columntextValue
- a TEXT value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, byte[] blobValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columnblobValue
- a BLOB value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public ConditionalExpression(java.lang.String columnName, java.nio.ByteBuffer blobValue, ConditionalExpression.Operator operator)
ConditionBuilder
to build a condition insteadConditionalExpression
with the specified column name, value and operator.columnName
- a name of target columnblobValue
- a BLOB value used to compare with the target columnoperator
- an operator used to compare the target column@Deprecated public java.lang.String getName()
@Deprecated public Value<?> getValue()
public Column<?> getColumn()
This method is primarily for internal use. Breaking changes can and will be introduced to this method. Users should not depend on it.
public boolean getBooleanValue()
public int getIntValue()
public long getBigIntValue()
public float getFloatValue()
public double getDoubleValue()
public java.lang.String getTextValue()
public java.nio.ByteBuffer getBlobValue()
public java.nio.ByteBuffer getBlobValueAsByteBuffer()
public byte[] getBlobValueAsBytes()
public java.time.LocalDate getDateValue()
public java.time.LocalTime getTimeValue()
public java.time.LocalDateTime getTimestampValue()
public java.time.Instant getTimestampTZValue()
public java.lang.Object getValueAsObject()
If the columns is a BOOLEAN type, it returns a Boolean
object. If the columns is an
INT type, it returns an Integer
object. If the columns is a BIGINT type, it returns a
LONG
object. If the columns is a FLOAT type, it returns a FLOAT
object. If the
columns is a DOUBLE type, it returns a DOUBLE
object. If the columns is a TEXT type, it
returns a String
object. If the columns is a BLOB type, it returns a ByteBuffer
object.
public ConditionalExpression.Operator getOperator()
public boolean equals(java.lang.Object o)
ConditionalExpression
and
equals
in class java.lang.Object
o
- an object to be tested for equalitytrue
if the other object is "equal to" this object otherwise false
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object