BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 03-06-2009, 03:33 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Persisting a vector over device resets

Please Login to Remove!

I am new to the J2ME concept of presistable objects. I am trying to persist a vector of strings over device power cycles but am not sure the best way to go about it. I have read that you can implement the persistable interface or use a class that already does this. For instance, BigVector looks like it might meet my needs. However, how do you commit and retrieve the vector to and from the persistant store it looked like it had a normal constructor not a getInstance method. I am really confused, could some one help me out, I am sure this is pretty easy, once you know what you are doing. Again I just want to persist a vector of strings, whats the best way to do this ?
Offline  
Old 03-06-2009, 07:07 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Have a look at page 79 of Blackberry Application Developer Guide, Volume 2.
Offline  
Old 03-08-2009, 02:54 PM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the pointer. As a follow on, I am writing a system module so where is a good place to commit ?
Offline  
Old 03-11-2009, 06:52 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

I usually commit when ever any data stored there has changed, and I'm about to return control to the event queue.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Reconditioned Windsor Commodore 20 Carpet Extractor
$3025.0
Reconditioned Windsor Commodore 20 Carpet Extractor picture 60-5800t commodore ii oversize leather chair with adjustable headrest, black
$258.71
 60-5800t commodore ii oversize leather chair with adjustable headrest, black pictureCommodore 2000 Typewriter
$30.0
Commodore 2000 Typewriter pictureMOS 6502 B Commodore 1541 CPU 40-Pin PDIP Used
$10.0
MOS 6502 B Commodore 1541 CPU 40-Pin PDIP Used  pictureMOS 325572-01 Commodore 1541 40-PIN Gate Array (x1)
$7.0
MOS 325572-01 Commodore 1541 40-PIN Gate Array (x1) picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.