com.funambol.storage
Class BlackberryRecordEnumeration

java.lang.Object
  extended by com.funambol.storage.BlackberryRecordEnumeration
All Implemented Interfaces:
javax.microedition.rms.RecordEnumeration

public class BlackberryRecordEnumeration
extends java.lang.Object
implements javax.microedition.rms.RecordEnumeration


Constructor Summary
BlackberryRecordEnumeration(BlackberryRecordStore records, net.rim.device.api.util.IntVector valueSortedKeys, boolean keepUpdated)
           
 
Method Summary
 void destroy()
           
 javax.microedition.rms.RecordComparator getParentRecordComparator()
           
 javax.microedition.rms.RecordFilter getParentRecordFilter()
           
 boolean hasNextElement()
           
 boolean hasPreviousElement()
           
 boolean isKeptUpdated()
           
 void keepUpdated(boolean keepUpdated)
           
 byte[] nextRecord()
          Returns a copy of the next record in this enumeration.
 int nextRecordId()
          Returns the next recordId in this enumeration.
 int numRecords()
          Returns the number of records available in this enumeration.
 byte[] previousRecord()
          Returns a copy of the previous record in this enumeration.
 int previousRecordId()
          Returns the recordId of the previous record in the enumeration.
 void rebuild()
          Rebuilds the current enumeration to reflect changes in the record store.
 void recordAdded(int recordId)
           
 void recordChanged(int recordId)
           
 void recordDeleted(int recordId)
           
 void recordStoreClosing()
           
 void reset()
           
 void setParentRecordComparator(javax.microedition.rms.RecordComparator parentRecordComparator)
           
 void setParentRecordFilter(javax.microedition.rms.RecordFilter parentRecordFilter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlackberryRecordEnumeration

public BlackberryRecordEnumeration(BlackberryRecordStore records,
                                   net.rim.device.api.util.IntVector valueSortedKeys,
                                   boolean keepUpdated)
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface javax.microedition.rms.RecordEnumeration

hasNextElement

public boolean hasNextElement()
Specified by:
hasNextElement in interface javax.microedition.rms.RecordEnumeration

hasPreviousElement

public boolean hasPreviousElement()
Specified by:
hasPreviousElement in interface javax.microedition.rms.RecordEnumeration

isKeptUpdated

public boolean isKeptUpdated()
Specified by:
isKeptUpdated in interface javax.microedition.rms.RecordEnumeration

keepUpdated

public void keepUpdated(boolean keepUpdated)
Specified by:
keepUpdated in interface javax.microedition.rms.RecordEnumeration

nextRecord

public byte[] nextRecord()
                  throws javax.microedition.rms.InvalidRecordIDException,
                         javax.microedition.rms.RecordStoreNotOpenException,
                         javax.microedition.rms.RecordStoreException
Returns a copy of the next record in this enumeration. Changes made to the object will not be reflected in the RecordStore

Specified by:
nextRecord in interface javax.microedition.rms.RecordEnumeration
Returns:
The next record in the enumeration
Throws:
javax.microedition.rms.InvalidRecordIDException - When no more records are available
javax.microedition.rms.RecordStoreNotOpenException - If the record store is not open
javax.microedition.rms.RecordStoreException

nextRecordId

public int nextRecordId()
                 throws javax.microedition.rms.InvalidRecordIDException
Returns the next recordId in this enumeration.

Specified by:
nextRecordId in interface javax.microedition.rms.RecordEnumeration
Returns:
The next record in the enumeration
Throws:
javax.microedition.rms.InvalidRecordIDException - When no more records are available

numRecords

public int numRecords()
Returns the number of records available in this enumeration.

Specified by:
numRecords in interface javax.microedition.rms.RecordEnumeration
Returns:
Number of records in the enumeration

previousRecord

public byte[] previousRecord()
                      throws javax.microedition.rms.InvalidRecordIDException,
                             javax.microedition.rms.RecordStoreNotOpenException,
                             javax.microedition.rms.RecordStoreException
Returns a copy of the previous record in this enumeration. The byte array returned is a copy of the RecordStore record and changes will not be reflected in the store.

Specified by:
previousRecord in interface javax.microedition.rms.RecordEnumeration
Returns:
Byte array of the record
Throws:
javax.microedition.rms.InvalidRecordIDException - When no more records are available
javax.microedition.rms.RecordStoreNotOpenException - When the parent record store is closed
javax.microedition.rms.RecordStoreException - If a general record store exception occurs

previousRecordId

public int previousRecordId()
                     throws javax.microedition.rms.InvalidRecordIDException
Returns the recordId of the previous record in the enumeration.

Specified by:
previousRecordId in interface javax.microedition.rms.RecordEnumeration
Returns:
RecordId of the next element
Throws:
javax.microedition.rms.InvalidRecordIDException - when no more records are available;s

rebuild

public void rebuild()
Rebuilds the current enumeration to reflect changes in the record store.

Specified by:
rebuild in interface javax.microedition.rms.RecordEnumeration

reset

public void reset()
Specified by:
reset in interface javax.microedition.rms.RecordEnumeration

recordAdded

public void recordAdded(int recordId)

recordChanged

public void recordChanged(int recordId)

recordDeleted

public void recordDeleted(int recordId)

recordStoreClosing

public void recordStoreClosing()

getParentRecordFilter

public javax.microedition.rms.RecordFilter getParentRecordFilter()

setParentRecordFilter

public void setParentRecordFilter(javax.microedition.rms.RecordFilter parentRecordFilter)

getParentRecordComparator

public javax.microedition.rms.RecordComparator getParentRecordComparator()

setParentRecordComparator

public void setParentRecordComparator(javax.microedition.rms.RecordComparator parentRecordComparator)


Copyright © 2001-2009 Funambol.