Enum Constant and Description |
---|
CURRENT
Accesses the current record.
|
FIRST
Finds the first record in the database.
|
LAST
Finds the last record in the database.
|
NEXT
Moves to the next record.
|
NEXT_DUP
Moves to the next record with the same key.
|
NEXT_NO_DUP
Moves to the next record with a different key.
|
PREV
Moves to the previous record.
|
PREV_DUP
Moves to the previous record with the same key.
|
PREV_NO_DUP
Moves to the previous record with a different key.
|
SEARCH
Searches using an exact match by key.
|
SEARCH_BOTH
Searches using an exact match by key and data (or pKey).
|
SEARCH_BOTH_GTE
Searches using an exact match by key and a GTE match by data (or pKey).
|
SEARCH_GTE
Searches using a GTE match by key.
|
Modifier and Type | Method and Description |
---|---|
static Get |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Get[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Get SEARCH
Returns, or moves the cursor to, the record having a key exactly matching the given key parameter.
If the database has duplicate keys, the record with the matching key and lowest data value (or the lowest primary key, for secondary databases) is selected.
The operation does not succeed if no record matches.
public static final Get SEARCH_BOTH
Returns, or moves the cursor to, the record having a key exactly matching the given key parameter, and having a data value (or primary key) exactly matching the given data (or pKey) parameter. The data is matched for Database and Cursor operations, while the primary key is matched for SecondaryDatabase and SecondaryCursor operations.
If the database has duplicate keys, the search is performed by key
and data (or pKey) using the database Btree. If the database has does
not have duplicate keys, the search is performed by key alone using the
Btree, and then the data (or primary key) of the matching record is
simply compared to the data (pKey) parameter. In other words, using
this operation has no performance advantage over SEARCH
when
the database does not have duplicates.
The operation does not succeed (null is returned) if no record matches.
public static final Get SEARCH_GTE
Returns, or moves the cursor to, the record with a key that is greater than or equal to (GTE) the given key parameter.
If the database has duplicate keys, the record with the lowest data value (or the lowest primary key, for a secondary database) is selected among the duplicates with the matching key.
The operation does not succeed (null is returned) if no record matches.
public static final Get SEARCH_BOTH_GTE
Returns, or moves the cursor to, the record with a key exactly matching the given key parameter, and having a data value (or primary key) that is greater than or equal to (GTE) the given data (or pKey) parameter. The data is matched for Database and Cursor operations, while the primary key is matched for SecondaryDatabase and SecondaryCursor operations.
If the database does not have duplicate keys, the data (or pKey) is
matched exactly and this operation is equivalent to SEARCH_BOTH
.
The operation does not succeed (null is returned) if no record matches.
public static final Get CURRENT
Accesses the record at the current cursor position. If the cursor is
uninitialized (not positioned on a record), IllegalStateException
is thrown.
The operation does not succeed (null is returned) if the record at the current position has been deleted. This can occur in two cases: 1. If the record was deleted using this cursor and then accessed. 2. If the record was not locked by this cursor or transaction, and was deleted by another thread or transaction after this cursor was positioned on it.
public static final Get FIRST
Moves the cursor to the record in the database with the lowest valued key.
If the database has duplicate keys, the record with the lowest data value (or the lowest primary key, for a secondary database) is selected among the duplicates for the lowest key.
The operation does not succeed (null is returned) if the database is empty.
public static final Get LAST
Moves the cursor to the record in the database with the highest valued key.
If the database has duplicate keys, the record with the highest data value (or the highest primary key, for a secondary database) is selected among the duplicates for the highest key.
The operation does not succeed (null is returned) if the database is empty.
public static final Get NEXT
Moves the cursor to the record following the record at the current
cursor position. If the cursor is uninitialized (not positioned on a
record), moves to the first record and this operation is equivalent to
FIRST
.
If the database does not have duplicate keys, the following record is defined as the record with the next highest key. If the database does have duplicate keys, the following record is defined as the record with the same key and the next highest data value (or the next highest primary key, for a secondary database) among the duplicates for that key; or if there are no more records with the same key, the following record is the record with the next highest key and the lowest data value (or the lowest primary key, for a secondary database) among the duplicates for that key.
The operation does not succeed (null is returned) if the record at the cursor position is the last record in the database.
public static final Get NEXT_DUP
Moves the cursor to the record following the record at the current
cursor position and having the same key. If the cursor is uninitialized
(not positioned on a record), IllegalStateException
is
thrown.
If the database has duplicate keys, moves to the record with the same key and the next highest data value (or the next highest primary key, for a secondary database) among the duplicates for that key.
The operation does not succeed (null is returned) if there are no following records with the same key. This is always the case when database does not have duplicate keys.
public static final Get NEXT_NO_DUP
Moves the cursor to the record following the record at the current
cursor position and having the next highest key. If the cursor is
uninitialized (not positioned on a record), moves to the first record
and this operation is equivalent to FIRST
.
If the database has duplicate keys, moves to the record with the next
highest key and the lowest data value (or the lowest primary key, for a
secondary database) among the duplicates for that key; this effectively
skips over records having the same key and a higher data value (or a
higher primary key, for a secondary database). If the database does not
have duplicate keys, this operation is equivalent to NEXT
.
The operation does not succeed (null is returned) if there are no following records with a different key.
public static final Get PREV
Moves the cursor to the record preceding the record at the current
cursor position. If the cursor is uninitialized (not positioned on a
record), moves to the last record and this operation is equivalent to
LAST
.
If the database does not have duplicate keys, the preceding record is defined as the record with the next lowest key. If the database does have duplicate keys, the preceding record is defined as the record with the same key and the next lowest data value (or the next lowest primary key, for a secondary database) among the duplicates for that key; or if there are no preceding records with the same key, the preceding record is the record with the next lowest key and the highest data value (or the highest primary key, for a secondary database) among the duplicates for that key.
The operation does not succeed (null is returned) if the record at the cursor position is the first record in the database.
public static final Get PREV_DUP
Moves the cursor to the record preceding the record at the current
cursor position and having the same key. If the cursor is uninitialized
(not positioned on a record), IllegalStateException
is
thrown.
If the database has duplicate keys, moves to the record with the same key and the next lowest data value (or the next lowest primary key, for a secondary database) among the duplicates for that key.
The operation does not succeed (null is returned) if there are no preceding records with the same key. This is always the case when database does not have duplicate keys.
public static final Get PREV_NO_DUP
Moves the cursor to the record preceding the record at the current
cursor position and having the next lowest key. If the cursor is
uninitialized (not positioned on a record), moves to the last record
and this operation is equivalent to LAST
.
If the database has duplicate keys, moves to the record with the next
lowest key and the highest data value (or the highest primary key, for a
secondary database) among the duplicates for that key; this effectively
skips over records having the same key and a lower data value (or a
lower primary key, for a secondary database). If the database does not
have duplicate keys, this operation is equivalent to PREV
.
The operation does not succeed (null is returned) if there are no preceding records with a different key.
public static Get[] values()
for (Get c : Get.values()) System.out.println(c);
public static Get valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.