public abstract class AbstractCursor extends Object implements Cursor
Derived class needs to provide AbstractCursor.Getter
and can override
Cursor.Accessor
implementations if it
wishes.
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractCursor.AbstractGetter
Abstract implementation of
AbstractCursor.Getter . |
static class |
AbstractCursor.ArrayAccessor
Accessor that assumes that the underlying value is an ARRAY;
corresponds to
Types.ARRAY . |
protected static interface |
AbstractCursor.Getter
Gets a value from a particular field of the current record of this
cursor.
|
class |
AbstractCursor.SlotGetter
Implementation of
AbstractCursor.Getter that returns the current contents of
a mutable slot. |
class |
AbstractCursor.StructGetter
Implementation of
AbstractCursor.Getter that returns the value of a given field
of the current contents of another getter. |
Cursor.Accessor
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
wasNull
Slot into which each accessor should write whether the
value returned was null.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractCursor() |
Modifier and Type | Method and Description |
---|---|
protected Cursor.Accessor |
createAccessor(ColumnMetaData columnMetaData,
AbstractCursor.Getter getter,
Calendar localCalendar,
ArrayImpl.Factory factory) |
protected Cursor.Accessor |
createAccessor(ColumnMetaData columnMetaData,
int ordinal,
Calendar localCalendar,
ArrayImpl.Factory factory) |
List<Cursor.Accessor> |
createAccessors(List<ColumnMetaData> types,
Calendar localCalendar,
ArrayImpl.Factory factory)
Creates a list of accessors, one per column.
|
protected abstract AbstractCursor.Getter |
createGetter(int ordinal) |
abstract boolean |
next()
Moves to the next row.
|
boolean |
wasNull()
Returns whether the last value returned was null.
|
protected final boolean[] wasNull
public boolean wasNull()
Cursor
public List<Cursor.Accessor> createAccessors(List<ColumnMetaData> types, Calendar localCalendar, ArrayImpl.Factory factory)
Cursor
createAccessors
in interface Cursor
types
- List of column types, per Types
.localCalendar
- Calendar in local time zonefactory
- Factory that creates sub-ResultSets when neededprotected Cursor.Accessor createAccessor(ColumnMetaData columnMetaData, int ordinal, Calendar localCalendar, ArrayImpl.Factory factory)
protected Cursor.Accessor createAccessor(ColumnMetaData columnMetaData, AbstractCursor.Getter getter, Calendar localCalendar, ArrayImpl.Factory factory)
protected abstract AbstractCursor.Getter createGetter(int ordinal)
Copyright © 2012-2024 Apache Software Foundation. All Rights Reserved.