SlideShare a Scribd company logo
1 of 12
J2ME –
      Record management system

                    Rohan Chandane
             rohan.chandane@indiatimes.com



This notes are created by me, Rohan Chandane as learning material while pursuing MSc (CA) from SICSR. (CC) 2005-07
Basics
   Record Management System (RMS)
   Provides a mechanism
       MIDlets can
            Persistently store data
            Retrieve it later even if device switched off
   It stores data in binary format in mobile
    device
Overview of J2ME RMS and
MIDlet interfacing
Records and Record Store
   Storage Mechanism termed as
       Record Store
   Record Store consist
       Records – Individual units of storage
   Record
       Is an array of bytes
       Stored in binary file
Package
   Package used
       javax.microedition.rms
   For Record stored class used
       javax.microedition.rms.RecordStore
       Provides several methods to manage
        records in Record Store
            Insert
            Update
            Delete
RecordStore Class
   Methods in RecordStore
       openRecordStore()
            Open Record Store
       closeRecordStore()
            Close Record Store
       deleteRecordStore()
            Delete Record Store
       enumerateRecords()
            Used to obtain enumeration object, which
             represents entire set of records in Record Store
Continued…
    getName()
         Used to obtain name of Record Store
    getRecord()
         Retrieve a record from Record set
    getNumRecord()
         Obtain a number of records in Record Store
    addRecord()
         Add record to Record Store
    deleteRecord()
         Delete record from Record Store
Continued…
   Interfaces in RMS package
       RecordEnumeration
           Provide navigation in both direction through
            record store
           It has following methods defined
                nextRecordId() – returns Id of next record
                nextRecord() – returns next record
                previousRecordId() – returns Id of previous record
                previousRecord() – returns previous record
                hasNextElement() – true, if there is next record
                hasPreviousElement() – true, if there is previous
                                           record
Continued…
    RecordComparator
         Provide comparison between two records in a
          record store
    RecordFilter
         Provide a mechanism to check if a record
          matches a specific criterion
    RecordListener
         Provide an event listener that is notified when
          event is added, deleted or modified
Managing record stores
   Open a RecordStore
RecordStore rs = RecordStore.openRecordStore(quot;MyAppointmentsquot;,true);

   Close a RecordStore
Rs.closeRecordStore();

   Delete a RecordStore
RecordStore.deleteRecordStore(quot;MyAppointmentsquot;);
Continued…
   Insert a record
    String appt = quot;new recordquot;;
    byte bytes[] = appt.getBytes();
    rs.addRecord(bytes,0,bytes.length);


   Updating records
    String newappt = quot;update recordquot;;
    Byte data = newappt.getBytes();
    Rs.setRecord(1, data, 0, data.length());
Continued…
   Deleting records
    Rs.deleteRecord(1);

More Related Content

Similar to J2ME RMS

Dealing with Legacy PHP Applications
Dealing with Legacy PHP ApplicationsDealing with Legacy PHP Applications
Dealing with Legacy PHP Applications
Clinton Dreisbach
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
patter
 

Similar to J2ME RMS (20)

MIDP: Persistant Storage
MIDP: Persistant StorageMIDP: Persistant Storage
MIDP: Persistant Storage
 
Scmad Chapter08
Scmad Chapter08Scmad Chapter08
Scmad Chapter08
 
Record store
Record storeRecord store
Record store
 
Kommons
KommonsKommons
Kommons
 
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
 
Local data storage for mobile apps
Local data storage for mobile appsLocal data storage for mobile apps
Local data storage for mobile apps
 
Oracle training-in-hyderabad
Oracle training-in-hyderabadOracle training-in-hyderabad
Oracle training-in-hyderabad
 
ATG Secure Repository
ATG Secure RepositoryATG Secure Repository
ATG Secure Repository
 
What the CRaC - Superfast JVM startup
What the CRaC - Superfast JVM startupWhat the CRaC - Superfast JVM startup
What the CRaC - Superfast JVM startup
 
Assic 17th Lecture
Assic 17th LectureAssic 17th Lecture
Assic 17th Lecture
 
Dealing with Legacy PHP Applications
Dealing with Legacy PHP ApplicationsDealing with Legacy PHP Applications
Dealing with Legacy PHP Applications
 
Oleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoCOleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoC
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web apps
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
 
J2ME IO Classes
J2ME IO ClassesJ2ME IO Classes
J2ME IO Classes
 
Record management system_parvathy
Record management system_parvathyRecord management system_parvathy
Record management system_parvathy
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
Os Harris
Os HarrisOs Harris
Os Harris
 
Log4j2
Log4j2Log4j2
Log4j2
 
Tackling Tech Debt with Rector
Tackling Tech Debt with RectorTackling Tech Debt with Rector
Tackling Tech Debt with Rector
 

More from Rohan Chandane

