Class Row
java.lang.Object
uk.ac.manchester.spinnaker.alloc.db.Row
A restricted form of result set. Note that this object must not be
 saved outside the context of iteration over its' query's results.
- Author:
- Donal Fellows
- 
Method SummaryModifier and TypeMethodDescriptionstatic DatabaseAPI.RowMapper<Boolean>Get a function to get the contents of the named column.static DatabaseAPI.RowMapper<byte[]>Get a function to get the contents of the named column.static DatabaseAPI.RowMapper<uk.ac.manchester.spinnaker.machine.ChipLocation>Create a function for extracting a chip from a result set row.static DatabaseAPI.RowMapper<uk.ac.manchester.spinnaker.machine.CoreLocation>Create a function for extracting a core from a result set row.static DatabaseAPI.RowMapper<Duration>Get a function to get the contents of the named column.static <T extends Enum<T>>
 DatabaseAPI.RowMapper<T>Get a function to get the contents of the named column.booleangetBoolean(String columnLabel) Get the contents of the named column.byte[]Get the contents of the named column.uk.ac.manchester.spinnaker.machine.ChipLocationGet a chip from a result set row.Get the column names from this row.uk.ac.manchester.spinnaker.machine.CoreLocationGet a core from a result set row.getDuration(String columnLabel) Get the contents of the named column.<T extends Enum<T>>
 TGet the contents of the named column.getInstant(String columnLabel) Get the contents of the named column.intGet the contents of the named column.getInteger(String columnLabel) Get the contents of the named column.Get the contents of the named column.Get the contents of the named column.<T> TGet the contents of the named column by deserialization.Get the contents of the named column.static DatabaseAPI.RowMapper<Instant>Get a function to get the contents of the named column.static ToIntFunction<Row>Get a function to get the contents of the named column.static DatabaseAPI.RowMapper<Long>Get a function to get the contents of the named column.static DatabaseAPI.RowMapper<Integer>Get a function to get the contents of the named column.static DatabaseAPI.RowMapper<Object>Get a function to get the contents of the named column.static <T> DatabaseAPI.RowMapper<T>Get a function to get the contents of the named column.static <T> uk.ac.manchester.spinnaker.utils.MappableIterable<T>Make a mappable iterator out of a list.static DatabaseAPI.RowMapper<String>Get a function to get the contents of the named column.toString()
- 
Method Details- 
getColumnNamesGet the column names from this row.- Returns:
- The set of column names; all lookup of columns is by name, so the order is unimportant. (The set returned will iterate over the names in the order they are in the underlying result set, but this is considered "unimportant".)
- Throws:
- DataAccessException- If the column names can't be retrieved.
 
- 
getStringGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A string, or nullonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
stringGet a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the string from the column of a row.
 
- 
getBooleanGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A boolean, or falseonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
boolGet a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the booleanfrom the column of a row.
 
- 
getIntGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- An integer, or 0onNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
int32Get a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the intfrom the column of a row.
 
- 
getIntegerGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- An integer or null.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
integerGet a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the nullable integer from the column of a row.
 
- 
getBytesGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A byte array, or nullonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
bytesGet a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the byte array from the column of a row.
 
- 
getSerialGet the contents of the named column by deserialization.- Type Parameters:
- T- The type of value expected.
- Parameters:
- columnLabel- The name of the column.
- cls- The type of value expected.
- Returns:
- A deserialized object, or nullonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
- TypeMismatchDataAccessException- If the object is not of the required type.
 
- 
serialGet a function to get the contents of the named column.- Type Parameters:
- T- The type of value expected.
- Parameters:
- columnLabel- The name of the column.
- cls- The type of value expected.
- Returns:
- A function to get the deserialized object from the column of a row.
 
- 
getInstantGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- An instant, or nullonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
instantGet a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the instant from the column of a row.
 
- 
getDurationGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A duration, or nullonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
durationGet a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the duration from the column of a row.
 
- 
getObjectGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- An automatically-decoded object, or nullonNULL. (Only returns basic types due to the way SQLite type affinities work;Integer,Double,String, orbyte[].)
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
objectGet a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the object from the column of a row.
 
- 
getEnumGet the contents of the named column.- Type Parameters:
- T- The enumeration type.
- Parameters:
- columnLabel- The name of the column.
- type- The enumeration type class.
- Returns:
- An enum value, or nullonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
enumeratepublic static <T extends Enum<T>> DatabaseAPI.RowMapper<T> enumerate(String columnLabel, Class<T> type) Get a function to get the contents of the named column.- Type Parameters:
- T- The enumeration type.
- Parameters:
- columnLabel- The name of the column.
- type- The enumeration type class.
- Returns:
- A function to get the enumfrom the column of a row.
 
- 
getLongGet the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A long value, or nullonNULL.
- Throws:
- DataAccessException- If the column's contents can't be retrieved.
 
- 
int64Get a function to get the contents of the named column.- Parameters:
- columnLabel- The name of the column.
- Returns:
- A function to get the nullable longfrom the column of a row.
 
- 
toString
- 
getChipGet a chip from a result set row.- Parameters:
- x- The name of the column with the X coordinate.
- y- The name of the column with the Y coordinate.
- Returns:
- The chip location.
 
- 
chippublic static DatabaseAPI.RowMapper<uk.ac.manchester.spinnaker.machine.ChipLocation> chip(String x, String y) Create a function for extracting a chip from a result set row.- Parameters:
- x- The name of the column with the X coordinate.
- y- The name of the column with the Y coordinate.
- Returns:
- The mapping function.
 
- 
getCoreGet a core from a result set row.- Parameters:
- x- The name of the column with the X coordinate.
- y- The name of the column with the Y coordinate.
- p- The name of the column with the core ID.
- Returns:
- The core location.
 
- 
corepublic static DatabaseAPI.RowMapper<uk.ac.manchester.spinnaker.machine.CoreLocation> core(String x, String y, String p) Create a function for extracting a core from a result set row.- Parameters:
- x- The name of the column with the X coordinate.
- y- The name of the column with the Y coordinate.
- p- The name of the column with the core ID.
- Returns:
- The mapping function.
 
- 
streamMake a mappable iterator out of a list.- Type Parameters:
- T- The type of the list.
- Parameters:
- lst- The list to convert.
- Returns:
- A mappable iterator.
 
 
-