public interface Row extends FieldOrRow
Note: Not all databases support row value expressions, but many row value expression operations can be emulated on all databases. See relevant row value expression method Javadocs for details.
Modifier and Type | Method and Description |
---|---|
DataType<?> |
dataType(int fieldIndex)
Get the data type for a given field index.
|
DataType<?> |
dataType(Name fieldName)
Get the data type for a given field name.
|
DataType<?> |
dataType(java.lang.String fieldName)
Get the data type for a given field name.
|
DataType<?>[] |
dataTypes()
Get an array of data types for this row.
|
<T> Field<T> |
field(Field<T> field)
Get a specific field from this row.
|
Field<?> |
field(int fieldIndex)
Get a specific field from this row.
|
<T> Field<T> |
field(int fieldIndex,
java.lang.Class<T> type)
Get a specific field from this row and coerce it to
type . |
<T> Field<T> |
field(int fieldIndex,
DataType<T> dataType)
Get a specific field from this row and coerce it to
dataType . |
Field<?> |
field(Name fieldName)
Get a specific field from this row.
|
<T> Field<T> |
field(Name fieldName,
java.lang.Class<T> type)
Get a specific field from this row and coerce it to
type . |
<T> Field<T> |
field(Name fieldName,
DataType<T> dataType)
Get a specific field from this row and coerce it to
dataType . |
Field<?> |
field(java.lang.String fieldName)
Get a specific field from this row.
|
<T> Field<T> |
field(java.lang.String fieldName,
java.lang.Class<T> type)
Get a specific field from this row and coerce it to
type . |
<T> Field<T> |
field(java.lang.String fieldName,
DataType<T> dataType)
Get a specific field from this row and coerce it to
dataType . |
Field<?>[] |
fields()
Get all fields from this row.
|
Field<?>[] |
fields(Field<?>... fields)
Get all fields from this row, providing some fields.
|
Field<?>[] |
fields(int... fieldIndexes)
Get all fields from this row, providing some field indexes.
|
Field<?>[] |
fields(Name... fieldNames)
Get all fields from this row, providing some field names.
|
Field<?>[] |
fields(java.lang.String... fieldNames)
Get all fields from this row, providing some field names.
|
java.util.stream.Stream<Field<?>> |
fieldStream()
Get the fields from this row as a
Stream . |
int |
indexOf(Field<?> field)
Get a field's index from this row.
|
int |
indexOf(Name fieldName)
Get a field's index from this row.
|
int |
indexOf(java.lang.String fieldName)
Get a field's index from this row.
|
Condition |
isNotNull()
Check if this row value expression contains no
NULL values. |
Condition |
isNull()
Check if this row value expression contains only
NULL
values. |
int |
size()
Get the degree of this row value expression.
|
java.lang.Class<?> |
type(int fieldIndex)
Get the type for a given field index.
|
java.lang.Class<?> |
type(Name fieldName)
Get the type for a given field name.
|
java.lang.Class<?> |
type(java.lang.String fieldName)
Get the type for a given field name.
|
java.lang.Class<?>[] |
types()
Get an array of types for this row.
|
int size()
java.util.stream.Stream<Field<?>> fieldStream()
Stream
.<T> Field<T> field(Field<T> field)
This will return:
null
otherwise.
T
- The generic field typefield
- The field to fetchField<?> field(java.lang.String fieldName)
fieldName
- The field to fetch<T> Field<T> field(java.lang.String fieldName, java.lang.Class<T> type)
type
.fieldName
- The field to fetchtype
- The type to coerce the resulting field to<T> Field<T> field(java.lang.String fieldName, DataType<T> dataType)
dataType
.fieldName
- The field to fetchdataType
- The type to coerce the resulting field toField<?> field(Name fieldName)
fieldName
- The field to fetch<T> Field<T> field(Name fieldName, java.lang.Class<T> type)
type
.fieldName
- The field to fetchtype
- The type to coerce the resulting field to<T> Field<T> field(Name fieldName, DataType<T> dataType)
dataType
.fieldName
- The field to fetchdataType
- The type to coerce the resulting field toField<?> field(int fieldIndex)
fieldIndex
- The field's index of the field to fetch<T> Field<T> field(int fieldIndex, java.lang.Class<T> type)
type
.fieldIndex
- The field's index of the field to fetchtype
- The type to coerce the resulting field to<T> Field<T> field(int fieldIndex, DataType<T> dataType)
dataType
.fieldIndex
- The field's index of the field to fetchdataType
- The type to coerce the resulting field toField<?>[] fields()
Field<?>[] fields(Field<?>... fields)
field(Field)
Field<?>[] fields(java.lang.String... fieldNames)
field(String)
Field<?>[] fields(Name... fieldNames)
field(Name)
Field<?>[] fields(int... fieldIndexes)
field(int)
int indexOf(Field<?> field)
field
- The field to look for-1
if the field is not
contained in this Row
int indexOf(java.lang.String fieldName)
fieldName
- The field name to look for-1
if the field is not
contained in this Row
int indexOf(Name fieldName)
fieldName
- The field name to look for-1
if the field is not
contained in this Row
java.lang.Class<?>[] types()
Entries in the resulting array correspond to Field.getType()
for
the corresponding Field
in fields()
java.lang.Class<?> type(int fieldIndex)
fieldIndex
- The field's index of the field's type to fetchjava.lang.Class<?> type(java.lang.String fieldName)
fieldName
- The field's name of the field's type to fetchjava.lang.Class<?> type(Name fieldName)
fieldName
- The field's name of the field's type to fetchDataType<?>[] dataTypes()
Entries in the resulting array correspond to Field.getDataType()
for the corresponding Field
in fields()
DataType<?> dataType(int fieldIndex)
fieldIndex
- The field's index of the field's data type to fetchDataType<?> dataType(java.lang.String fieldName)
fieldName
- The field's name of the field's data type to fetchDataType<?> dataType(Name fieldName)
fieldName
- The field's name of the field's data type to fetch@Support Condition isNull()
NULL
values.
Row NULL predicates can be emulated in those databases that do not
support such predicates natively: (A, B) IS NULL
is
equivalent to A IS NULL AND B IS NULL
@Support Condition isNotNull()
NULL
values.
Row NOT NULL predicates can be emulated in those databases that do not
support such predicates natively: (A, B) IS NOT NULL
is
equivalent to A IS NOT NULL AND B IS NOT NULL
Note that the two following predicates are NOT equivalent:
(A, B) IS NOT NULL
, which is the same as
(A IS NOT NULL) AND (B IS NOT NULL)
NOT((A, B) IS NULL)
, which is the same as
(A IS NOT NULL) OR (B IS NOT NULL)
Copyright © 2018. All Rights Reserved.