|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.android.rms.SqlRecordEnumeration
public class SqlRecordEnumeration
| Constructor Summary | |
|---|---|
SqlRecordEnumeration(RecordStore recordStore,
RecordFilter filter,
RecordComparator comparator,
boolean keepUpdated)
|
|
| Method Summary | |
|---|---|
void |
destroy()
Frees internal resources used by this RecordEnumeration. |
boolean |
hasNextElement()
Returns true if more elements exist in the next direction. |
boolean |
hasPreviousElement()
Returns true if more elements exist in the previous direction. |
boolean |
isKeptUpdated()
Returns true if the enumeration keeps its enumeration current with any changes in the records. |
void |
keepUpdated(boolean keepUpdated2)
Used to set whether the enumeration will be keep its internal index up to date with the record store record additions/deletions/changes. |
byte[] |
nextRecord()
Returns a copy of the next record in this enumeration, where next is defined by the comparator and/or filter supplied in the constructor of this enumerator. |
int |
nextRecordId()
Returns the recordId of the next record in this enumeration, where next is defined by the comparator and/or filter supplied in the constructor of this enumerator. |
int |
numRecords()
Returns the number of records available in this enumeration's set. |
byte[] |
previousRecord()
Returns a copy of the previous record in this enumeration, where previous is defined by the comparator and/or filter supplied in the constructor of this enumerator. |
int |
previousRecordId()
Returns the recordId of the previous record in this enumeration, where previous is defined by the comparator and/or filter supplied in the constructor of this enumerator. |
void |
rebuild()
Request that the enumeration be updated to reflect the current record set. |
void |
reset()
Returns the enumeration index to the same state as right after the enumeration was created. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlRecordEnumeration(RecordStore recordStore,
RecordFilter filter,
RecordComparator comparator,
boolean keepUpdated)
| Method Detail |
|---|
public void destroy()
RecordEnumerationIllegalStateException. Note that this method is
used for manually aiding in the minimization of immediate
resource requirements when this enumeration is no longer
needed.
destroy in interface RecordEnumerationpublic boolean hasNextElement()
RecordEnumeration
hasNextElement in interface RecordEnumerationpublic boolean hasPreviousElement()
RecordEnumeration
hasPreviousElement in interface RecordEnumerationpublic boolean isKeptUpdated()
RecordEnumeration
isKeptUpdated in interface RecordEnumerationpublic void keepUpdated(boolean keepUpdated2)
RecordEnumeration
keepUpdated in interface RecordEnumerationkeepUpdated2 - - if true, the enumerator will keep its enumeration current with any changes in the records of the record store. Use with caution as there are possible performance consequences. Calling keepUpdated(true) has the same effect as calling RecordEnumeration.rebuild: the enumeration will be updated to reflect the current record set. If false the enumeration will not be kept current and may return recordIds for records that have been deleted or miss records that are added later. It may also return records out of order that have been modified after the enumeration was built. Note that any changes to records in the record store are accurately reflected when the record is later retrieved, either directly or through the enumeration. The thing that is risked by setting this parameter false is the filtering and sorting order of the enumeration when records are modified, added, or deleted.RecordEnumeration.rebuild()
public byte[] nextRecord()
throws InvalidRecordIDException,
RecordStoreNotOpenException,
RecordStoreException
RecordEnumeration
nextRecord in interface RecordEnumerationInvalidRecordIDException - - when no more records are available. Subsequent calls to this method will continue to throw this exception until reset() has been called to reset the enumeration.
RecordStoreNotOpenException - - if the record store is not open
RecordStoreException - - if a general record store exception occurs
public int nextRecordId()
throws InvalidRecordIDException
RecordEnumeration
nextRecordId in interface RecordEnumerationInvalidRecordIDException - - when no more records are available. Subsequent calls to this method will continue to throw this exception until reset() has been called to reset the enumeration.public int numRecords()
RecordEnumeration
numRecords in interface RecordEnumeration
public byte[] previousRecord()
throws InvalidRecordIDException,
RecordStoreNotOpenException,
RecordStoreException
RecordEnumeration
previousRecord in interface RecordEnumerationInvalidRecordIDException - - when no more records are available. Subsequent calls to this method will continue to throw this exception until reset() has been called to reset the enumeration.
RecordStoreNotOpenException - - if the record store is not open
RecordStoreException - - if a general record store exception occurs.
public int previousRecordId()
throws InvalidRecordIDException
RecordEnumeration
previousRecordId in interface RecordEnumerationInvalidRecordIDException - - when no more records are available. Subsequent calls to this method will continue to throw this exception until reset() has been called to reset the enumeration.public void rebuild()
RecordEnumeration
rebuild in interface RecordEnumerationRecordEnumeration.keepUpdated(boolean)public void reset()
RecordEnumeration
reset in interface RecordEnumeration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||