org.openorb.pss.connector.file

Class FileIterator

public class FileIterator extends Object implements Iterator

A File iterator is an OpenORB extension to the Persistent State Service.

Author: Jerome Daniel

Constructor Summary
FileIterator(StorageHomeBase home, FileCatalog catalog)
Constructor
Method Summary
StorageObjectdetach()
Returns the current element and detached it from the iterator.
StorageObjectelement()
Returns the current element.
voidfetch(byte[] pid)
Set the current element of the iterator by providing a PID
booleanhasMoreElements()
Returns true if there are some other elements
voidnext()
Shifts to the next element
voidreset()
Resets the iterator to the first element
voidset(int position)
Set the current position for the iterator

Constructor Detail

FileIterator

public FileIterator(StorageHomeBase home, FileCatalog catalog)
Constructor

Method Detail

detach

public StorageObject detach()
Returns the current element and detached it from the iterator.

element

public StorageObject element()
Returns the current element. CAUTION : the element returned is always the same with a new identity ( the current storage type in the home ).

fetch

public void fetch(byte[] pid)
Set the current element of the iterator by providing a PID

hasMoreElements

public boolean hasMoreElements()
Returns true if there are some other elements

next

public void next()
Shifts to the next element

reset

public void reset()
Resets the iterator to the first element

set

public void set(int position)
Set the current position for the iterator