Package com.clickhouse.client.data
Class ClickHouseUuidValue
- java.lang.Object
-
- com.clickhouse.client.data.ClickHouseObjectValue<UUID>
-
- com.clickhouse.client.data.ClickHouseUuidValue
-
- All Implemented Interfaces:
ClickHouseValue
,Serializable
public class ClickHouseUuidValue extends ClickHouseObjectValue<UUID>
Wraper class of string.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClickHouseUuidValue(UUID value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimal
asBigDecimal(int scale)
Gets value asBigDecimal
.BigInteger
asBigInteger()
Gets value asBigInteger
.byte
asByte()
Gets value as byte.double
asDouble()
Gets value as double.float
asFloat()
Gets value as float.int
asInteger()
Gets value as integer.long
asLong()
Gets value as long.Object
asObject()
Gets value as an object.short
asShort()
Gets value as short.UUID
asUuid()
Gets value as UUID.ClickHouseUuidValue
copy(boolean deep)
Gets a copy of this value object.static ClickHouseUuidValue
of(ClickHouseValue ref, UUID value)
Update value of the given object or create a new instance ifref
is null.static ClickHouseUuidValue
of(UUID value)
Wrap the given value.static ClickHouseUuidValue
ofNull()
Create a new instance representing null value.static ClickHouseUuidValue
ofNull(ClickHouseValue ref)
Update given value to null or create a new instance ifref
is null.String
toSqlExpression()
Converts the value to escaped SQL expression.ClickHouseUuidValue
update(byte value)
Updates value.ClickHouseUuidValue
update(double value)
Updates value.ClickHouseUuidValue
update(float value)
Updates value.ClickHouseUuidValue
update(int value)
Updates value.ClickHouseUuidValue
update(long value)
Updates value.ClickHouseUuidValue
update(short value)
Updates value.ClickHouseUuidValue
update(ClickHouseValue value)
Updates value.ClickHouseUuidValue
update(Enum<?> value)
Updates value.ClickHouseUuidValue
update(Object value)
Updates value.ClickHouseUuidValue
update(String value)
Updates value.ClickHouseUuidValue
update(BigDecimal value)
Updates value.ClickHouseUuidValue
update(BigInteger value)
Updates value.ClickHouseUuidValue
update(Inet4Address value)
Updates value.ClickHouseUuidValue
update(Inet6Address value)
Updates value.ClickHouseUuidValue
update(LocalDate value)
Updates value.ClickHouseUuidValue
update(LocalDateTime value)
Updates value.ClickHouseUuidValue
update(LocalTime value)
Updates value.ClickHouseUuidValue
update(UUID value)
Updates value.-
Methods inherited from class com.clickhouse.client.data.ClickHouseObjectValue
asString, equals, getValue, hashCode, isNullOrEmpty, resetToNullOrEmpty, set, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.clickhouse.client.ClickHouseValue
asArray, asArray, asBigDecimal, asBinary, asBinary, asBinary, asBinary, asBoolean, asByteStream, asCharacter, asCharacterStream, asDate, asDateTime, asDateTime, asEnum, asInet4Address, asInet6Address, asInstant, asInstant, asMap, asMap, asObject, asOffsetDateTime, asOffsetDateTime, asString, asString, asString, asTime, asTime, asTuple, asZonedDateTime, asZonedDateTime, copy, isInfinity, isNaN, newUnsupportedException, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, updateUnknown
-
-
-
-
Constructor Detail
-
ClickHouseUuidValue
protected ClickHouseUuidValue(UUID value)
-
-
Method Detail
-
ofNull
public static ClickHouseUuidValue ofNull()
Create a new instance representing null value.- Returns:
- new instance representing null value
-
ofNull
public static ClickHouseUuidValue ofNull(ClickHouseValue ref)
Update given value to null or create a new instance ifref
is null.- Parameters:
ref
- object to update, could be null- Returns:
- same object as
ref
or a new instance if it's null
-
of
public static ClickHouseUuidValue of(UUID value)
Wrap the given value.- Parameters:
value
- value- Returns:
- object representing the value
-
of
public static ClickHouseUuidValue of(ClickHouseValue ref, UUID value)
Update value of the given object or create a new instance ifref
is null.- Parameters:
ref
- object to update, could be nullvalue
- value- Returns:
- same object as
ref
or a new instance if it's null
-
copy
public ClickHouseUuidValue copy(boolean deep)
Description copied from interface:ClickHouseValue
Gets a copy of this value object.- Parameters:
deep
- true to create a deep copy; false for a shallow copy- Returns:
- copy of this value object
-
asByte
public byte asByte()
Description copied from interface:ClickHouseValue
Gets value as byte.- Specified by:
asByte
in interfaceClickHouseValue
- Overrides:
asByte
in classClickHouseObjectValue<UUID>
- Returns:
- byte value
-
asShort
public short asShort()
Description copied from interface:ClickHouseValue
Gets value as short.- Specified by:
asShort
in interfaceClickHouseValue
- Overrides:
asShort
in classClickHouseObjectValue<UUID>
- Returns:
- short value
-
asInteger
public int asInteger()
Description copied from interface:ClickHouseValue
Gets value as integer.- Specified by:
asInteger
in interfaceClickHouseValue
- Overrides:
asInteger
in classClickHouseObjectValue<UUID>
- Returns:
- integer value
-
asLong
public long asLong()
Description copied from interface:ClickHouseValue
Gets value as long.- Specified by:
asLong
in interfaceClickHouseValue
- Overrides:
asLong
in classClickHouseObjectValue<UUID>
- Returns:
- long value
-
asBigInteger
public BigInteger asBigInteger()
Description copied from interface:ClickHouseValue
Gets value asBigInteger
.- Specified by:
asBigInteger
in interfaceClickHouseValue
- Overrides:
asBigInteger
in classClickHouseObjectValue<UUID>
- Returns:
- big integer, could be null
-
asFloat
public float asFloat()
Description copied from interface:ClickHouseValue
Gets value as float.- Specified by:
asFloat
in interfaceClickHouseValue
- Overrides:
asFloat
in classClickHouseObjectValue<UUID>
- Returns:
- float value
-
asDouble
public double asDouble()
Description copied from interface:ClickHouseValue
Gets value as double.- Specified by:
asDouble
in interfaceClickHouseValue
- Overrides:
asDouble
in classClickHouseObjectValue<UUID>
- Returns:
- double value
-
asBigDecimal
public BigDecimal asBigDecimal(int scale)
Description copied from interface:ClickHouseValue
Gets value asBigDecimal
.- Specified by:
asBigDecimal
in interfaceClickHouseValue
- Overrides:
asBigDecimal
in classClickHouseObjectValue<UUID>
- Parameters:
scale
- scale of the decimal- Returns:
- big decimal, could be null
-
asObject
public Object asObject()
Description copied from interface:ClickHouseValue
Gets value as an object.- Specified by:
asObject
in interfaceClickHouseValue
- Overrides:
asObject
in classClickHouseObjectValue<UUID>
- Returns:
- an object representing the value, could be null
-
asUuid
public UUID asUuid()
Description copied from interface:ClickHouseValue
Gets value as UUID.- Returns:
- uuid, could be null
-
toSqlExpression
public String toSqlExpression()
Description copied from interface:ClickHouseValue
Converts the value to escaped SQL expression. For example, number 123 will be converted to123
, while string "12'3" will be converted to @{code '12\'3'}.- Specified by:
toSqlExpression
in interfaceClickHouseValue
- Overrides:
toSqlExpression
in classClickHouseObjectValue<UUID>
- Returns:
- escaped SQL expression
-
update
public ClickHouseUuidValue update(byte value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(short value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(int value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(long value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(float value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(double value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(BigInteger value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(BigDecimal value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(Enum<?> value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(Inet4Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(Inet6Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(LocalDate value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(LocalTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(LocalDateTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(String value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(UUID value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(ClickHouseValue value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseUuidValue update(Object value)
Description copied from interface:ClickHouseValue
Updates value. This method tries to identify type ofvalue
and then use corresponding update method to proceed. Unknown value will be passed toClickHouseValue.updateUnknown(Object)
.- Specified by:
update
in interfaceClickHouseValue
- Overrides:
update
in classClickHouseObjectValue<UUID>
- Parameters:
value
- value to update, could be null- Returns:
- this object
-
-