SlideShare une entreprise Scribd logo
1  sur  26
Class RecordStore

http://improvejava.blogspot.in
• This RecordStore class provides methods for
creating, writing, and reading data from
recordstores.
• A class representing a record store. A record store
consists of a collection of records which will
remain persistent across multiple invocations of
the MIDlet. The platform is responsible for
making its best effort to maintain the integrity of
the MIDlet's record stores throughout the normal
use of the platform, including reboots, battery
changes, etc.
http://improvejava.blogspot.in
syntax
• javax.microedition.rms.RecordStore
• public class RecordStore extends Object

http://improvejava.blogspot.in
RecordStore methods
•
•
•
•
•
•
•

(1) openRecordStore()
(2)closeRecordStore()
(3)deleteRecordStore
(4)addRecord()
(5)deleteRecord()
(6)getRecord()
(7)setMode()
http://improvejava.blogspot.in
openRecordStore()
• Open (and possibly create) or create a record
store associated with the given MIDlet suite.
And returns a RecordStore reference.
• If this method is called by a MIDlet when the
record store is already open by a MIDlet in the
MIDlet suite, this method returns a reference
to the same RecordStore object.

http://improvejava.blogspot.in
• The openRecordStore() method requires two
parameters. The first parameter is a string
containing the name of the record store.
• The second parameter is a boolean value
indicating whether the record store should be
created if the record store doesn’t exist. A true
value causes the record store to be created
• if the record store isn’t in the MIDlet suite and
also opens the record store.
• A false value does not create the record store if
the record store isn’t located.
http://improvejava.blogspot.in
openRecordStore() syntax
• public static RecordStore
openRecordStore(String recordStoreName,
boolean createIfNecessary) throws
RecordStoreException,
RecordStoreFullException,
RecordStoreNotFoundException

