Creates a new Cursor This method wraps the native ups_cursor_create function. Creates a new Database Cursor. Cursors can be used to traverse the Database from start to end or vice versa. Cursors can also be used to insert, delete or search Database items. More information: <a href="http:
(Database db, Transaction txn)
| 91 | * @param txn an optional Transaction object |
| 92 | */ |
| 93 | public void create(Database db, Transaction txn) |
| 94 | throws DatabaseException { |
| 95 | m_db = db; |
| 96 | m_handle = ups_cursor_create(db.getHandle(), |
| 97 | txn != null ? txn.getHandle() : 0); |
| 98 | if (m_handle == 0) |
| 99 | throw new DatabaseException(Const.UPS_INTERNAL_ERROR); |
| 100 | m_db.addCursor(this); |
| 101 | } |
| 102 | |
| 103 | /* |
| 104 | * Constructor - creates a new Cursor of a Database |