net.sf.oness.common.model.dao
Interface AuditableDao

All Known Subinterfaces:
AuditingDao, Dao
All Known Implementing Classes:
HibernateDao

public interface AuditableDao

Interface to be implemented by Data Access Objects that allow data auditing

Version:
$Revision: 1.12 $
Author:
Carlos Sanchez

Method Summary
 AuditableBusinessObject create(AuditableBusinessObject value)
          Create a new object, the id value will be ignored
 AuditableBusinessObject findById(java.io.Serializable id)
          Find an object by its identifier.
 AuditableBusinessObject findWithDetails(java.io.Serializable id)
          Find an object and all related entities by its identifier.
 AuditableBusinessObject update(AuditableBusinessObject value)
          Update an object
 

Method Detail

findById

public AuditableBusinessObject findById(java.io.Serializable id)
Find an object by its identifier. This should return only the specified entity, not the associated ones. This method returns the same object passed as argument.

Parameters:
id - identifier
Returns:
the value with that id, may have properties not initialized
Throws:
org.springframework.dao.DataRetrievalFailureException - if an object with that id doesn't exist

create

public AuditableBusinessObject create(AuditableBusinessObject value)
Create a new object, the id value will be ignored

Parameters:
value -
Returns:
the value created (with id, transactionTime and needed properties initialized)

update

public AuditableBusinessObject update(AuditableBusinessObject value)
Update an object

Parameters:
value - value to update
Returns:
the updated value
Throws:
org.springframework.dao.OptimisticLockingFailureException - if the value has been already updated or deleted

findWithDetails

public AuditableBusinessObject findWithDetails(java.io.Serializable id)
Find an object and all related entities by its identifier.

Parameters:
id - identifier
Returns:
the value with that id and all properties initialized
Throws:
org.springframework.dao.DataRetrievalFailureException - if an object with that id doesn't exist


Copyright © 2003-2005 ONess Project. All Rights Reserved.