public class NonScrollablePamCursor extends PamCursor
When the cursor is opened, all data are fetched into memory buffers and the statement used to fetch the data is closed.
The data consist of arrays of type Object. These can be fetched and scrolled through as though we were using a scrollable cursor working on the database.
Whenever a row is updated, a simpel query which updates that single row get's called.
Constructor and Description |
---|
NonScrollablePamCursor(EmptyTableDefinition tableDefinition) |
Modifier and Type | Method and Description |
---|---|
boolean |
absolute(int row)
Go t0 an absolute row number
|
void |
afterLast() |
void |
beforeFirst() |
void |
close() |
boolean |
closeScrollableCursor()
Close the scrollable cursor.
|
void |
deleteRow() |
int |
findColumn(java.lang.String columnLabel) |
boolean |
first() |
boolean |
getBoolean(int columnIndex) |
byte |
getByte(int columnIndex) |
java.sql.Date |
getDate(int columnIndex) |
java.sql.Date |
getDate(int columnIndex,
java.util.Calendar cal) |
double |
getDouble(int columnIndex) |
float |
getFloat(int columnIndex) |
int |
getInt(int columnIndex) |
long |
getLong(int columnIndex) |
java.lang.Object |
getObject(int columnIndex) |
int |
getRow()
Retrieves the current row number.
|
java.sql.RowId |
getRowId(int columnIndex) |
java.lang.String |
getString(int columnIndex) |
java.sql.Time |
getTime(int columnIndex) |
java.sql.Timestamp |
getTimestamp(int columnIndex) |
int |
insertRow(boolean getIndex)
Insert row statement
|
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isClosed() |
boolean |
isFirst() |
boolean |
isLast() |
boolean |
last() |
void |
moveToCurrentRow() |
void |
moveToInsertRow() |
boolean |
next() |
boolean |
openScrollableCursor(java.sql.Connection connection,
boolean includeKeys,
boolean includeCounters,
java.lang.String clause)
Open a scrollable cursor
|
boolean |
previous() |
void |
refreshRow() |
boolean |
rowDeleted() |
boolean |
rowInserted() |
boolean |
rowUpdated() |
void |
updateBoolean(int columnIndex,
boolean x) |
void |
updateByte(int columnIndex,
byte x) |
boolean |
updateDatabase()
Push everything down onto the database
|
void |
updateInt(int columnIndex,
int x) |
void |
updateLong(int columnIndex,
long x) |
void |
updateNull(int columnIndex) |
void |
updateObject(int columnIndex,
java.lang.Object x) |
void |
updateRow() |
void |
updateShort(int columnIndex,
short x) |
void |
updateString(int columnIndex,
java.lang.String x) |
void |
updateTimestamp(int columnIndex,
java.sql.Timestamp x) |
getCurrentConnection, getInsertString, getSelectString, getSelectString, getTableDefinition, getUpdateString, immediateInsert, immediateUpdate, moveDataToCursor, moveDataToTableDef, openInsertCursor, openReadOnlyCursor, setCurrentConnection
public NonScrollablePamCursor(EmptyTableDefinition tableDefinition)
public boolean openScrollableCursor(java.sql.Connection connection, boolean includeKeys, boolean includeCounters, java.lang.String clause)
PamCursor
openScrollableCursor
in class PamCursor
connection
- database connectionincludeKeys
- include keysincludeCounters
- inlcude countersclause
- selection and ordering clause.public boolean closeScrollableCursor()
PamCursor
closeScrollableCursor
in class PamCursor
public boolean updateDatabase()
PamCursor
updateDatabase
in class PamCursor
public boolean absolute(int row)
PamCursor
Note that row numbers are 1 indexed.
public void beforeFirst()
beforeFirst
in class PamCursor
public int findColumn(java.lang.String columnLabel)
findColumn
in class PamCursor
public int getRow() throws java.sql.SQLException
PamCursor
public java.lang.Object getObject(int columnIndex)
public boolean getBoolean(int columnIndex)
getBoolean
in class PamCursor
public java.sql.Date getDate(int columnIndex, java.util.Calendar cal)
public java.lang.String getString(int columnIndex)
public java.sql.Timestamp getTimestamp(int columnIndex)
getTimestamp
in class PamCursor
public boolean isAfterLast()
isAfterLast
in class PamCursor
public boolean isBeforeFirst()
isBeforeFirst
in class PamCursor
public void moveToCurrentRow()
moveToCurrentRow
in class PamCursor
public void moveToInsertRow()
moveToInsertRow
in class PamCursor
public int insertRow(boolean getIndex)
PamCursor
public void refreshRow()
refreshRow
in class PamCursor
public boolean rowDeleted()
rowDeleted
in class PamCursor
public boolean rowInserted()
rowInserted
in class PamCursor
public boolean rowUpdated()
rowUpdated
in class PamCursor
public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLException
updateObject
in class PamCursor
java.sql.SQLException
public void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLException
updateBoolean
in class PamCursor
java.sql.SQLException
public void updateByte(int columnIndex, byte x) throws java.sql.SQLException
updateByte
in class PamCursor
java.sql.SQLException
public void updateInt(int columnIndex, int x) throws java.sql.SQLException
public void updateLong(int columnIndex, long x) throws java.sql.SQLException
updateLong
in class PamCursor
java.sql.SQLException
public void updateNull(int columnIndex) throws java.sql.SQLException
updateNull
in class PamCursor
java.sql.SQLException
public void updateRow() throws java.sql.SQLException
public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLException
updateString
in class PamCursor
java.sql.SQLException
public void updateShort(int columnIndex, short x) throws java.sql.SQLException
updateShort
in class PamCursor
java.sql.SQLException
public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLException
updateTimestamp
in class PamCursor
java.sql.SQLException