Package com.clickhouse.client.data
Class ClickHouseBitmapValue
- java.lang.Object
-
- com.clickhouse.client.data.ClickHouseObjectValue<ClickHouseBitmap>
-
- com.clickhouse.client.data.ClickHouseBitmapValue
-
- All Implemented Interfaces:
ClickHouseValue
,Serializable
public class ClickHouseBitmapValue extends ClickHouseObjectValue<ClickHouseBitmap>
Wraper class of Bitmap.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClickHouseBitmapValue(ClickHouseBitmap 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.ClickHouseBitmapValue
copy(boolean deep)
Gets a copy of this value object.long
getCardinality()
boolean
isNullOrEmpty()
Checks if the value is null, or empty for non-null types like Array, Tuple and Map.static ClickHouseBitmapValue
of(ClickHouseValue ref, ClickHouseBitmap value)
Update value of the given object or create a new instance ifref
is null.static ClickHouseBitmapValue
of(ClickHouseBitmap value)
Wrap the given value.static ClickHouseBitmapValue
ofEmpty(ClickHouseDataType valueType)
Create a new instance representing empty value.static ClickHouseBitmapValue
ofEmpty(ClickHouseValue ref, ClickHouseDataType valueType)
Update given value to empty or create a new instance ifref
is null.String
toSqlExpression()
Converts the value to escaped SQL expression.ClickHouseBitmapValue
update(boolean value)
Updates value.ClickHouseBitmapValue
update(byte value)
Updates value.ClickHouseBitmapValue
update(char value)
Updates value.ClickHouseBitmapValue
update(double value)
Updates value.ClickHouseBitmapValue
update(float value)
Updates value.ClickHouseBitmapValue
update(int value)
Updates value.ClickHouseBitmapValue
update(long value)
Updates value.ClickHouseBitmapValue
update(short value)
Updates value.ClickHouseBitmapValue
update(ClickHouseValue value)
Updates value.ClickHouseBitmapValue
update(Enum<?> value)
Updates value.ClickHouseBitmapValue
update(Object value)
Updates value.ClickHouseBitmapValue
update(String value)
Updates value.ClickHouseBitmapValue
update(BigDecimal value)
Updates value.ClickHouseBitmapValue
update(BigInteger value)
Updates value.ClickHouseBitmapValue
update(Inet4Address value)
Updates value.ClickHouseBitmapValue
update(Inet6Address value)
Updates value.ClickHouseBitmapValue
update(LocalDate value)
Updates value.ClickHouseBitmapValue
update(LocalDateTime value)
Updates value.ClickHouseBitmapValue
update(LocalTime value)
Updates value.ClickHouseBitmapValue
update(UUID value)
Updates value.-
Methods inherited from class com.clickhouse.client.data.ClickHouseObjectValue
asString, equals, getValue, hashCode, 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, asUuid, asZonedDateTime, asZonedDateTime, copy, isInfinity, isNaN, newUnsupportedException, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, updateUnknown
-
-
-
-
Constructor Detail
-
ClickHouseBitmapValue
protected ClickHouseBitmapValue(ClickHouseBitmap value)
-
-
Method Detail
-
ofEmpty
public static ClickHouseBitmapValue ofEmpty(ClickHouseDataType valueType)
Create a new instance representing empty value.- Parameters:
valueType
- value type, must be native integer- Returns:
- new instance representing empty value
-
ofEmpty
public static ClickHouseBitmapValue ofEmpty(ClickHouseValue ref, ClickHouseDataType valueType)
Update given value to empty or create a new instance ifref
is null.- Parameters:
ref
- object to update, could be nullvalueType
- value type, must be native integer- Returns:
- same object as
ref
or a new instance if it's null
-
of
public static ClickHouseBitmapValue of(ClickHouseBitmap value)
Wrap the given value.- Parameters:
value
- value- Returns:
- object representing the value
-
of
public static ClickHouseBitmapValue of(ClickHouseValue ref, ClickHouseBitmap 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 ClickHouseBitmapValue 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
-
isNullOrEmpty
public boolean isNullOrEmpty()
Description copied from interface:ClickHouseValue
Checks if the value is null, or empty for non-null types like Array, Tuple and Map.Please pay attention that only nullability will be considered for String, meaning this method will return
false
for an empty string. This is because String is treated as value-based type instead of a container like Array.- Specified by:
isNullOrEmpty
in interfaceClickHouseValue
- Overrides:
isNullOrEmpty
in classClickHouseObjectValue<ClickHouseBitmap>
- Returns:
- true if the value is null or empty; false otherwise
-
asByte
public byte asByte()
Description copied from interface:ClickHouseValue
Gets value as byte.- Specified by:
asByte
in interfaceClickHouseValue
- Overrides:
asByte
in classClickHouseObjectValue<ClickHouseBitmap>
- 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<ClickHouseBitmap>
- 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<ClickHouseBitmap>
- 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<ClickHouseBitmap>
- Returns:
- long value
-
asBigInteger
public BigInteger asBigInteger()
Description copied from interface:ClickHouseValue
Gets value asBigInteger
.- Specified by:
asBigInteger
in interfaceClickHouseValue
- Overrides:
asBigInteger
in classClickHouseObjectValue<ClickHouseBitmap>
- 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<ClickHouseBitmap>
- 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<ClickHouseBitmap>
- 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<ClickHouseBitmap>
- 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<ClickHouseBitmap>
- Returns:
- an object representing the value, could be null
-
getCardinality
public long getCardinality()
-
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<ClickHouseBitmap>
- Returns:
- escaped SQL expression
-
update
public ClickHouseBitmapValue update(boolean value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(char value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(byte value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(short value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(int value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(long value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(float value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(double value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(BigInteger value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(BigDecimal value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(Enum<?> value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(Inet4Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(Inet6Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(LocalDate value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(LocalTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(LocalDateTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(String value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(UUID value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue update(ClickHouseValue value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseBitmapValue 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<ClickHouseBitmap>
- Parameters:
value
- value to update, could be null- Returns:
- this object
-
-