|
MySQL Connector/J size='-1'>5.0.8 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mysql.jdbc.CursorRowProvider
Model for result set data backed by a cursor. Only works for forward-only result sets (but still works with updatable concurrency).
Field Summary |
Fields inherited from interface com.mysql.jdbc.RowData |
RESULT_SET_SIZE_UNKNOWN |
Constructor Summary | |
CursorRowProvider(com.mysql.jdbc.MysqlIO ioChannel,
ServerPreparedStatement creatingStatement,
Field[] metadata)
Creates a new cursor-backed row provider. |
Method Summary | |
void |
addRow(byte[][] row)
Adds a row to this row data. |
void |
afterLast()
Moves to after last. |
void |
beforeFirst()
Moves to before first. |
void |
beforeLast()
Moves to before last so next el is the last el. |
void |
close()
We're done. |
java.lang.Object[] |
getAt(int ind)
Only works on non dynamic result sets. |
int |
getCurrentRowNumber()
Returns the current position in the result set as a row number. |
ResultSet |
getOwner()
Returns the result set that 'owns' this RowData |
boolean |
hasNext()
Returns true if another row exists. |
boolean |
isAfterLast()
Returns true if we got the last element. |
boolean |
isBeforeFirst()
Returns if iteration has not occured yet. |
boolean |
isDynamic()
Returns true if the result set is dynamic. |
boolean |
isEmpty()
Has no records. |
boolean |
isFirst()
Are we on the first row of the result set? |
boolean |
isLast()
Are we on the last row of the result set? |
void |
moveRowRelative(int rows)
Moves the current position relative 'rows' from the current position. |
java.lang.Object[] |
next()
Returns the next row. |
void |
removeRow(int ind)
Removes the row at the given index. |
void |
setCurrentRow(int rowNumber)
Moves the current position in the result set to the given row number. |
void |
setOwner(ResultSet rs)
Set the result set that 'owns' this RowData |
int |
size()
Only works on non dynamic result sets. |
boolean |
wasEmpty()
Did this result set have no rows? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CursorRowProvider(com.mysql.jdbc.MysqlIO ioChannel, ServerPreparedStatement creatingStatement, Field[] metadata)
ioChannel
- connection to the server.creatingStatement
- statement that opened the cursor.metadata
- field-level metadata for the results that this cursor covers.Method Detail |
public boolean isAfterLast()
isAfterLast
in interface RowData
public java.lang.Object[] getAt(int ind) throws java.sql.SQLException
getAt
in interface RowData
ind
- row number to get at
java.sql.SQLException
- if a database error occurspublic boolean isBeforeFirst() throws java.sql.SQLException
isBeforeFirst
in interface RowData
java.sql.SQLException
- if a database error occurspublic void setCurrentRow(int rowNumber) throws java.sql.SQLException
setCurrentRow
in interface RowData
rowNumber
- row to move to
java.sql.SQLException
- if a database error occurspublic int getCurrentRowNumber() throws java.sql.SQLException
getCurrentRowNumber
in interface RowData
java.sql.SQLException
- if a database error occurspublic boolean isDynamic()
isDynamic
in interface RowData
public boolean isEmpty() throws java.sql.SQLException
isEmpty
in interface RowData
java.sql.SQLException
- if a database error occurspublic boolean isFirst() throws java.sql.SQLException
isFirst
in interface RowData
java.sql.SQLException
- if a database error occurspublic boolean isLast() throws java.sql.SQLException
isLast
in interface RowData
java.sql.SQLException
- if a database error occurspublic void addRow(byte[][] row) throws java.sql.SQLException
addRow
in interface RowData
row
- the row to add
java.sql.SQLException
- if a database error occurspublic void afterLast() throws java.sql.SQLException
afterLast
in interface RowData
java.sql.SQLException
- if a database error occurspublic void beforeFirst() throws java.sql.SQLException
beforeFirst
in interface RowData
java.sql.SQLException
- if a database error occurspublic void beforeLast() throws java.sql.SQLException
beforeLast
in interface RowData
java.sql.SQLException
- if a database error occurspublic void close() throws java.sql.SQLException
close
in interface RowData
java.sql.SQLException
- if a database error occurspublic boolean hasNext() throws java.sql.SQLException
hasNext
in interface RowData
java.sql.SQLException
- if a database error occurspublic void moveRowRelative(int rows) throws java.sql.SQLException
moveRowRelative
in interface RowData
rows
- the relative number of rows to move
java.sql.SQLException
- if a database error occurspublic java.lang.Object[] next() throws java.sql.SQLException
next
in interface RowData
java.sql.SQLException
- if a database error occurspublic void removeRow(int ind) throws java.sql.SQLException
removeRow
in interface RowData
ind
- the row to move to
java.sql.SQLException
- if a database error occurspublic int size()
size
in interface RowData
public void setOwner(ResultSet rs)
RowData
setOwner
in interface RowData
rs
- the result set that 'owns' this RowDatapublic ResultSet getOwner()
RowData
getOwner
in interface RowData
public boolean wasEmpty()
RowData
wasEmpty
in interface RowData
|
MySQL Connector/J size='-1'>5.0.8 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |