Package db
Class ConvertedRecordIterator
- java.lang.Object
-
- db.ConvertedRecordIterator
-
- All Implemented Interfaces:
RecordIterator
public abstract class ConvertedRecordIterator extends java.lang.Object implements RecordIterator
ConvertedRecordIteratorprovides a RecordIterator wrapper for performing record conversion frequently required when using older data.
-
-
Constructor Summary
Constructors Change Modifier Constructor Description protectedConvertedRecordIterator(RecordIterator originalIterator, boolean deleteAllowed)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Change Modifier and Type Method Description NEW protected 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.booleanhasPrevious()Return true if a Record is available in the reverse directionMODIFIED DBRecordnext()Return the nexy Record or null if one is not available.MODIFIED DBRecordprevious()Return the previous Record or null if one is not available.REMOVED RecordconvertRecord(Record record) (Removed)
-
-
-
Constructor Detail
-
ConvertedRecordIterator
protected ConvertedRecordIterator(RecordIterator originalIterator, boolean deleteAllowed)
Constructor.- Parameters:
originalIterator-deleteAllowed- if false and delete is attempted, delete will throw an UnsupportedOperationException
-
-
Method Detail
-
delete
public boolean delete() throws java.io.IOExceptionDescription 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:
java.io.IOException- thrown if an IO error occurs.- See Also:
RecordIterator.delete()
-
hasNext
public boolean hasNext() throws java.io.IOExceptionDescription copied from interface:RecordIteratorReturn true if a Record is available in the forward direction.- Specified by:
hasNextin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.hasNext()
-
hasPrevious
public boolean hasPrevious() throws java.io.IOExceptionDescription copied from interface:RecordIteratorReturn true if a Record is available in the reverse direction- Specified by:
hasPreviousin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.hasPrevious()
-
next MODIFIED
return type: Record → DBRecord-db.Record next() throws IOException+db.DBRecord next() throws IOExceptionpublic DBRecord next() throws java.io.IOException
Description copied from interface:RecordIteratorReturn the nexy Record or null if one is not available.- Specified by:
nextin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.next()
-
previous MODIFIED
return type: Record → DBRecord-db.Record previous() throws IOException+db.DBRecord previous() throws IOExceptionpublic DBRecord previous() throws java.io.IOException
Description copied from interface:RecordIteratorReturn the previous Record or null if one is not available.- Specified by:
previousin interfaceRecordIterator- Throws:
java.io.IOException- thrown if an IO error occurs- See Also:
RecordIterator.previous()
-
-