BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-18-2009, 04:17 AM   #1
deepakjain
Knows Where the Search Button Is
 
Join Date: Jun 2009
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 17
Default how to Delete persistenceStore

Please Login to Remove!

Hi all,

I am new to Blackberry development. I am using persistenceStore and persistenceObject for storing my data through a HashMap. How do i delete the persistence store while deleting the app. How and when do I invoke the PersistentStore.destroyPersistentObject(). Read that this method would delete the object. Can anyone help with sample code?
Offline  
Old 08-18-2009, 10:04 AM   #2
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default

A persistent store is deleted from the device when the last application using it is removed, or when the structure of the store as coded in an application is different from the structure of the store on the device.

Other than that, you may destroy your store when ever it makes sense for the operation of your program.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 08-19-2009, 07:50 AM   #3
deepakjain
Knows Where the Search Button Is
 
Join Date: Jun 2009
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 17
Default

I am storing the data as string and when i delete the application from the device. After i install the application again if find the persistance store still exists.
Offline  
Old 08-19-2009, 08:10 AM   #4
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default

This KB article has the specifics, and links to other documents. Maybe you can find your answer there: Livelink - Redirection
__________________
My other Blackberry is a PlayBook.
Offline  
Old 08-21-2009, 07:28 PM   #5
ptys
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: none
PIN: N/A
Carrier: none
Posts: 26
Default

Store it in a Persistable object whose class is defined in your application. So, for example, instead of storing it in a Hashtable, store in MyHashtable like this

Quote:
public class MyHashtable extends java.util.Hashtable implements Persistable {
}
This way when your application is uninstalled, the persistent entry created with your class will be removed as well.

Quote:
Originally Posted by deepakjain View Post
I am storing the data as string and when i delete the application from the device. After i install the application again if find the persistance store still exists.
Offline  
Old 10-21-2009, 06:31 PM   #6
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default Properties/Methods of Parent class not available in the child?

Sorry every one--don't know how that happened. I thought I was in a new thread.
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW

Last edited by doni49; 10-21-2009 at 06:33 PM..
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


*PARTS/REPAIR* Mitsubishi FR-A520-5.5K-NA A500vInverter In: 35.5A 3Ph Out: 10Hp picture

*PARTS/REPAIR* Mitsubishi FR-A520-5.5K-NA A500vInverter In: 35.5A 3Ph Out: 10Hp

$750.00



1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ picture

1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ

$317.00



MITSUBISHI FR-A820 1.5K TFA INVERTER A500 240 V #L-220 picture

MITSUBISHI FR-A820 1.5K TFA INVERTER A500 240 V #L-220

$684.00



1Pcs USED A500 7.5KW 380V FR-A540-7.5K-CH frequency converter picture

1Pcs USED A500 7.5KW 380V FR-A540-7.5K-CH frequency converter

$401.02



1PCS USED A500 7.5KW 380V FR-A540-7.5K-CH picture

1PCS USED A500 7.5KW 380V FR-A540-7.5K-CH

$347.76



1pc   used      A500 inverter FR-A540-3.7K 3.7KW380V picture

1pc used A500 inverter FR-A540-3.7K 3.7KW380V

$258.74







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