Java Doc for RecordEnumerationImpl.java in  » 6.0-JDK-Modules » j2me » javax » microedition » rms » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » javax.microedition.rms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.microedition.rms.RecordEnumerationImpl

RecordEnumerationImpl
class RecordEnumerationImpl implements RecordEnumeration,RecordListener(Code)
This class implements the RecordEnumeration interface.



Constructor Summary
 RecordEnumerationImpl(RecordStore inp_recordStore, RecordFilter inp_filter, RecordComparator inp_comparator, boolean keepUpdated)
     Builds an enumeration to traverse a set of records in the given record store in an optionally specified order.

The filter, if non-null, will be used to determine what subset of the record store records will be used.

The comparator, if non-null, will be used to determine the order in which the records are returned.

If both the filter and comparator are null, the enumeration will traverse all records in the record store in an undefined order.


Method Summary
public synchronized  voiddestroy()
     Implements RecordEnumeration.destroy() interface.
public  booleanhasNextElement()
     Returns true if more elements exist in the next direction.
public  booleanhasPreviousElement()
     Returns true if more elements exist in the previous direction.
public  booleanisKeptUpdated()
     Returns true if the enumeration keeps its enumeration current with any changes in the records.
public  voidkeepUpdated(boolean keepUpdated)
     Used to set whether the enumeration should be registered as a listener of the record store, and rebuild its internal index with every record addition/deletion in the record store. Note that this should be used carefully due to the potential performance cost associated with maintaining the enumeration with every change.
Parameters:
  keepUpdated - if true, the enumerator will keep its enumerationcurrent with any changes in the records of the record store.Use with caution as there are possible performance consequences.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.
public synchronized  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.
public synchronized  intnextRecordId()
     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.
public synchronized  intnumRecords()
     Returns the number of records available in this enumeration's set.
public synchronized  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.
public synchronized  intpreviousRecordId()
     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.
public  voidrebuild()
     Request that the enumeration be updated to reflect the current record set.
public synchronized  voidrecordAdded(RecordStore inp_recordStore, int recordId)
     From the RecordListener interface.
public synchronized  voidrecordChanged(RecordStore inp_recordStore, int recordId)
     From the RecordListener interface.
public synchronized  voidrecordDeleted(RecordStore inp_recordStore, int recordId)
     From the RecordListener interface.
public  voidreset()
     Returns the index point of the enumeration to the beginning.


Constructor Detail
RecordEnumerationImpl
RecordEnumerationImpl(RecordStore inp_recordStore, RecordFilter inp_filter, RecordComparator inp_comparator, boolean keepUpdated)(Code)
Builds an enumeration to traverse a set of records in the given record store in an optionally specified order.

The filter, if non-null, will be used to determine what subset of the record store records will be used.

The comparator, if non-null, will be used to determine the order in which the records are returned.

If both the filter and comparator are null, the enumeration will traverse all records in the record store in an undefined order. This is the most efficient way to traverse all of the records in a record store.
Parameters:
  inp_recordStore - the RecordStore to enumerate.
Parameters:
  inp_filter - if non-null, will be used to determine whatsubset of the record store records will be used.
Parameters:
  inp_comparator - if non-null, will be used to determine theorder in which the records are returned.
Parameters:
  keepUpdated - if true, the enumerator will keep its enumerationcurrent with any changes in the records of the record store. Use with caution as there are performance consequences.
See Also:   RecordEnumerationImpl.rebuild





Method Detail
destroy
public synchronized void destroy()(Code)
Implements RecordEnumeration.destroy() interface. Called to signal that this enumeration will no longer be used, and that its resources may be collected.



hasNextElement
public boolean hasNextElement()(Code)
Returns true if more elements exist in the next direction. true if more elements exist in the next direction.



hasPreviousElement
public boolean hasPreviousElement()(Code)
Returns true if more elements exist in the previous direction. true if more elements exist in the previous direction.



isKeptUpdated
public boolean isKeptUpdated()(Code)
Returns true if the enumeration keeps its enumeration current with any changes in the records. true if the enumeration keeps its enumerationcurrent with any changes in the records



keepUpdated
public void keepUpdated(boolean keepUpdated)(Code)
Used to set whether the enumeration should be registered as a listener of the record store, and rebuild its internal index with every record addition/deletion in the record store. Note that this should be used carefully due to the potential performance cost associated with maintaining the enumeration with every change.
Parameters:
  keepUpdated - if true, the enumerator will keep its enumerationcurrent with any changes in the records of the record store.Use with caution as there are possible performance consequences.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 outof order that have been modified after the enumeration was built.
See Also:   RecordEnumerationImpl.rebuild



nextRecord
public synchronized byte[] nextRecord() throws InvalidRecordIDException, RecordStoreNotOpenException, RecordStoreException(Code)
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. The byte array returned is a copy of the record. Any changes made to this array will NOT be reflected in the record store. After calling this method, the enumeration is advanced to the next available record.
exception:
  InvalidRecordIDException - no more records are available the next record in this enumeration.



nextRecordId
public synchronized int nextRecordId() throws InvalidRecordIDException(Code)
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. After calling this method, the enumeration is advanced to the next available record.
exception:
  InvalidRecordIDException - no more records are available. the recordId of the next record in this enumeration.



numRecords
public synchronized int numRecords()(Code)
Returns the number of records available in this enumeration's set. That is, the number of records that have matched the filter criterion. Note that this forces the RecordEnumeration to fully build the enumeration by applying the filter to all records, which may take a non-trivial amount of time if there are a lot of records in the record store. the number of records available in this enumeration'sset. That is, the number of records that have matched the filter criterion.



previousRecord
public synchronized byte[] previousRecord() throws InvalidRecordIDException, RecordStoreNotOpenException, RecordStoreException(Code)
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. The byte array returned is a copy of the record. Any changes made to this array will NOT be reflected in the record store. After calling this method, the enumeration is advanced to the next (previous) available record.
exception:
  InvalidRecordIDException - no more records are available. the previous record in this enumeration.



previousRecordId
public synchronized int previousRecordId() throws InvalidRecordIDException(Code)
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. After this method is called, the enumeration is advanced to the next (previous) available record.
exception:
  InvalidRecordIDException - when no more records are available. the recordId of the previous record in this enumeration.



rebuild
public void rebuild()(Code)
Request that the enumeration be updated to reflect the current record set. Useful for when an application makes a number of changes to the record store, and then wants an existing RecordEnumeration to enumerate the new changes.
See Also:   RecordEnumerationImpl.keepUpdated



recordAdded
public synchronized void recordAdded(RecordStore inp_recordStore, int recordId)(Code)
From the RecordListener interface. This method is called if a record is added to recordStore.
Parameters:
  inp_recordStore - the record store to which a record was added
Parameters:
  recordId - the record ID of the new record



recordChanged
public synchronized void recordChanged(RecordStore inp_recordStore, int recordId)(Code)
From the RecordListener interface. This method is called if a record in recordStore is modified.
Parameters:
  inp_recordStore - the record store in which a record was modified
Parameters:
  recordId - the record ID of the modified record.



recordDeleted
public synchronized void recordDeleted(RecordStore inp_recordStore, int recordId)(Code)
From the RecordListener interface. This method is called when a record in recordStore is deleted.
Parameters:
  inp_recordStore - the record store from which a record was deleted
Parameters:
  recordId - the record id of the deleted record



reset
public void reset()(Code)
Returns the index point of the enumeration to the beginning.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.