public interface Row extends GettableData
ResultSet.
 
 The values of a CQL Row can be retrieve by either index (index starts at 0)
 or name. When setting them by name, names follow the case insensitivity
 rules explained in ColumnDefinitions.
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
getBool(int i)
Returns the  
ith value of this row as a boolean. | 
boolean | 
getBool(String name)
Returns the value of column  
name as a boolean. | 
byte | 
getByte(int i)
Returns the  
ith value of this row as a byte. | 
byte | 
getByte(String name)
Returns the value of column  
name as a byte. | 
ByteBuffer | 
getBytes(int i)
Returns the  
ith value of this row as a byte array. | 
ByteBuffer | 
getBytes(String name)
Returns the value of column  
name as a byte array. | 
ByteBuffer | 
getBytesUnsafe(int i)
Returns the  
ith value of this row as a ByteBuffer. | 
ByteBuffer | 
getBytesUnsafe(String name)
Returns the value of column  
name as a ByteBuffer. | 
ColumnDefinitions | 
getColumnDefinitions()
Returns the columns contained in this Row. 
 | 
LocalDate | 
getDate(int i)
Returns the  
ith value as a date (without time). | 
LocalDate | 
getDate(String name)
Returns the value for  
name as a date (without time). | 
BigDecimal | 
getDecimal(int i)
Returns the  
ith value of this row as a variable length decimal. | 
BigDecimal | 
getDecimal(String name)
Returns the value of column  
name as a variable length decimal. | 
double | 
getDouble(int i)
Returns the  
ith value of this row as a double. | 
double | 
getDouble(String name)
Returns the value of column  
name as a double. | 
float | 
getFloat(int i)
Returns the  
ith value of this row as a float. | 
float | 
getFloat(String name)
Returns the value of column  
name as a float. | 
InetAddress | 
getInet(int i)
Returns the  
ith value of this row as an InetAddress. | 
InetAddress | 
getInet(String name)
Returns the value of column  
name as an InetAddress. | 
int | 
getInt(int i)
Returns the  
ith value of this row as an integer. | 
int | 
getInt(String name)
Returns the value of column  
name as an integer. | 
<T> List<T> | 
getList(int i,
       Class<T> elementsClass)
Returns the  
ith value of this row as a list. | 
<T> List<T> | 
getList(String name,
       Class<T> elementsClass)
Returns the value of column  
name as a list. | 
long | 
getLong(int i)
Returns the  
ith value of this row as a long. | 
long | 
getLong(String name)
Returns the value of column  
name as a long. | 
<K,V> Map<K,V> | 
getMap(int i,
      Class<K> keysClass,
      Class<V> valuesClass)
Returns the  
ith value of this row as a map. | 
<K,V> Map<K,V> | 
getMap(String name,
      Class<K> keysClass,
      Class<V> valuesClass)
Returns the value of column  
name as a map. | 
Token | 
getPartitionKeyToken()
Returns the value of the first column containing a  
Token. | 
<T> Set<T> | 
getSet(int i,
      Class<T> elementsClass)
Returns the  
ith value of this row as a set. | 
<T> Set<T> | 
getSet(String name,
      Class<T> elementsClass)
Returns the value of column  
name as a set. | 
short | 
getShort(int i)
Returns the  
ith value of this row as a short. | 
short | 
getShort(String name)
Returns the value of column  
name as a short. | 
String | 
getString(int i)
Returns the  
ith value of this row as a string. | 
String | 
getString(String name)
Returns the value of column  
name as a string. | 
long | 
getTime(int i)
Returns the  
ith value as a long in nanoseconds since midnight. | 
long | 
getTime(String name)
Returns the value for  
name as a long in nanoseconds since midnight. | 
Date | 
getTimestamp(int i)
Returns the  
ith value of this row as a date. | 
Date | 
getTimestamp(String name)
Returns the value of column  
name as a date. | 
Token | 
getToken(int i)
Returns the  
ith value of this row as a Token. | 
Token | 
getToken(String name)
Returns the value of column  
name as a Token. | 
UUID | 
getUUID(int i)
Returns the  
ith value of this row as a UUID. | 
UUID | 
getUUID(String name)
Returns the value of column  
name as a UUID. | 
BigInteger | 
getVarint(int i)
Returns the  
ith value of this row as a variable length integer. | 
BigInteger | 
getVarint(String name)
Returns the value of column  
name as a variable length integer. | 
boolean | 
isNull(int i)
Returns whether the  
ith value of this row is NULL. | 
boolean | 
isNull(String name)
Returns whether the value for column  
name in this row is NULL. | 
get, get, get, getList, getMap, getObject, getSet, getTupleValue, getUDTValueget, get, get, getList, getMap, getObject, getSet, getTupleValue, getUDTValueColumnDefinitions getColumnDefinitions()
boolean isNull(int i)
ith value of this row is NULL.isNull in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to check.ith value of this row is NULL.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().boolean isNull(String name)
name in this row is NULL.isNull in interface GettableByNameDataname - the name of the column to check.name is NULL.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).boolean getBool(int i)
ith value of this row as a boolean.getBool in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row. If the
 value is NULL, false is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type BOOLEAN.boolean getBool(String name)
