Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.persistence
Interface IPersistenceProvider


public interface IPersistenceProvider

Instances of this interface provide facilities for storing and retrieving persistable objects.

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the MTJ team.

Since:
1.0
Restriction:
This interface is not intended to be implemented by clients.

Method Summary
 boolean loadBoolean(String name)
          Load the named boolean value.
 int loadInteger(String name)
          Load the named integer value.
 IPersistable loadPersistable(String name)
          Load the named persistable object value.
 Properties loadProperties(String name)
          Load the named properties object value.
 Object loadReference(String name)
          Load the referenced object value or null if the object cannot be resolved.
 String loadString(String name)
          Load the named string value.
 void storeBoolean(String name, boolean debugServer)
          Store the boolean value using the specified name.
 void storeInteger(String name, int value)
          Store the integer value using the specified name.
 void storePersistable(String name, IPersistable value)
          Store the persistable object value using the specified name.
 void storeProperties(String name, Properties deviceProperties)
          Store the properties object value using the specified name.
 void storeReference(String name, Object referenceObject)
          Store a reference to the specified object using the specified name.
 void storeString(String name, String string)
          Store the string value using the specified name.
 

Method Detail

loadBoolean

boolean loadBoolean(String name)
                    throws PersistenceException
Load the named boolean value.

Parameters:
name -
Returns:
Throws:
PersistenceException

loadInteger

int loadInteger(String name)
                throws PersistenceException
Load the named integer value.

Parameters:
name -
Returns:
Throws:
PersistenceException

loadPersistable

IPersistable loadPersistable(String name)
                             throws PersistenceException
Load the named persistable object value.

Parameters:
name -
Returns:
Throws:
PersistenceException

loadProperties

Properties loadProperties(String name)
                          throws PersistenceException
Load the named properties object value.

Parameters:
name -
Returns:
Throws:
PersistenceException

loadReference

Object loadReference(String name)
                     throws PersistenceException
Load the referenced object value or null if the object cannot be resolved.

Parameters:
name -
Returns:
Throws:
PersistenceException

loadString

String loadString(String name)
                  throws PersistenceException
Load the named string value.

Parameters:
name -
Returns:
Throws:
PersistenceException

storeBoolean

void storeBoolean(String name,
                  boolean debugServer)
                  throws PersistenceException
Store the boolean value using the specified name.

Parameters:
name -
debugServer -
Throws:
PersistenceException

storeInteger

void storeInteger(String name,
                  int value)
                  throws PersistenceException
Store the integer value using the specified name.

Parameters:
name -
value -
Throws:
PersistenceException

storePersistable

void storePersistable(String name,
                      IPersistable value)
                      throws PersistenceException
Store the persistable object value using the specified name.

Parameters:
name -
value -
Throws:
PersistenceException

storeProperties

void storeProperties(String name,
                     Properties deviceProperties)
                     throws PersistenceException
Store the properties object value using the specified name.

Parameters:
name -
deviceProperties -
Throws:
PersistenceException

storeReference

void storeReference(String name,
                    Object referenceObject)
                    throws PersistenceException
Store a reference to the specified object using the specified name. This object must have previously been stored by this persistence provider or a persistence exception will be thrown.

Parameters:
name -
referenceObject -
Throws:
PersistenceException

storeString

void storeString(String name,
                 String string)
                 throws PersistenceException
Store the string value using the specified name.

Parameters:
name -
string -
Throws:
PersistenceException

Mobile Tools for Java
Release 1.0