Package org.firebirdsql.gds.ng.fields
Class RowDescriptor
- java.lang.Object
- 
- org.firebirdsql.gds.ng.fields.RowDescriptor
 
- 
- All Implemented Interfaces:
- java.lang.Iterable<FieldDescriptor>
 
 public final class RowDescriptor extends java.lang.Object implements java.lang.Iterable<FieldDescriptor> The classRowDescriptoris 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.- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RowValuecreateDefaultFieldValues()Creates aRowValueinstance with default (null) values for each field.RowValuecreateDeletedRowMarker()Creates a deleted row marker.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.booleanequals(java.lang.Object obj)intgetCount()DatatypeCodergetDatatypeCoder()IEncodingFactorygetEncodingFactory()FieldDescriptorgetFieldDescriptor(int index)Gets theFieldDescriptorat the specified (0-based) index.java.util.List<FieldDescriptor>getFieldDescriptors()inthashCode()java.util.Iterator<FieldDescriptor>iterator()java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
getDatatypeCoderpublic DatatypeCoder getDatatypeCoder() - Returns:
- The DatatypeCoder.
 
 - 
getEncodingFactorypublic IEncodingFactory getEncodingFactory() - Returns:
- The IEncodingFactory.
 
 - 
getCountpublic int getCount() - Returns:
- The number of fields.
 
 - 
getFieldDescriptorpublic FieldDescriptor getFieldDescriptor(int index) Gets theFieldDescriptorat the specified (0-based) index.- Parameters:
- index- 0-based index of the field
- Returns:
- FieldDescriptor
- Throws:
- java.lang.IndexOutOfBoundsException- if index is not- 0 <= index < getCount
 
 - 
getFieldDescriptorspublic java.util.List<FieldDescriptor> getFieldDescriptors() - Returns:
- An unmodifiable List of the FieldDescriptorinstances of this row.
 
 - 
createDefaultFieldValuespublic RowValue 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:
- RowValue.defaultFor(RowDescriptor)
 
 - 
createDeletedRowMarkerpublic RowValue 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 countnumber of rows, all set to null
 
 - 
iteratorpublic java.util.Iterator<FieldDescriptor> iterator() - Specified by:
- iteratorin interface- java.lang.Iterable<FieldDescriptor>
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
createRowDescriptorpublic 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
 
 - 
emptypublic static RowDescriptor empty(DatatypeCoder datatypeCoder) 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
 
 
- 
 
-