Help Center
Local Navigation
- Creating user interfaces
- Storing data
- Creating connections
- Managing applications
- Using custom messages and folders in the message list
- Applications for push content
- Localizing BlackBerry device applications
- Controlling access to APIs and application data
- Testing a BlackBerry device application
- Packaging and distributing a BlackBerry Java Application
- Glossary
- Provide feedback
- Legal notice
BlackBerry Manuals & Help
>
Documentation for Developers
>
Java Development Guides and API Reference
>
Development Guide - BlackBerry Java Development Environment - 4.7.0
Create a persistent data store
- Import the following classes:
- To create a unique long key, in the BlackBerry® Integrated Development Environment, type a string value.
com.rim.samples.docs.userinfo
- Right-click the string and click Convert ‘com.rim.samples.docs.userinfo’ to long.
- Include a comment in your code to indicate the string that you used to generate the unique long key.
- To create a persistent data store, create a single static PersistentObject and invoke PersistentStore.getPersistentObject, using the unique long key as a parameter.
static PersistentObject store; static { store = PersistentStore.getPersistentObject( 0xa1a569278238dad2L ); }
Parent topic: Persistent data storage