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(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,
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,
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(String fieldName)
Get a specific field from this row.
|
<T> Field<T> |
field(String fieldName,
Class<T> type)
Get a specific field from this row and coerce it to
type . |
<T> Field<T> |
field(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(String... fieldNames)
Get all fields from this row, providing some field names.
|
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(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.
|
Class<?> |
type(int fieldIndex)
Get the type for a given field index.
|
Class<?> |
type(Name fieldName)
Get the type for a given field name.
|
Class<?> |
type(String fieldName)
Get the type for a given field name.
|
Class<?>[] |
types()
Get an array of types for this row.
|
int size()
<T> Field<T> field(Field<T> field)
This will return:
null
otherwise.
T
- The generic field typefield
- The field to fetchField<?> field(String fieldName)
fieldName
- The field to fetch<T> Field<T> field(String fieldName, Class<T> type)
type
.fieldName
- The field to fetchtype
- The type to coerce the resulting field to<T> Field<T> field(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, 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, 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(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(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
Class<?>[] types()
Entries in the resulting array correspond to Field.getType()
for
the corresponding Field
in fields()
Class<?> type(int fieldIndex)
fieldIndex
- The field's index of the field's type to fetchClass<?> type(String fieldName)
fieldName
- The field's name of the field's type to fetchClass<?> 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(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 © 2017. All Rights Reserved.