Agile :what i learnt so far
Agile :what i learnt so farAgile :what i learnt so far
Agile :what i learnt so far
Rohan Chandane
 
TIBCO General Interface - CSS Guide
TIBCO General Interface - CSS GuideTIBCO General Interface - CSS Guide
TIBCO General Interface - CSS Guide
Rohan Chandane
 

More from Rohan Chandane (12)

Agile Maturity Model, Certified Scrum Master!
Agile Maturity Model, Certified Scrum Master!Agile Maturity Model, Certified Scrum Master!
Agile Maturity Model, Certified Scrum Master!
 
Agile & Scrum, Certified Scrum Master! Crash Course
Agile & Scrum,  Certified Scrum Master! Crash CourseAgile & Scrum,  Certified Scrum Master! Crash Course
Agile & Scrum, Certified Scrum Master! Crash Course
 
An Introduction To Testing In AngularJS Applications
An Introduction To Testing In AngularJS Applications An Introduction To Testing In AngularJS Applications
An Introduction To Testing In AngularJS Applications
 
Agile :what i learnt so far
Agile :what i learnt so farAgile :what i learnt so far
Agile :what i learnt so far
 
Backbone js
Backbone jsBackbone js
Backbone js
 
Node js
Node jsNode js
Node js
 
Sencha / ExtJS : Object Oriented JavaScript
Sencha / ExtJS : Object Oriented JavaScriptSencha / ExtJS : Object Oriented JavaScript
Sencha / ExtJS : Object Oriented JavaScript
 
TIBCO General Interface - CSS Guide
TIBCO General Interface - CSS GuideTIBCO General Interface - CSS Guide
TIBCO General Interface - CSS Guide
 
Blogger's Park Presentation (Blogging)
Blogger's Park Presentation (Blogging)Blogger's Park Presentation (Blogging)
Blogger's Park Presentation (Blogging)
 
J2ME GUI Programming
J2ME GUI ProgrammingJ2ME GUI Programming
J2ME GUI Programming
 
Parsing XML in J2ME
Parsing XML in J2MEParsing XML in J2ME
Parsing XML in J2ME
 
Java2 MicroEdition-J2ME
Java2 MicroEdition-J2MEJava2 MicroEdition-J2ME
Java2 MicroEdition-J2ME
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

J2ME RMS

  • 1. J2ME – Record management system Rohan Chandane rohan.chandane@indiatimes.com This notes are created by me, Rohan Chandane as learning material while pursuing MSc (CA) from SICSR. (CC) 2005-07
  • 2. Basics  Record Management System (RMS)  Provides a mechanism  MIDlets can  Persistently store data  Retrieve it later even if device switched off  It stores data in binary format in mobile device
  • 3. Overview of J2ME RMS and MIDlet interfacing
  • 4. Records and Record Store  Storage Mechanism termed as  Record Store  Record Store consist  Records – Individual units of storage  Record  Is an array of bytes  Stored in binary file
  • 5. Package  Package used  javax.microedition.rms  For Record stored class used  javax.microedition.rms.RecordStore  Provides several methods to manage records in Record Store  Insert  Update  Delete
  • 6. RecordStore Class  Methods in RecordStore  openRecordStore()  Open Record Store  closeRecordStore()  Close Record Store  deleteRecordStore()  Delete Record Store  enumerateRecords()  Used to obtain enumeration object, which represents entire set of records in Record Store
  • 7. Continued…  getName()  Used to obtain name of Record Store  getRecord()  Retrieve a record from Record set  getNumRecord()  Obtain a number of records in Record Store  addRecord()  Add record to Record Store  deleteRecord()  Delete record from Record Store
  • 8. Continued…  Interfaces in RMS package  RecordEnumeration  Provide navigation in both direction through record store  It has following methods defined  nextRecordId() – returns Id of next record  nextRecord() – returns next record  previousRecordId() – returns Id of previous record  previousRecord() – returns previous record  hasNextElement() – true, if there is next record  hasPreviousElement() – true, if there is previous record
  • 9. Continued…  RecordComparator  Provide comparison between two records in a record store  RecordFilter  Provide a mechanism to check if a record matches a specific criterion  RecordListener  Provide an event listener that is notified when event is added, deleted or modified
  • 10. Managing record stores  Open a RecordStore RecordStore rs = RecordStore.openRecordStore(quot;MyAppointmentsquot;,true);  Close a RecordStore Rs.closeRecordStore();  Delete a RecordStore RecordStore.deleteRecordStore(quot;MyAppointmentsquot;);
  • 11. Continued…  Insert a record String appt = quot;new recordquot;; byte bytes[] = appt.getBytes(); rs.addRecord(bytes,0,bytes.length);  Updating records String newappt = quot;update recordquot;; Byte data = newappt.getBytes(); Rs.setRecord(1, data, 0, data.length());
  • 12. Continued…  Deleting records Rs.deleteRecord(1);