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


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

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

Forum Jump


3/4

3/4" PT AC 110V Electric Solenoid Valve Brass Water Air Gas

$28.47



MAC Boost Control Solenoid Valve 1/8'' 35A-ACA-DDBA-1BA DC12V 5.4W picture

MAC Boost Control Solenoid Valve 1/8'' 35A-ACA-DDBA-1BA DC12V 5.4W

$23.37



U.S. Solid 1/4

U.S. Solid 1/4" Brass Electric Solenoid Valve DC 12V VITON Water Air Fuel N/C

$18.89



U.S. Solid 1/4

U.S. Solid 1/4" Pneumatic Electric Solenoid Valve 5 way 2 Position DC 24V, Air

$17.84



1/4

1/4" Electric Solenoid Valve Water Oil Air Gas Welders 110/120 volt AC B20N/V

$24.95



U.S. Solid 3/8

U.S. Solid 3/8" 12V DC Brass Electric Solenoid Valve Air Water, Normally Closed

$28.34







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