Package db
Class ConvertedRecordIterator
java.lang.Object
db.ConvertedRecordIterator
- All Implemented Interfaces:
RecordIterator
ConvertedRecordIterator provides a RecordIterator wrapper
for performing record conversion frequently required when using older
data.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConvertedRecordIterator(RecordIterator originalIterator, boolean deleteAllowed) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract DBRecordconvertRecord(DBRecord record) Convert a record supplied by the underlying RecordIterator.booleandelete()Delete the last Record read via the next or previous methods.booleanhasNext()Return true if a Record is available in the forward direction.booleanReturn true if a Record is available in the reverse directionnext()Return the next Record or null if one is not available.previous()Return the previous Record or null if one is not available.
-
Constructor Details
-
ConvertedRecordIterator
Constructor.- Parameters:
originalIterator-deleteAllowed- if false and delete is attempted, delete will throw an UnsupportedOperationException
-
-
Method Details
-
delete
Description copied from interface:RecordIteratorDelete the last Record read via the next or previous methods.- Specified by:
deletein interfaceRecordIterator- Returns:
- true if record was successfully deleted.
- Throws:
IOException- thrown if an IO error occurs.- See Also:
-
hasNext
Description copied from interface:RecordIteratorReturn true if a Record is available in the forward direction.- Specified by:
hasNextin interfaceRecordIterator- Throws:
IOException- thrown if an IO error occurs- See Also:
-
hasPrevious
Description copied from interface:RecordIteratorReturn true if a Record is available in the reverse direction- Specified by:
hasPreviousin interfaceRecordIterator- Throws:
IOException- thrown if an IO error occurs- See Also:
-
next
Description copied from interface:RecordIteratorReturn the next Record or null if one is not available.- Specified by:
nextin interfaceRecordIterator- Throws:
IOException- thrown if an IO error occurs- See Also:
-
previous
Description copied from interface:RecordIteratorReturn the previous Record or null if one is not available.- Specified by:
previousin interfaceRecordIterator- Throws:
IOException- thrown if an IO error occurs- See Also:
-
convertRecord
Convert a record supplied by the underlying RecordIterator.- Parameters:
record-- Returns:
- converted record
-