public interface SettableByNameData<T extends SettableData<T>>
Modifier and Type | Method and Description |
---|---|
T |
setBool(String name,
boolean v)
Sets the value for (all occurrences of) variable
name to the
provided boolean. |
T |
setBytes(String name,
ByteBuffer v)
Sets the value for (all occurrences of) variable
name to the
provided byte buffer. |
T |
setBytesUnsafe(String name,
ByteBuffer v)
Sets the value for (all occurrences of) variable
name to the
provided byte buffer. |
T |
setDate(String name,
Date v)
Sets the value for (all occurrences of) variable
name to the
provided date. |
T |
setDecimal(String name,
BigDecimal v)
Sets the value for (all occurrences of) variable
name to the
provided big decimal. |
T |
setDouble(String name,
double v)
Sets the value for (all occurrences of) variable
name to the
provided double. |
T |
setFloat(String name,
float v)
Sets the value for (all occurrences of) variable
name to the
provided float. |
T |
setInet(String name,
InetAddress v)
Sets the value for (all occurrences of) variable
name to the
provided inet address. |
T |
setInt(String name,
int v)
Sets the value for (all occurrences of) variable
name to the
provided integer. |
<E> T |
setList(String name,
List<E> v)
Sets the value for (all occurrences of) variable
name to the
provided list. |
T |
setLong(String name,
long v)
Sets the value for (all occurrences of) variable
name to the
provided long. |
<K,V> T |
setMap(String name,
Map<K,V> v)
Sets the value for (all occurrences of) variable
name to the
provided map. |
<E> T |
setSet(String name,
Set<E> v)
Sets the value for (all occurrences of) variable
name to the
provided set. |
T |
setString(String name,
String v)
Sets the value for (all occurrences of) variable
name to the
provided string. |
T |
setToNull(String name)
Sets the value for (all occurrences of) variable
name to null . |
T |
setTupleValue(String name,
TupleValue v)
Sets the value for (all occurrences of) variable
name to the
provided tuple value. |
T |
setUDTValue(String name,
UDTValue v)
Sets the value for (all occurrences of) variable
name to the
provided UDT value. |
T |
setUUID(String name,
UUID v)
Sets the value for (all occurrences of) variable
name to the
provided UUID. |
T |
setVarint(String name,
BigInteger v)
Sets the value for (all occurrences of) variable
name to the
provided big integer. |
T setBool(String name, boolean v)
name
to the
provided boolean.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any one occurrence of) name
is not of type BOOLEAN.T setInt(String name, int v)
name
to the
provided integer.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any one occurrence of) name
is not of type INT.T setLong(String name, long v)
name
to the
provided long.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type BIGINT or COUNTER.T setDate(String name, Date v)
name
to the
provided date.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type TIMESTAMP.T setFloat(String name, float v)
name
to the
provided float.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type FLOAT.T setDouble(String name, double v)
name
to the
provided double.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type DOUBLE.T setString(String name, String v)
name
to the
provided string.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
of neither of the following types: VARCHAR, TEXT or ASCII.T setBytes(String name, ByteBuffer v)
name
to the
provided byte buffer.
This method validate that the type of the column set is BLOB. If you
want to insert manually serialized data into columns of another type,
use setBytesUnsafe(java.lang.String, java.nio.ByteBuffer)
instead.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is not of type BLOB.T setBytesUnsafe(String name, ByteBuffer v)
name
to the
provided byte buffer.
Contrary to setBytes(java.lang.String, java.nio.ByteBuffer)
, this method does not check the
type of the column set. If you insert data that is not compatible with
the type of the column, you will get an InvalidQueryException
at
execute time.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.T setVarint(String name, BigInteger v)
name
to the
provided big integer.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type VARINT.T setDecimal(String name, BigDecimal v)
name
to the
provided big decimal.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type DECIMAL.T setUUID(String name, UUID v)
name
to the
provided UUID.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type UUID or TIMEUUID, or if value name
is of type
TIMEUUID but v
is not a type 1 UUID.T setInet(String name, InetAddress v)
name
to the
provided inet address.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not of type INET.<E> T setList(String name, List<E> v)
name
to the
provided list.
Please note that null
values are not supported inside collection by CQL.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not a list type or if the elements of v
are not of the type of
the elements of column name
.NullPointerException
- if v
contains null values. Nulls are not supported in collections
by CQL.<K,V> T setMap(String name, Map<K,V> v)
name
to the
provided map.
Please note that null
values are not supported inside collection by CQL.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not a map type or if the elements (keys or values) of v
are not of
the type of the elements of column name
.NullPointerException
- if v
contains null values. Nulls are not supported in collections
by CQL.<E> T setSet(String name, Set<E> v)
name
to the
provided set.
Please note that null
values are not supported inside collection by CQL.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not a map type or if the elements of v
are not of the type of
the elements of column name
.NullPointerException
- if v
contains null values. Nulls are not supported in collections
by CQL.T setUDTValue(String name, UDTValue v)
name
to the
provided UDT value.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if value i
is not a UDT value or if its definition
does not correspond to the one of v
.InvalidTypeException
- if (any occurrence of) name
is
not a UDT value or if the definition of column name
does not correspond to
the one of v
.T setTupleValue(String name, TupleValue v)
name
to the
provided tuple value.name
- the name of the value to set; if name
is present multiple
times, all its values are set.v
- the value to set.IllegalArgumentException
- if name
is not a valid name for this object.InvalidTypeException
- if (any occurrence of) name
is
not a tuple value or if the types of column name
do not correspond to
the ones of v
.T setToNull(String name)
name
to null
.
This is mainly intended for CQL types which map to native Java types.name
- the name of the value to set; if name
is present multiple
times, all its values are set.IllegalArgumentException
- if name
is not a valid name for this object.