public class MetadataRow extends Object
CassandraMetadataResultSet.| Modifier and Type | Class and Description |
|---|---|
static class |
MetadataRow.MetadataRowTemplate
A template of metadata row.
|
| Constructor and Description |
|---|
MetadataRow()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MetadataRow |
addEntry(String key,
Object value,
com.datastax.oss.driver.api.core.type.DataType type)
Add a metadata to this
MetadataRow instance. |
boolean |
getBool(int i)
Retrieves the value of the
ith column of the metadata row as boolean. |
boolean |
getBool(String name)
Retrieves the value of the column
name of the metadata row as boolean. |
byte |
getByte(int i)
Retrieves the value of the
ith column of the metadata row as byte. |
byte |
getByte(String name)
Retrieves the value of the column
name of the metadata row as byte. |
ByteBuffer |
getBytes(int i)
Retrieves the value of the
ith column of the metadata row as ByteBuffer. |
ByteBuffer |
getBytes(String name)
Retrieves the value of the column
name of the metadata row as ByteBuffer. |
ColumnDefinitions |
getColumnDefinitions()
Gets the column definitions for the metadata row.
|
Date |
getDate(int i)
Retrieves the value of the
ith column of the metadata row as Date. |
Date |
getDate(String name)
Retrieves the value of the column
name of the metadata row as Date. |
BigDecimal |
getDecimal(int i)
Retrieves the value of the
ith column of the metadata row as BigDecimal. |
BigDecimal |
getDecimal(String name)
Retrieves the value of the column
name of the metadata row as BigDecimal. |
double |
getDouble(int i)
Retrieves the value of the
ith column of the metadata row as double. |
double |
getDouble(String name)
Retrieves the value of the column
name of the metadata row as double. |
com.datastax.oss.driver.api.core.data.CqlDuration |
getDuration(int i)
Retrieves the value of the
ith column of the metadata row as CqlDuration. |
com.datastax.oss.driver.api.core.data.CqlDuration |
getDuration(String name)
Retrieves the value of the column
name of the metadata row as CqlDuration. |
float |
getFloat(int i)
Retrieves the value of the
ith column of the metadata row as float. |
float |
getFloat(String name)
Retrieves the value of the column
name of the metadata row as float. |
InetAddress |
getInet(int i)
Retrieves the value of the
ith column of the metadata row as InetAddress. |
InetAddress |
getInet(String name)
Retrieves the value of the column
name of the metadata row as InetAddress. |
int |
getInt(int i)
Retrieves the value of the
ith column of the metadata row as int. |
Integer |
getInt(String name)
Retrieves the value of the column
name of the metadata row as int. |
<T> List<T> |
getList(int i,
Class<T> elementsClass)
Retrieves the value of the
ith column of the metadata row as List. |
<T> List<T> |
getList(String name,
Class<T> elementsClass)
Retrieves the value of the column
name of the metadata row as List. |
long |
getLong(int i)
Retrieves the value of the
ith column of the metadata row as long. |
long |
getLong(String name)
Retrieves the value of the column
name of the metadata row as long. |
<K,V> Map<K,V> |
getMap(int i,
Class<K> keysClass,
Class<V> valuesClass)
Retrieves the value of the
ith column of the metadata row as Map. |
<K,V> Map<K,V> |
getMap(String name,
Class<K> keysClass,
Class<V> valuesClass)
Retrieves the value of the column
name of the metadata row as Map. |
<T> Set<T> |
getSet(int i,
Class<T> elementsClass)
Retrieves the value of the
ith column of the metadata row as Set. |
<T> Set<T> |
getSet(String name,
Class<T> elementsClass)
Retrieves the value of the column
name of the metadata row as Set. |
short |
getShort(int i)
Retrieves the value of the
ith column of the metadata row as short. |
short |
getShort(String name)
Retrieves the value of the column
name of the metadata row as short. |
String |
getString(int i)
Retrieves the value of the
ith column of the metadata row as String. |
String |
getString(String name)
Retrieves the value of the column
name of the metadata row as String. |
Time |
getTime(int i)
Retrieves the value of the
ith column of the metadata row as Time. |
Time |
getTime(String name)
Retrieves the value of the column
name of the metadata row as Time. |
UUID |
getUUID(int i)
Retrieves the value of the
ith column of the metadata row as UUID. |
UUID |
getUUID(String name)
Retrieves the value of the column
name of the metadata row as UUID. |
BigInteger |
getVarint(int i)
Retrieves the value of the
ith column of the metadata row as BigInteger. |
BigInteger |
getVarint(String name)
Retrieves the value of the column
name of the metadata row as BigInteger. |
boolean |
isNull(int i)
Gets whether the
ith column of the metadata row is null. |
boolean |
isNull(String name)
Gets whether the column
name of the metadata row is null. |
String |
toString() |
MetadataRow |
withTemplate(MetadataRow.MetadataRowTemplate template,
Object... values)
Populates a metadata row defined by a row template with the specified values.
|
public MetadataRow addEntry(String key, Object value, com.datastax.oss.driver.api.core.type.DataType type)
MetadataRow instance.key - The metadata key.value - The metadata value.type - The metadata column type.MetadataRow instance.public MetadataRow withTemplate(MetadataRow.MetadataRowTemplate template, Object... values)
The number of values must match the number of columns defined in the row template, otherwise a runtime exception will be thrown.
template - The row template.values - The values used to populate the metadata row.MetadataRow instance.RuntimeException - when the number of values does not match the number of columns defined in the row
template.public ColumnDefinitions getColumnDefinitions()
public boolean isNull(int i)
ith column of the metadata row is null.i - The column index (the first column is 0).true if the ith column of the metadata row is null, false otherwise.IndexOutOfBoundsException - if i < 0 or i >= size().public boolean isNull(String name)
name of the metadata row is null.name - The column name.true if the column name of the metadata row is null, false otherwise.IllegalArgumentException - if name is not a valid metadata name for this row.public boolean getBool(int i)
ith column of the metadata row as boolean.i - The column index (the first column is 0).NULL, the value returned is false.IndexOutOfBoundsException - if i < 0 or i >= size().public boolean getBool(String name)
name of the metadata row as boolean.name - The column name.NULL, the value returned is false.IllegalArgumentException - if name is not a valid metadata name for this row.public byte getByte(int i)
ith column of the metadata row as byte.i - The column index (the first column is 0).NULL, the value returned is 0.IndexOutOfBoundsException - if i < 0 or i >= size().public byte getByte(String name)
name of the metadata row as byte.name - The column name.NULL, the value returned is 0.IllegalArgumentException - if name is not a valid metadata name for this row.public short getShort(int i)
ith column of the metadata row as short.i - The column index (the first column is 0).NULL, the value returned is 0.IndexOutOfBoundsException - if i < 0 or i >= size().public short getShort(String name)
name of the metadata row as short.name - The column name.NULL, the value returned is 0.IllegalArgumentException - if name is not a valid metadata name for this row.public int getInt(int i)
ith column of the metadata row as int.i - The column index (the first column is 0).NULL, the value returned is 0.IndexOutOfBoundsException - if i < 0 or i >= size().public Integer getInt(String name)
name of the metadata row as int.name - The column name.NULL, the value returned is 0.IllegalArgumentException - if name is not a valid metadata name for this row.public long getLong(int i)
ith column of the metadata row as long.i - The column index (the first column is 0).NULL, the value returned is 0.IndexOutOfBoundsException - if i < 0 or i >= size().public long getLong(String name)
name of the metadata row as long.name - The column name.NULL, the value returned is 0.IllegalArgumentException - if name is not a valid metadata name for this row.public Date getDate(int i)
ith column of the metadata row as Date.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public Date getDate(String name)
name of the metadata row as Date.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public Time getTime(int i)
ith column of the metadata row as Time.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public Time getTime(String name)
name of the metadata row as Time.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public com.datastax.oss.driver.api.core.data.CqlDuration getDuration(int i)
ith column of the metadata row as CqlDuration.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public com.datastax.oss.driver.api.core.data.CqlDuration getDuration(String name)
name of the metadata row as CqlDuration.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public float getFloat(int i)
ith column of the metadata row as float.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public float getFloat(String name)
name of the metadata row as float.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public double getDouble(int i)
ith column of the metadata row as double.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public double getDouble(String name)
name of the metadata row as double.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public ByteBuffer getBytes(int i)
ith column of the metadata row as ByteBuffer.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public ByteBuffer getBytes(String name)
name of the metadata row as ByteBuffer.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public String getString(int i)
ith column of the metadata row as String.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public String getString(String name)
name of the metadata row as String.name - the column nameIllegalArgumentException - if name is not a valid metadata name for this row.public BigInteger getVarint(int i)
ith column of the metadata row as BigInteger.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public BigInteger getVarint(String name)
name of the metadata row as BigInteger.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public BigDecimal getDecimal(int i)
ith column of the metadata row as BigDecimal.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public BigDecimal getDecimal(String name)
name of the metadata row as BigDecimal.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public UUID getUUID(int i)
ith column of the metadata row as UUID.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public UUID getUUID(String name)
name of the metadata row as UUID.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public InetAddress getInet(int i)
ith column of the metadata row as InetAddress.i - The column index (the first column is 0).IndexOutOfBoundsException - if i < 0 or i >= size().public InetAddress getInet(String name)
name of the metadata row as InetAddress.name - The column name.IllegalArgumentException - if name is not a valid metadata name for this row.public <T> List<T> getList(int i, Class<T> elementsClass)
ith column of the metadata row as List.T - The type of the list elements.i - The column index (the first column is 0).elementsClass - The class of the list elements.IndexOutOfBoundsException - if i < 0 or i >= size().public <T> List<T> getList(String name, Class<T> elementsClass)
name of the metadata row as List.T - The type of the list elements.name - The column name.elementsClass - The class of the list elements.IllegalArgumentException - if name is not a valid metadata name for this row.public <T> Set<T> getSet(int i, Class<T> elementsClass)
ith column of the metadata row as Set.T - The type of the set elements.i - The column index (the first column is 0).elementsClass - The class of the set elements.IndexOutOfBoundsException - if i < 0 or i >= size().public <T> Set<T> getSet(String name, Class<T> elementsClass)
name of the metadata row as Set.T - The type of the set elements.name - The column name.elementsClass - The class of the set elements.IllegalArgumentException - if name is not a valid metadata name for this row.public <K,V> Map<K,V> getMap(int i, Class<K> keysClass, Class<V> valuesClass)
ith column of the metadata row as Map.K - The type of the map keys.V - The type of the map values.i - The column index (the first column is 0).keysClass - The class of the map keys.valuesClass - The class of the map values.IndexOutOfBoundsException - if i < 0 or i >= size().public <K,V> Map<K,V> getMap(String name, Class<K> keysClass, Class<V> valuesClass)
name of the metadata row as Map.K - The type of the map keys.V - The type of the map values.name - The column name.keysClass - The class of the map keys.valuesClass - The class of the map values.IllegalArgumentException - if name is not a valid metadata name for this row.Copyright © 2020–2024 ING Bank. All rights reserved.