name as a boolean.getBool in interface GettableByNameDataname - the name of the column to retrieve.name. If the value is NULL,
 false is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type BOOLEAN.byte getByte(int i)
ith value of this row as a byte.getByte in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a byte. If the
 value is NULL, 0 is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type TINYINT.byte getByte(String name)
name as a byte.getByte in interface GettableByNameDataname - the name of the column to retrieve.name as a byte. If the value is NULL,
 0 is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type TINYINT.short getShort(int i)
ith value of this row as a short.getShort in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a short. If the
 value is NULL, 0 is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type SMALLINT.short getShort(String name)
name as a short.getShort in interface GettableByNameDataname - the name of the column to retrieve.name as a short. If the value is NULL,
 0 is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type SMALLINT.int getInt(int i)
ith value of this row as an integer.getInt in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as an integer. If the
 value is NULL, 0 is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type INT.int getInt(String name)
name as an integer.getInt in interface GettableByNameDataname - the name of the column to retrieve.name as an integer. If the value is NULL,
 0 is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type INT.long getLong(int i)
ith value of this row as a long.getLong in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a long. If the
 value is NULL, 0L is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type BIGINT or COUNTER.long getLong(String name)
name as a long.getLong in interface GettableByNameDataname - the name of the column to retrieve.name as a long. If the value is NULL,
 0L is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column i is not of type BIGINT or COUNTER.Date getTimestamp(int i)
ith value of this row as a date.getTimestamp in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a data. If the
 value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type TIMESTAMP.Date getTimestamp(String name)
name as a date.getTimestamp in interface GettableByNameDataname - the name of the column to retrieve.name as a date. If the value is NULL,
 null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type TIMESTAMP.LocalDate getDate(int i)
ith value as a date (without time).getDate in interface GettableByIndexDatai - the index (0 <= i < size()) to retrieve.ith element as a date. If the
 value is NULL, null is returned.IndexOutOfBoundsException - if i is not a valid index for this object.InvalidTypeException - if value i is not of type DATE.LocalDate getDate(String name)
name as a date (without time).getDate in interface GettableByNameDataname - the name to retrieve.name as a date. If the value is NULL,
 null is returned.IllegalArgumentException - if name is not valid name for this object.InvalidTypeException - if value name is not of type DATE.long getTime(int i)
ith value as a long in nanoseconds since midnight.getTime in interface GettableByIndexDatai - the index (0 <= i < size()) to retrieve.ith element as a long. If the
 value is NULL, 0L is returned.IndexOutOfBoundsException - if i is not a valid index for this object.InvalidTypeException - if value i is not of type TIME.long getTime(String name)
name as a long in nanoseconds since midnight.getTime in interface GettableByNameDataname - the name to retrieve.name as a long. If the value is NULL,
 0L is returned.IllegalArgumentException - if name is not valid name for this object.InvalidTypeException - if value name is not of type TIME.float getFloat(int i)
ith value of this row as a float.getFloat in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a float. If the
 value is NULL, 0.0f is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type FLOAT.float getFloat(String name)
name as a float.getFloat in interface GettableByNameDataname - the name of the column to retrieve.name as a float. If the value is NULL,
 0.0f is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type FLOAT.double getDouble(int i)
