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


Super-Micro P4DC6+ Motherboard with 2 Xeon i processors with SCSI RAID picture

Super-Micro P4DC6+ Motherboard with 2 Xeon i processors with SCSI RAID

$200.00



POSEIDON XEON D-1500 PRODRIVE TECH BOX picture

POSEIDON XEON D-1500 PRODRIVE TECH BOX

$500.00



Intel Xeon E3-1231 V3 3.40GHz 4-core 8-thread 8MB 80W LGA1150 CPU processor picture

Intel Xeon E3-1231 V3 3.40GHz 4-core 8-thread 8MB 80W LGA1150 CPU processor

$24.80



Intel Xeon E7-8855 V4 2.10GHz 14-core 28-thread LGA2011 CPU processor picture

Intel Xeon E7-8855 V4 2.10GHz 14-core 28-thread LGA2011 CPU processor

$388.00



Intel Xeon E7-8870 V4 2.10GHz 20 core 40 threads 140W 50MB CPU processor picture

Intel Xeon E7-8870 V4 2.10GHz 20 core 40 threads 140W 50MB CPU processor

$118.00



Intel Xeon E3-1275 V5 3.60GHz 4-core 8-thread 8MB 80W LGA1150 CPU processor picture

Intel Xeon E3-1275 V5 3.60GHz 4-core 8-thread 8MB 80W LGA1150 CPU processor

$58.68







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