http://improvejava.blogspot.in
• Parameters:recordStoreName - the MIDlet suite unique
name for the record store, consisting of between one and
32 Unicode characters inclusive.createIfNecessary - if true,
the record store will be created if necessary
• Returns:RecordStore object for the record store
Throws:
• RecordStoreException - if a record store-related exception
occurred
• RecordStoreNotFoundException - if the record store could
not be found
• RecordStoreFullException - if the operation cannot be
completed because the record store is full
• IllegalArgumentException - if recordStoreName is invalid
http://improvejava.blogspot.in
Ex: openRecordStore
• recordstore =
RecordStore.openRecordStore("EmployRecord
", true );

http://improvejava.blogspot.in
addRecord()
• Int addRecord(byte[] data, int offset,
int numBytes)
• Adds a new record to the record store. It
returns int value, which is Record Id , this id is
useful to access the particular record
• Example:
• rec.addRecord(byteOutputData,
0,byteOutputData.length);
http://improvejava.blogspot.in
getRecord()
• This method reads a record from the record store. Record Id must be in
the method as a parameter(actual parameter)
• The getRecord() method copies the record from the record store and into
the byteInputData byte array and returns an integer representing the
length of the record.
• Call the getRecord() method of the RecordStore class for each iteration of
the for
loop.
• The getRecord() method returns bytes from the RecordStore, which are
stored in a byte array that you create.
• The getRecord() method requires three parameters. The first parameter is
the record ID,
• The second parameter is the byte array that you create for storing the
record.
• The third parameter is an integer representing the position in the record
from which to begin copying into the byte array.
http://improvejava.blogspot.in
• For example, the following code segment reads
the second record from the record store and
copies that record, beginning with the first byte
of the record, from the record store into the byte
array. Typically, the first parameter of the
getRecord() method is the integer of the for loop,
and the third parameter is zero, indicating the
entire record is to be copied into the byte array.
• Example: recordstore.getRecord(2, myByteArray,
0)
http://improvejava.blogspot.in
recordstore.getRecord(2, myByteArray,
0)
• three parameters.
• The first is the record ID that is being read,
which is the current value of the for loop
variable.
• The second is the name of the byte array into
which the record is copied.
• The third is the index position of the first byte
that is to be copied into the byte array.
http://improvejava.blogspot.in
getRecordSize(int recordId)
• intgetRecordSize(int recordId)
Returns the size (in bytes) of the MIDlet
data available in the given record.

http://improvejava.blogspot.in
closeRecordStore()
• This method is called when the MIDlet requests to
have the record store closed. Note that the record
store will not actually be closed until
closeRecordStore() is called as many times as
openRecordStore() was called. In other words, the
MIDlet needs to make a balanced number of close calls
as open calls before the record store is closed.When
the record store is closed, all listeners are removed and
all RecordEnumerations associated with it become
invalid. If the MIDlet attempts to perform operations
on the RecordStore object after it has been closed, the
methods will throw a RecordStoreNotOpenException.

http://improvejava.blogspot.in
Syntax of closeRecordStore()
• public void closeRecordStore() throws
RecordStoreNotOpenException,
RecordStoreException

http://improvejava.blogspot.in
listRecordStores()
• Returns an array of the names of record stores
owned by the MIDlet suite. Note that if the
MIDlet suite does not have any record stores, this
function will return null. The order of
RecordStore names returned is implementation
dependent.
• Returns:array of the names of record stores
owned by the MIDlet suite. Note that if the
MIDlet suite does not have any record stores, this
function will return null.
http://improvejava.blogspot.in
Syntax of listRecordStores()
• public static String[] listRecordStores()

http://improvejava.blogspot.in
deleteRecordStore()
• Deletes the named record store. MIDlet suites are
only allowed to delete their own record stores. If
the named record store is open (by a MIDlet in
this suite or a MIDlet in a different MIDlet suite)
when this method is called, a
RecordStoreException will be thrown. If the
named record store does not exist a
RecordStoreNotFoundException will be thrown.
Calling this method does NOT result in
recordDeleted calls to any registered listeners of
this RecordStore.
http://improvejava.blogspot.in
• public static void
deleteRecordStore(String recordStoreName)
throws RecordStoreException,
RecordStoreNotFoundException

http://improvejava.blogspot.in
• Parameters:recordStoreName - the MIDlet
suite unique record store to delete

http://improvejava.blogspot.in
enumerateRecords()
RecordEnumeration is constructed by calling
enumerateRecords() method.
• RecordEnumeration is a method for retrieving record
from recordStore. It also provides for sorting, searching
of records.
• If u want to sort the records we have to write null as a
1st parameter in enumerateRecords()
• Ex: rec.enumerateRecords(null, com,false);
• If you want to search the records we have to write null
as the 2nd parameter in enumerateRecords() method.
Ie: rec.enumerateRecords(filter,null,false);
• This method is used to call the compare() method
SortRec.java
r = rec.enumerateRecords(null, com, false);

Boolean false:
• Means specifies whether or not enumeration
is updated with change in record store

SortRec.java
• public RecordEnumeration enumerateRecords(RecordFilter filter,
RecordComparator comparator, boolean keepUpdated) throws
RecordStoreNotOpenException
• r =rec.enumerateRecords(null, null, false);
• RecordFilter: it specifies which records should be included in enumeration.
• RecordComparator: it helps in comparing two records. It is mainly useful in
finding the sort order.
• Boolean: Specifies whether or not enumeration is updated with change in
record store

http://improvejava.blogspot.in
• Parameters:filter - if non-null, will be used to determine what subset of
the record store records will be used
• comparator - if non-null, will be used to determine the order in which the
records are returned
• keepUpdated - 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. If false the enumeration
will not be kept current and may return record
• Ids 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.
• Returns:an enumeration for traversing a set of records in the record store
in an optionally specified order
http://improvejava.blogspot.in
setMode()
• This method is used to set or change the
authorization mode. By setting this mode to
AUTHMODE-ANY, the record store can be
made sharable.
• Syntax:
• Void setMode(int authmode, boolean
writable);

http://improvejava.blogspot.in

Contenu connexe

Similaire à Record store

Recordmanagment2
Recordmanagment2Recordmanagment2
Recordmanagment2
myrajendra
 
Oracle forms les18
Oracle forms  les18Oracle forms  les18
Oracle forms les18
Abed Othman
 
Secrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archsSecrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archs
Tarik Essawi
 

Similaire à Record store (20)

Scmad Chapter08
Scmad Chapter08Scmad Chapter08
Scmad Chapter08
 
Session9 J2ME Record Management System
Session9 J2ME Record Management SystemSession9 J2ME Record Management System
Session9 J2ME Record Management System
 
Recordmanagment2
Recordmanagment2Recordmanagment2
Recordmanagment2
 
Oracle forms les18
Oracle forms  les18Oracle forms  les18
Oracle forms les18
 
Performance Tuning
Performance TuningPerformance Tuning
Performance Tuning
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
MIDP: Persistant Storage
MIDP: Persistant StorageMIDP: Persistant Storage
MIDP: Persistant Storage
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbai
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbai
 
Session11 J2ME Record Management System Database
Session11 J2ME Record Management System DatabaseSession11 J2ME Record Management System Database
Session11 J2ME Record Management System Database
 
Session11 J2ME Record Management System
Session11 J2ME Record Management SystemSession11 J2ME Record Management System
Session11 J2ME Record Management System
 
Local data storage for mobile apps
Local data storage for mobile appsLocal data storage for mobile apps
Local data storage for mobile apps
 
Cassandra 2.1 boot camp, Read/Write path
Cassandra 2.1 boot camp, Read/Write pathCassandra 2.1 boot camp, Read/Write path
Cassandra 2.1 boot camp, Read/Write path
 
Oracle training-in-hyderabad
Oracle training-in-hyderabadOracle training-in-hyderabad
Oracle training-in-hyderabad
 
Standard Template Library
Standard Template LibraryStandard Template Library
Standard Template Library
 
SQL Server 2016 Query store
SQL Server 2016 Query storeSQL Server 2016 Query store
SQL Server 2016 Query store
 
Secrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archsSecrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archs
 
Intro to Rails 4
Intro to Rails 4Intro to Rails 4
Intro to Rails 4
 

Plus de myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

Dernier

Dernier (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Record store

  • 2. • This RecordStore class provides methods for creating, writing, and reading data from recordstores. • A class representing a record store. A record store consists of a collection of records which will remain persistent across multiple invocations of the MIDlet. The platform is responsible for making its best effort to maintain the integrity of the MIDlet's record stores throughout the normal use of the platform, including reboots, battery changes, etc. http://improvejava.blogspot.in
  • 3. syntax • javax.microedition.rms.RecordStore • public class RecordStore extends Object http://improvejava.blogspot.in
  • 5. openRecordStore() • Open (and possibly create) or create a record store associated with the given MIDlet suite. And returns a RecordStore reference. • If this method is called by a MIDlet when the record store is already open by a MIDlet in the MIDlet suite, this method returns a reference to the same RecordStore object. http://improvejava.blogspot.in
  • 6. • The openRecordStore() method requires two parameters. The first parameter is a string containing the name of the record store. • The second parameter is a boolean value indicating whether the record store should be created if the record store doesn’t exist. A true value causes the record store to be created • if the record store isn’t in the MIDlet suite and also opens the record store. • A false value does not create the record store if the record store isn’t located. http://improvejava.blogspot.in
  • 7. openRecordStore() syntax • public static RecordStore openRecordStore(String recordStoreName, boolean createIfNecessary) throws RecordStoreException, RecordStoreFullException, RecordStoreNotFoundException http://improvejava.blogspot.in
  • 8. • Parameters:recordStoreName - the MIDlet suite unique name for the record store, consisting of between one and 32 Unicode characters inclusive.createIfNecessary - if true, the record store will be created if necessary • Returns:RecordStore object for the record store Throws: • RecordStoreException - if a record store-related exception occurred • RecordStoreNotFoundException - if the record store could not be found • RecordStoreFullException - if the operation cannot be completed because the record store is full • IllegalArgumentException - if recordStoreName is invalid http://improvejava.blogspot.in
  • 9. Ex: openRecordStore • recordstore = RecordStore.openRecordStore("EmployRecord ", true ); http://improvejava.blogspot.in
  • 10. addRecord() • Int addRecord(byte[] data, int offset, int numBytes) • Adds a new record to the record store. It returns int value, which is Record Id , this id is useful to access the particular record • Example: • rec.addRecord(byteOutputData, 0,byteOutputData.length); http://improvejava.blogspot.in
  • 11. getRecord() • This method reads a record from the record store. Record Id must be in the method as a parameter(actual parameter) • The getRecord() method copies the record from the record store and into the byteInputData byte array and returns an integer representing the length of the record. • Call the getRecord() method of the RecordStore class for each iteration of the for loop. • The getRecord() method returns bytes from the RecordStore, which are stored in a byte array that you create. • The getRecord() method requires three parameters. The first parameter is the record ID, • The second parameter is the byte array that you create for storing the record. • The third parameter is an integer representing the position in the record from which to begin copying into the byte array. http://improvejava.blogspot.in
  • 12. • For example, the following code segment reads the second record from the record store and copies that record, beginning with the first byte of the record, from the record store into the byte array. Typically, the first parameter of the getRecord() method is the integer of the for loop, and the third parameter is zero, indicating the entire record is to be copied into the byte array. • Example: recordstore.getRecord(2, myByteArray, 0) http://improvejava.blogspot.in
  • 13. recordstore.getRecord(2, myByteArray, 0) • three parameters. • The first is the record ID that is being read, which is the current value of the for loop variable. • The second is the name of the byte array into which the record is copied. • The third is the index position of the first byte that is to be copied into the byte array. http://improvejava.blogspot.in
  • 14. getRecordSize(int recordId) • intgetRecordSize(int recordId) Returns the size (in bytes) of the MIDlet data available in the given record. http://improvejava.blogspot.in
  • 15. closeRecordStore() • This method is called when the MIDlet requests to have the record store closed. Note that the record store will not actually be closed until closeRecordStore() is called as many times as openRecordStore() was called. In other words, the MIDlet needs to make a balanced number of close calls as open calls before the record store is closed.When the record store is closed, all listeners are removed and all RecordEnumerations associated with it become invalid. If the MIDlet attempts to perform operations on the RecordStore object after it has been closed, the methods will throw a RecordStoreNotOpenException. http://improvejava.blogspot.in
  • 16. Syntax of closeRecordStore() • public void closeRecordStore() throws RecordStoreNotOpenException, RecordStoreException http://improvejava.blogspot.in
  • 17. listRecordStores() • Returns an array of the names of record stores owned by the MIDlet suite. Note that if the MIDlet suite does not have any record stores, this function will return null. The order of RecordStore names returned is implementation dependent. • Returns:array of the names of record stores owned by the MIDlet suite. Note that if the MIDlet suite does not have any record stores, this function will return null. http://improvejava.blogspot.in
  • 18. Syntax of listRecordStores() • public static String[] listRecordStores() http://improvejava.blogspot.in
  • 19. deleteRecordStore() • Deletes the named record store. MIDlet suites are only allowed to delete their own record stores. If the named record store is open (by a MIDlet in this suite or a MIDlet in a different MIDlet suite) when this method is called, a RecordStoreException will be thrown. If the named record store does not exist a RecordStoreNotFoundException will be thrown. Calling this method does NOT result in recordDeleted calls to any registered listeners of this RecordStore. http://improvejava.blogspot.in
  • 20. • public static void deleteRecordStore(String recordStoreName) throws RecordStoreException, RecordStoreNotFoundException http://improvejava.blogspot.in
  • 21. • Parameters:recordStoreName - the MIDlet suite unique record store to delete http://improvejava.blogspot.in
  • 22. enumerateRecords() RecordEnumeration is constructed by calling enumerateRecords() method. • RecordEnumeration is a method for retrieving record from recordStore. It also provides for sorting, searching of records. • If u want to sort the records we have to write null as a 1st parameter in enumerateRecords() • Ex: rec.enumerateRecords(null, com,false); • If you want to search the records we have to write null as the 2nd parameter in enumerateRecords() method. Ie: rec.enumerateRecords(filter,null,false); • This method is used to call the compare() method SortRec.java
  • 23. r = rec.enumerateRecords(null, com, false); Boolean false: • Means specifies whether or not enumeration is updated with change in record store SortRec.java
  • 24. • public RecordEnumeration enumerateRecords(RecordFilter filter, RecordComparator comparator, boolean keepUpdated) throws RecordStoreNotOpenException • r =rec.enumerateRecords(null, null, false); • RecordFilter: it specifies which records should be included in enumeration. • RecordComparator: it helps in comparing two records. It is mainly useful in finding the sort order. • Boolean: Specifies whether or not enumeration is updated with change in record store http://improvejava.blogspot.in
  • 25. • Parameters:filter - if non-null, will be used to determine what subset of the record store records will be used • comparator - if non-null, will be used to determine the order in which the records are returned • keepUpdated - 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. If false the enumeration will not be kept current and may return record • Ids 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. • Returns:an enumeration for traversing a set of records in the record store in an optionally specified order http://improvejava.blogspot.in
  • 26. setMode() • This method is used to set or change the authorization mode. By setting this mode to AUTHMODE-ANY, the record store can be made sharable. • Syntax: • Void setMode(int authmode, boolean writable); http://improvejava.blogspot.in