java.lang.Object
org.firebirdsql.gds.ng.fields.RowDescriptor
- All Implemented Interfaces:
Iterable<FieldDescriptor>
The class
RowDescriptor
is a java mapping of the XSQLDA server data structure used to describe the row
metadata of one row for input or output.
RowDescriptor is immutable, values of a row are maintained separately in a RowValue
.
- Author:
- Mark Rotteveel
-
Method Summary
Modifier and TypeMethodDescriptionCreates aRowValue
instance with default (null
) values for each field.Creates a deleted row marker.static RowDescriptor
createRowDescriptor
(FieldDescriptor[] fieldDescriptors, DatatypeCoder datatypeCoder) Creates an instance ofRowDescriptor
with the suppliedFieldDescriptor
instances.static RowDescriptor
empty
(DatatypeCoder datatypeCoder) Returns an empty row descriptor with the specified datatype coder.boolean
int
getCount()
getFieldDescriptor
(int index) Gets theFieldDescriptor
at the specified (0-based) index.int
hashCode()
iterator()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getDatatypeCoder
- Returns:
- The
DatatypeCoder
.
-
getEncodingFactory
- Returns:
- The
IEncodingFactory
.
-
getCount
public int getCount()- Returns:
- The number of fields.
-
getFieldDescriptor
Gets theFieldDescriptor
at the specified (0-based) index.- Parameters:
index
- 0-based index of the field- Returns:
- FieldDescriptor
- Throws:
IndexOutOfBoundsException
- if index is not0 <= index < getCount
-
getFieldDescriptors
- Returns:
- An immutable List of the
FieldDescriptor
instances of this row.
-
createDefaultFieldValues
Creates aRowValue
instance with default (null
) values for each field.All fields are marked as uninitialized.
The (0-based) index of the each field value in the
RowValue
corresponds with the (0-based) index of theFieldDescriptor
within thisRowDescriptor
.- Returns:
- Uninitialized and empty
RowValue
instance for a row described by this descriptor. - See Also:
-
createDeletedRowMarker
Creates a deleted row marker.A deleted row marker is used in JDBC result sets for deleted rows, and to discern them from (updated) rows that are simply all
NULL
. This is for Jaybird internal implementation needs only.- Returns:
- Deleted row marker with
count
number of rows, all set to null
-
iterator
- Specified by:
iterator
in interfaceIterable<FieldDescriptor>
-
toString
-
equals
-
hashCode
public int hashCode() -
createRowDescriptor
public static RowDescriptor createRowDescriptor(FieldDescriptor[] fieldDescriptors, DatatypeCoder datatypeCoder) Creates an instance ofRowDescriptor
with the suppliedFieldDescriptor
instances.- Parameters:
fieldDescriptors
- field descriptors (array is cloned before use)datatypeCoder
- datatype coder for the connection that uses this RowDescriptor.- Returns:
RowDescriptor
instance
-
empty
Returns an empty row descriptor with the specified datatype coder.- Parameters:
datatypeCoder
- datatype coder for the connection that uses this RowDescriptor.- Returns:
- Empty row descriptor
-