| com.ivata.mask.persistence.PersistenceManager
All known Subclasses: com.ivata.mask.web.demo.catalog.Catalog,
PersistenceManager | public interface PersistenceManager (Code) | |
Defines how data objects are stored and retrieved throughout the system.
For each ivata masks implementation, you will need an
implementation of this interface. Think of it as an Adapter to your persistence
layer.
author: Colin MacLeod author: colin.macleod@ivata.com since: ivata masks 0.3 (2004-03-27) version: $Revision: 1.5 $ |
Method Summary | |
ValueObject | add(PersistenceSession session, ValueObject valueObject) Store a new value object. | void | amend(PersistenceSession session, ValueObject valueObject) Amend a previously stored value object, after changes have been made.
This is analagous to a database UPDATE .
Parameters: session - current persistence session. | List | findAll(PersistenceSession session, Class dOClass) Find all value objects in the system with the given class. | ValueObject | findByPrimaryKey(PersistenceSession session, Class dOClass, Serializable key) Find a single value object with the unique identifier given. | PersistenceSession | openSession(HttpSession webSession) Before performing any other persistence operation, you need to open a
valid persistence session. | PersistenceSession | openSession(Object systemSession) Before performing any other persistence operation, you need to open a
valid persistence session. | void | remove(PersistenceSession session, Class dOClass, Serializable key) Remove a value object from the persistence store. |
findAll | List findAll(PersistenceSession session, Class dOClass) throws PersistenceException(Code) | | Find all value objects in the system with the given class. This is
analagous to a database SELECT * FROM ... .
Parameters: session - current persistence session. Should have been previouslyopened with PersistenceManager.openSession() openSession(). Parameters: dOClass - class of value objects to return. a List of instances of the class specified. throws: PersistenceException - if no object can be found, or there is an error looking forobjects of this class. |
findByPrimaryKey | ValueObject findByPrimaryKey(PersistenceSession session, Class dOClass, Serializable key) throws PersistenceException(Code) | | Find a single value object with the unique identifier given. This is
analagous to a database SELECT UNIQUE ... FROM WHERE ... .
Parameters: session - current persistence session. Should have been previouslyopened with PersistenceManager.openSession() openSession(). Parameters: dOClass - class of value object to find. Parameters: key - unique identifier of the object to find. The exact meaning ofthis field depends on the persistence mechanism used. an instance of the class specified with the matching identifier. throws: PersistenceException - if no object can be found, or there is an error looking forthis object. |
openSession | PersistenceSession openSession(HttpSession webSession) throws PersistenceException(Code) | | Before performing any other persistence operation, you need to open a
valid persistence session. An ivata masks persistence
session can be considered analagous to a database transaction.
Parameters: webSession - Current HTTP session we are processing. a valid, open persistence session. throws: PersistenceException - if the session cannot be opened for any reason. |
openSession | PersistenceSession openSession(Object systemSession) throws PersistenceException(Code) | | Before performing any other persistence operation, you need to open a
valid persistence session. An ivata masks persistence
session can be considered analagous to a database transaction.
Parameters: systemSession - system/implementation-specific session object whichwill be wrapped by the persistence session. a valid, open persistence session. throws: PersistenceException - if the session cannot be opened for any reason. |
remove | void remove(PersistenceSession session, Class dOClass, Serializable key) throws PersistenceException(Code) | | Remove a value object from the persistence store. This is analagous to a
database DELETE .
Parameters: session - current persistence session. Should have been previouslyopened with PersistenceManager.openSession() openSession(). Parameters: dOClass - class of value object to remove. Parameters: key - unique identifier of the object to remove. The exact meaningof this field depends on the persistence mechanism used. throws: PersistenceException - if the object cannot be removed. |
|
|