Package com.clickhouse.client.data
Class ClickHouseGeoRingValue
- java.lang.Object
-
- com.clickhouse.client.data.ClickHouseObjectValue<double[][]>
-
- com.clickhouse.client.data.ClickHouseGeoRingValue
-
- All Implemented Interfaces:
ClickHouseValue
,Serializable
public class ClickHouseGeoRingValue extends ClickHouseObjectValue<double[][]>
Wraper class of Ring.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClickHouseGeoRingValue(double[][] value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
asArray()
Gets value as an object array.<T> T[]
asArray(Class<T> clazz)
Gets value as an array.<K,V>
Map<K,V>asMap(Class<K> keyClass, Class<V> valueClass)
Gets value as a map.String
asString(int length, Charset charset)
Gets value as fixed length(in bytes) string.protected static double[][]
check(double[][] value)
protected static String
convert(double[][] value, int length)
ClickHouseGeoRingValue
copy(boolean deep)
Gets a copy of this value object.boolean
isNullOrEmpty()
Checks if the value is null, or empty for non-null types like Array, Tuple and Map.static ClickHouseGeoRingValue
of(double[][] value)
Wrap the given value.static ClickHouseGeoRingValue
of(ClickHouseValue ref, double[][] value)
Update value of the given object or create a new instance ifref
is null.static ClickHouseGeoRingValue
ofEmpty()
Creates an empty ring.ClickHouseGeoRingValue
resetToNullOrEmpty()
Resets value to null, or empty when null is not supported(e.g.protected ClickHouseGeoRingValue
set(double[][] value)
String
toSqlExpression()
Converts the value to escaped SQL expression.ClickHouseGeoRingValue
update(boolean value)
Updates value.ClickHouseGeoRingValue
update(boolean[] value)
Updates value.ClickHouseGeoRingValue
update(byte value)
Updates value.ClickHouseGeoRingValue
update(byte[] value)
Updates value.ClickHouseGeoRingValue
update(char value)
Updates value.ClickHouseGeoRingValue
update(char[] value)
Updates value.ClickHouseGeoRingValue
update(double value)
Updates value.ClickHouseGeoRingValue
update(double[] value)
Updates value.ClickHouseGeoRingValue
update(float value)
Updates value.ClickHouseGeoRingValue
update(float[] value)
Updates value.ClickHouseGeoRingValue
update(int value)
Updates value.ClickHouseGeoRingValue
update(int[] value)
Updates value.ClickHouseGeoRingValue
update(long value)
Updates value.ClickHouseGeoRingValue
update(long[] value)
Updates value.ClickHouseGeoRingValue
update(short value)
Updates value.ClickHouseGeoRingValue
update(short[] value)
Updates value.ClickHouseGeoRingValue
update(ClickHouseValue value)
Updates value.ClickHouseGeoRingValue
update(Enum<?> value)
Updates value.ClickHouseGeoRingValue
update(Object value)
Updates value.ClickHouseGeoRingValue
update(Object[] value)
Updates value.ClickHouseGeoRingValue
update(String value)
Updates value.ClickHouseGeoRingValue
update(BigDecimal value)
Updates value.ClickHouseGeoRingValue
update(BigInteger value)
Updates value.ClickHouseGeoRingValue
update(Inet4Address value)
Updates value.ClickHouseGeoRingValue
update(Inet6Address value)
Updates value.ClickHouseGeoRingValue
update(LocalDate value)
Updates value.ClickHouseGeoRingValue
update(LocalDateTime value)
Updates value.ClickHouseGeoRingValue
update(LocalTime value)
Updates value.ClickHouseGeoRingValue
update(Collection<?> value)
Updates value.ClickHouseGeoRingValue
update(Enumeration<?> value)
Updates value.ClickHouseGeoRingValue
update(Map<?,?> value)
Updates value.ClickHouseGeoRingValue
update(UUID value)
Updates value.-
Methods inherited from class com.clickhouse.client.data.ClickHouseObjectValue
asBigDecimal, asBigInteger, asByte, asDouble, asFloat, asInteger, asLong, asObject, asShort, equals, getValue, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.clickhouse.client.ClickHouseValue
asBigDecimal, asBoolean, asByteStream, asCharacter, asCharacterStream, asDate, asDateTime, asDateTime, asEnum, asInet4Address, asInet6Address, asMap, asObject, asOffsetDateTime, asOffsetDateTime, asString, asString, asString, asTime, asTime, asTuple, asUuid, asZonedDateTime, asZonedDateTime, copy, isInfinity, isNaN, newUnsupportedException, update, update, update, updateUnknown
-
-
-
-
Method Detail
-
ofEmpty
public static ClickHouseGeoRingValue ofEmpty()
Creates an empty ring.- Returns:
- empty ring
-
of
public static ClickHouseGeoRingValue of(double[][] value)
Wrap the given value.- Parameters:
value
- value- Returns:
- object representing the value
-
of
public static ClickHouseGeoRingValue of(ClickHouseValue ref, double[][] 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
-
check
protected static double[][] check(double[][] value)
-
convert
protected static String convert(double[][] value, int length)
-
set
protected ClickHouseGeoRingValue set(double[][] value)
- Overrides:
set
in classClickHouseObjectValue<double[][]>
-
copy
public ClickHouseGeoRingValue 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
-
asArray
public Object[] asArray()
Description copied from interface:ClickHouseValue
Gets value as an object array.- Returns:
- non-null object array
-
asArray
public <T> T[] asArray(Class<T> clazz)
Description copied from interface:ClickHouseValue
Gets value as an array.- Type Parameters:
T
- type of the element- Parameters:
clazz
- class of the element- Returns:
- non-null array
-
asMap
public <K,V> Map<K,V> asMap(Class<K> keyClass, Class<V> valueClass)
Description copied from interface:ClickHouseValue
Gets value as a map.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
keyClass
- non-null class of keyvalueClass
- non-null class of value- Returns:
- non-null map value
-
asString
public String asString(int length, Charset charset)
Description copied from interface:ClickHouseValue
Gets value as fixed length(in bytes) string.- Specified by:
asString
in interfaceClickHouseValue
- Overrides:
asString
in classClickHouseObjectValue<double[][]>
- Parameters:
length
- byte length of the string, 0 or negative number means unboundedcharset
- charset, null is same as default(UTF-8)- Returns:
- string value, could be null
-
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<double[][]>
- Returns:
- true if the value is null or empty; false otherwise
-
resetToNullOrEmpty
public ClickHouseGeoRingValue resetToNullOrEmpty()
Description copied from interface:ClickHouseValue
Resets value to null, or empty when null is not supported(e.g. Array, Tuple and Map etc.).Keep in mind that String is value-based type, so this method will change its value to null instead of an empty string.
- Specified by:
resetToNullOrEmpty
in interfaceClickHouseValue
- Overrides:
resetToNullOrEmpty
in classClickHouseObjectValue<double[][]>
- Returns:
- this object
-
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<double[][]>
- Returns:
- escaped SQL expression
-
update
public ClickHouseGeoRingValue update(boolean value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(boolean[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(char value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(char[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(byte value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(byte[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(short value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(short[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(int value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(int[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(long value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(long[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(float value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(float[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(double value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(double[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(BigInteger value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(BigDecimal value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(Enum<?> value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(Inet4Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(Inet6Address value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(LocalDate value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(LocalTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(LocalDateTime value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(Collection<?> value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(Enumeration<?> value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(Map<?,?> value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(String value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(UUID value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(ClickHouseValue value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue update(Object[] value)
Description copied from interface:ClickHouseValue
Updates value.- Parameters:
value
- value to update- Returns:
- this object
-
update
public ClickHouseGeoRingValue 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<double[][]>
- Parameters:
value
- value to update, could be null- Returns:
- this object
-
-