org.janux.bus.persistence
Interface DataAccessObject

All Known Subinterfaces:
AccountDao, CityDao, CountryDao, OrganizationDao, PermissionContextDao, PersonDao, PostalAddressDao, RoleDao, StateProvinceDao

Deprecated. use GenericDaoReadOnly and GenericDaoWrite

public interface DataAccessObject

Suggested interface for a class used to retrieve and save persistent objects from a persistance storage; this interface has been heavily influenced by the Hibernate interfaces, and was authored without the benefit of studying existing standards, such as JSRs, or other persistance tools, such as TopLink or Apache's ORM Bridge.

Since:
0.1 - 2005-11-17
Author:
Philippe Paravicini

Method Summary
 void delete(Object persistentObject)
          Deprecated. deletes an object from persistent storage
 Object merge(Object persistentObject)
          Deprecated. Copied from the Hibernate docs: Copy the state of the given object onto the persistent object with the same identifier.
 void refresh(Object persistentObject)
          Deprecated. Retrieves an object from persistent storage and refreshes its state in memory
 Serializable save(Object persistentObject)
          Deprecated. Saves an object into persistent storage
 void saveOrUpdate(Object persistentObject)
          Deprecated. Used when it is desireable to save objects, whether or not they have been saved before or not; this method will first check whether the object already exists in storage, and will than call Save or Update, accordingly
 void update(Object persistentObject)
          Deprecated. Updates an already existing object, throws an exception if the object has not yet been saved
 

Method Detail

update

void update(Object persistentObject)
            throws DataAccessException
Deprecated. 
Updates an already existing object, throws an exception if the object has not yet been saved

Throws:
DataAccessException

save

Serializable save(Object persistentObject)
                  throws DataAccessException
Deprecated. 
Saves an object into persistent storage

Throws:
DataAccessException

saveOrUpdate

void saveOrUpdate(Object persistentObject)
                  throws DataAccessException
Deprecated. 
Used when it is desireable to save objects, whether or not they have been saved before or not; this method will first check whether the object already exists in storage, and will than call Save or Update, accordingly

Throws:
DataAccessException

delete

void delete(Object persistentObject)
            throws DataAccessException
Deprecated. 
deletes an object from persistent storage

Throws:
DataAccessException

refresh

void refresh(Object persistentObject)
             throws DataAccessException
Deprecated. 
Retrieves an object from persistent storage and refreshes its state in memory

Throws:
DataAccessException

merge

Object merge(Object persistentObject)
Deprecated. 
Copied from the Hibernate docs: Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent instance currently associated with the session, it will be loaded. Return the persistent instance. If the given instance is unsaved, save a copy of and return it as a newly persistent instance. The given instance does not become associated with the session. The semantics of this method are defined by JSR-220.



Copyright © 2005-2013 Janux. All Rights Reserved.