ith value of this row as a double.getDouble in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a double. If the
 value is NULL, 0.0 is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type DOUBLE.double getDouble(String name)
name as a double.getDouble in interface GettableByNameDataname - the name of the column to retrieve.name as a double. If the value is NULL,
 0.0 is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type DOUBLE.ByteBuffer getBytesUnsafe(int i)
ith value of this row as a ByteBuffer.
 Note: this method always return the bytes composing the value, even if
 the column is not of type BLOB. That is, this method never throw an
 InvalidTypeException. However, if the type is not BLOB, it is up to the
 caller to handle the returned value correctly.getBytesUnsafe in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a ByteBuffer. If the
 value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().ByteBuffer getBytesUnsafe(String name)
name as a ByteBuffer.
 Note: this method always return the bytes composing the value, even if
 the column is not of type BLOB. That is, this method never throw an
 InvalidTypeException. However, if the type is not BLOB, it is up to the
 caller to handle the returned value correctly.getBytesUnsafe in interface GettableByNameDataname - the name of the column to retrieve.name as a ByteBuffer. If the value is NULL,
 null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).ByteBuffer getBytes(int i)
ith value of this row as a byte array.
 
 Note that this method validate that the column is of type BLOB. If you want to retrieve
 the bytes for any type of columns, use getBytesUnsafe(int) instead.
getBytes in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a byte array. If the
 value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i type is not of type BLOB.ByteBuffer getBytes(String name)
name as a byte array.
 
 Note that this method validate that the column is of type BLOB. If you want to retrieve
 the bytes for any type of columns, use getBytesUnsafe(String) instead.
getBytes in interface GettableByNameDataname - the name of the column to retrieve.name as a byte array. If the value is NULL,
 null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column i type is not of type BLOB.String getString(int i)
ith value of this row as a string.getString in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a string. If the
 value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i type is none of:
 VARCHAR, TEXT or ASCII.String getString(String name)
name as a string.getString in interface GettableByNameDataname - the name of the column to retrieve.name as a string. If the value is NULL,
 null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name type is none of:
 VARCHAR, TEXT or ASCII.BigInteger getVarint(int i)
ith value of this row as a variable length integer.getVarint in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a variable
 length integer. If the value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type VARINT.BigInteger getVarint(String name)
name as a variable length integer.getVarint in interface GettableByNameDataname - the name of the column to retrieve.name as a variable length integer.
 If the value is NULL, null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type VARINT.BigDecimal getDecimal(int i)
ith value of this row as a variable length decimal.getDecimal in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a variable
 length decimal. If the value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type DECIMAL.BigDecimal getDecimal(String name)
name as a variable length decimal.getDecimal in interface GettableByNameDataname - the name of the column to retrieve.name as a variable length decimal.
 If the value is NULL, null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type DECIMAL.UUID getUUID(int i)
ith value of this row as a UUID.getUUID in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as a UUID.
 If the value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type UUID
 or TIMEUUID.UUID getUUID(String name)
name as a UUID.getUUID in interface GettableByNameDataname - the name of the column to retrieve.name as a UUID.
 If the value is NULL, null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type
 UUID or TIMEUUID.InetAddress getInet(int i)
ith value of this row as an InetAddress.getInet in interface GettableByIndexDatai - the index (0 <= i < size()) of the column to retrieve.ith column in this row as an InetAddress.
 If the value is NULL, null is returned.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of type INET.InetAddress getInet(String name)
name as an InetAddress.getInet in interface GettableByNameDataname - the name of the column to retrieve.name as an InetAddress.
 If the value is NULL, null is returned.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of type
 INET.Token getToken(int i)
ith value of this row as a Token.
 
 getPartitionKeyToken() should generally be preferred to this method (unless the
 token column is aliased).
i - the index (0 <= i < size()) of the column to retrieve.ith column in this row as an Token.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not of the type of token values
 for this cluster (this depends on the configured partitioner).Token getToken(String name)
name as a Token.
 
 getPartitionKeyToken() should generally be preferred to this method (unless the
 token column is aliased).
name - the name of the column to retrieve.name as a Token.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not of the type of token values
 for this cluster (this depends on the configured partitioner).Token getPartitionKeyToken()
