SlideShare une entreprise Scribd logo
1  sur  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);

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 

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);