Package org.firebirdsql.gds.ng.fields
Class RowDescriptor
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 an immutable, values of a row are maintained separately in a RowValue.
- Version:
- 3.0
- Author:
- Mark Rotteveel
-
Method Summary
Modifier and TypeMethodDescriptionCreates aRowValueinstance with default (null) values for each field.static RowDescriptorcreateRowDescriptor(FieldDescriptor[] fieldDescriptors, DatatypeCoder datatypeCoder) Creates an instance ofRowDescriptorwith the suppliedFieldDescriptorinstances.static RowDescriptorempty(DatatypeCoder datatypeCoder) Returns an empty row descriptor with the specified datatype coder.booleanintgetCount()getFieldDescriptor(int index) Gets theFieldDescriptorat the specified (0-based) index.inthashCode()iterator()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 theFieldDescriptorat 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 unmodifiable List of the
FieldDescriptorinstances of this row.
-
createDefaultFieldValues
Creates aRowValueinstance with default (null) values for each field.All fields are marked as uninitialized.
The (0-based) index of the each field value in the
RowValuecorresponds with the (0-based) index of theFieldDescriptorwithin thisRowDescriptor.- Returns:
- Uninitialized and empty
RowValueinstance for a row described by this descriptor. - See Also:
-
iterator
- Specified by:
iteratorin interfaceIterable<FieldDescriptor>
-
toString
-
equals
-
hashCode
public int hashCode() -
createRowDescriptor
public static RowDescriptor createRowDescriptor(FieldDescriptor[] fieldDescriptors, DatatypeCoder datatypeCoder) Creates an instance ofRowDescriptorwith the suppliedFieldDescriptorinstances.- Parameters:
fieldDescriptors- The field descriptors (array is cloned before use)datatypeCoder- he datatype code for the connection that uses this RowDescriptor.- Returns:
RowDescriptorinstance
-
empty
Returns an empty row descriptor with the specified datatype coder.- Parameters:
datatypeCoder- The datatype code for the connection that uses this RowDescriptor.- Returns:
- Empty row descriptor
-