net.rim.device.api.util
Interface Persistable

All Superinterfaces:
net.rim.vm.Persistable
All Known Subinterfaces:
Certificate, CryptoSystem, DHKey, DistinguishedName, DSAKey, ECKey, KEAKey, Key, KeyStoreData, PrivateKey, PublicKey, RSAKey, SymmetricKey
All Known Implementing Classes:
BigIntVector, BigLongVector, BigVector, CodeSigningKey, ControlledAccess, PersistentObject, PersistentStore, SparseList, StringMatch, ToIntHashtable, MultiMap, LongIntHashtable, LongHashtable, IntVector, IntStack, IntMultiMap, IntIntHashtable, IntHashtable, DataBuffer, ByteVector, ASN1BitSet, CertificateStatus, CertificateServers, CertificateServerInfo, CertificateExtension, TripleDESKey, SkipjackKey, RSAPublicKey, RSAPrivateKey, KeyPair, RSAKeyPair, RSACryptoSystem, RC5Key, RC2Key, KEAPublicKey, KEAPrivateKey, KEAKeyPair, KEACryptoSystem, InitializationVector, HMACKey, ECPublicKey, ECPrivateKey, ECKeyPair, ECCryptoSystem, DSAPublicKey, DSAPrivateKey, DSAKeyPair, DHPublicKey, DHPrivateKey, DHKeyPair, DESKey, CAST128Key, ARC4Key, AESKey, AssociatedData, OID, X509DistinguishedName, X509Certificate, WTLSDistinguishedName, WTLSCertificate

public interface Persistable
extends net.rim.vm.Persistable

Every object that can persist between handheld resets must implement persistable.

Note: A class must explicitly implement Persistable for objects to be stored persistently. Implementation of Persistable is not inherited by subclasses.
In the following example, objects of class B cannot persist, because class B does not explicitly implement the Persistable interface:

 class A extends Vector implements Persistable {
  	//
 }
 
 class B extends A {
 	//
 }
 

Trying to persist B will cause a JVM error.

If you want a class to remain compatible with old instances that are in the persistent store, you can do anything as long as it does not change the instance data layout. So you can do anything at all to the methods and static data. You could change the superclass, as long as the new super class has all the same instance data (for example, you could insert a class into the hierarchy that had no instance data). You cannot, however, add, delete or modify any instance data of the class or its super classes.




Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.