|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jora.Cursor
Cursor is used for successive access to records fetched by SELECT statement. As far as records can be retrived from several derived tables (polymorphic form of select), this class can issue several requests to database. Cursor also provides methods for updating/deleting current record.
Method Summary | |
void |
delete()
Delete current record pointed by cursor. |
java.lang.Object |
next()
A cursor is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc. |
java.lang.Object[] |
toArray()
Store all objects returned by SELECT query into array of Object. |
java.lang.Object[] |
toArray(int maxElements)
Extracts no more than maxElements records from database and store them into array. |
void |
update()
Update current record pointed by cursor. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public java.lang.Object next()
If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read.
public void update()
If you are going to update or delete selected records, you should add
"for update" clause to select statement. So parameter of
jora.Table.select()
statement should contain "for update"
clause:
record.table.Select("where name='xyz' for update");
Attention! Not all database drivers support update operation with cursor. This method will not work with such database drivers.
public void delete()
If you are going to update or delete selected records, you should add
"for update" clause to select statement. So parameter of
jora.Table.select()
statement should contain "for update"
clause:
record.table.Select("where name='xyz' for update");
Attention! Not all database drivers support delete operation with cursor. This method will not work with such database drivers.
public java.lang.Object[] toArray(int maxElements)
maxElements
- limitation for result array size (and also for number
of fetched records)public java.lang.Object[] toArray()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |