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


New Factory Sealed AB 1756-L62 SER B ControlLogix 4MB Memory Controller 1756L62 picture

New Factory Sealed AB 1756-L62 SER B ControlLogix 4MB Memory Controller 1756L62

$505.00



Memory Stick RAM Shipping Box - 5 Trays fits 250 DDR5 DDR4 DDR3 DIMM Modules New picture

Memory Stick RAM Shipping Box - 5 Trays fits 250 DDR5 DDR4 DDR3 DIMM Modules New

$41.50



Memory Blister Pack Box for DDR DIMM Module Anti Static - Lot of 6 18 35 100 200 picture

Memory Blister Pack Box for DDR DIMM Module Anti Static - Lot of 6 18 35 100 200

$17.95



2 - RAM DRAM Tray-Container Box For Server PC Memory DIMM Modules - Fits 100 NEW picture

2 - RAM DRAM Tray-Container Box For Server PC Memory DIMM Modules - Fits 100 NEW

$21.90



1PC NEW Memory card 2711-NM11 2711-NM11 SPOT STOCK picture

1PC NEW Memory card 2711-NM11 2711-NM11 SPOT STOCK

$364.61



Dental Endodontic Endo Memory Engine Rotary Root Canal NiTi File 25mm files 6PCS picture

Dental Endodontic Endo Memory Engine Rotary Root Canal NiTi File 25mm files 6PCS

$349.50







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