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

NCR Real POS Model 9007 DUal Core CPU, 3GB RAM
$0.99
NCR Real POS Model 9007 DUal Core CPU, 3GB RAM pictureCarlo Gavazzi RAM1A23A5 Relay SSR 20mA 48V DC-IN 50A 265V AC-OUT, US Authorized
$69.99
Carlo Gavazzi RAM1A23A5 Relay SSR 20mA 48V DC-IN 50A 265V AC-OUT, US Authorized picture1xINTEL D2117-3 RAM D2117 DIP16
$2.5
1xINTEL D2117-3 RAM D2117 DIP16 picture1x Mitsubishi M5L5101LP-1 - 1024 Bit (256 Word - 4 bit) CMOS Stat RAM - IC PDIP
$6.19
1x Mitsubishi M5L5101LP-1 - 1024 Bit (256 Word - 4 bit) CMOS Stat RAM - IC PDIP picture1xINTEL D2117-4 RAM D2117 DIP16
$2.5
1xINTEL D2117-4 RAM D2117 DIP16 picture






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