public interface UdtValue extends GettableById, GettableByName, SettableById<UdtValue>, SettableByName<UdtValue>
It is an ordered set of named, typed fields.
A tuple value is attached if and only if its type is attached (see Detachable
).
The default implementation returned by the driver is mutable and serializable. If you write your own implementation, serializability is not mandatory, but recommended for use with some 3rd-party tools like Apache Spark ™.
Modifier and Type | Method and Description |
---|---|
default String |
getFormattedContents()
Returns a string representation of the contents of this UDT.
|
UserDefinedType |
getType() |
String |
toString()
Returns an abstract representation of this object, that may not include the UDT's
contents.
|
get, get, get, getBigDecimal, getBigInteger, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNull
get, get, get, getBigDecimal, getBigInteger, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNull
get, get, get, getBigDecimal, getBigInteger, getBoolean, getByte, getByteBuffer, getBytesUnsafe, getCqlDuration, getDouble, getFloat, getInetAddress, getInstant, getInt, getList, getLocalDate, getLocalTime, getLong, getMap, getObject, getSet, getShort, getString, getToken, getTupleValue, getUdtValue, getUuid, isNull
getType, set, set, set, setBigDecimal, setBigInteger, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuid
firstIndexOf
getType, set, set, set, setBigDecimal, setBigInteger, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuid
set, set, set, setBigDecimal, setBigInteger, setBoolean, setByte, setByteBuffer, setBytesUnsafe, setCqlDuration, setDouble, setFloat, setInetAddress, setInstant, setInt, setList, setLocalDate, setLocalTime, setLong, setMap, setSet, setShort, setString, setToken, setToNull, setTupleValue, setUdtValue, setUuid
firstIndexOf
getType, size
codecRegistry, protocolVersion
@NonNull UserDefinedType getType()
@NonNull default String getFormattedContents()
This produces a CQL literal, for example:
{street:'42 Main Street',zip:12345}Notes:
String toString()
The driver's built-in UdtValue
implementation returns the default format of Object.toString()
: the class name, followed by the at-sign and the hash code of the object.
Omitting the contents was a deliberate choice, because we feel it would make it too easy to
accidentally leak data (e.g. in application logs). If you want the contents, use getFormattedContents()
.
Copyright © 2017–2024. All rights reserved.