Token.
 
 This method is a shorthand for queries returning a single token in an unaliased
 column. It will look for the first name matching token(...):
 
 
 ResultSet rs = session.execute("SELECT token(k) FROM my_table WHERE k = 1");
 Token token = rs.one().getPartitionKeyToken(); // retrieves token(k)
 
 
 If that doesn't work for you (for example, if you're using an alias), use
 getToken(int) or getToken(String).name as a Token.IllegalStateException - if no column named token(...) exists in this
 ResultSet.InvalidTypeException - if the first column named token(...) is not of
 the type of token values for this cluster (this depends on the configured partitioner).<T> List<T> getList(int i, Class<T> elementsClass)
ith value of this row as a list.getList in interface GettableByIndexDataT - the type of the elements of the list to return.i - the index (0 <= i < size()) of the column to retrieve.elementsClass - the class for the elements of the list to retrieve.ith column in this row as a list of
 elementsClass objects. If the value is NULL, an empty list is
 returned (note that Cassandra makes no difference between an empty list
 and column of type list that is not set). The returned list is immutable.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not a list or if its
 elements are not of class elementsClass.<T> List<T> getList(String name, Class<T> elementsClass)
name as a list.getList in interface GettableByNameDataT - the type of the elements of the list to return.name - the name of the column to retrieve.elementsClass - the class for the elements of the list to retrieve.ith column in this row as a list of
 elementsClass objects. If the value is NULL, an empty list is
 returned (note that Cassandra makes no difference between an empty list
 and column of type list that is not set). The returned list is immutable.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not a list or if its
 elements are not of class elementsClass.<T> Set<T> getSet(int i, Class<T> elementsClass)
ith value of this row as a set.getSet in interface GettableByIndexDataT - the type of the elements of the set to return.i - the index (0 <= i < size()) of the column to retrieve.elementsClass - the class for the elements of the set to retrieve.ith column in this row as a set of
 elementsClass objects. If the value is NULL, an empty set is
 returned (note that Cassandra makes no difference between an empty set
 and column of type set that is not set). The returned set is immutable.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not a set or if its
 elements are not of class elementsClass.<T> Set<T> getSet(String name, Class<T> elementsClass)
name as a set.getSet in interface GettableByNameDataT - the type of the elements of the set to return.name - the name of the column to retrieve.elementsClass - the class for the elements of the set to retrieve.ith column in this row as a set of
 elementsClass objects. If the value is NULL, an empty set is
 returned (note that Cassandra makes no difference between an empty set
 and column of type set that is not set). The returned set is immutable.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not a set or if its
 elements are not of class elementsClass.<K,V> Map<K,V> getMap(int i, Class<K> keysClass, Class<V> valuesClass)
ith value of this row as a map.getMap in interface GettableByIndexDataK - the type of the keys of the map to return.V - the type of the values of the map to return.i - the index (0 <= i < size()) of the column to retrieve.keysClass - the class for the keys of the map to retrieve.valuesClass - the class for the values of the map to retrieve.ith column in this row as a map of
 keysClass to valuesClass objects. If the value is NULL,
 an empty map is returned (note that Cassandra makes no difference
 between an empty map and column of type map that is not set). The
 returned map is immutable.IndexOutOfBoundsException - if i < 0 || i >= this.columns().size().InvalidTypeException - if column i is not a map, if its
 keys are not of class keysClass or if its values are not of
 class valuesClass.<K,V> Map<K,V> getMap(String name, Class<K> keysClass, Class<V> valuesClass)
name as a map.getMap in interface GettableByNameDataK - the type of the keys of the map to return.V - the type of the values of the map to return.name - the name of the column to retrieve.keysClass - the class for the keys of the map to retrieve.valuesClass - the class for the values of the map to retrieve.ith column in this row as a map of
 keysClass to valuesClass objects. If the value is NULL,
 an empty map is returned (note that Cassandra makes no difference
 between an empty map and column of type map that is not set). The
 returned map is immutable.IllegalArgumentException - if name is not part of the
 ResultSet this row is part of, i.e. if !this.columns().names().contains(name).InvalidTypeException - if column name is not a map, if its
 keys are not of class keysClass or if its values are not of
 class valuesClass.Copyright © 2012–2015. All rights reserved.