Salome HOME
5ea89df318d3890748da9ff1a2df4e9a584f6448
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / dao / kernel / GenericDAO.java
1 /*****************************************************************************
2  * Company         EURIWARE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   08.10.2012
6  * @author         $Author$
7  * @version        $Revision$
8  *****************************************************************************/
9
10 package org.splat.dal.dao.kernel;
11
12 import java.io.Serializable;
13
14 /**
15  * @author rkv
16  * 
17  */
18 public interface GenericDAO<T, PK extends Serializable> {
19
20         /** Persist the newInstance object into database */
21         PK create(T newInstance);
22
23         /**
24          * Retrieve an object that was previously persisted to the database using the indicated id as primary key
25          */
26         T read(PK id);
27
28         /** Save changes made to a persistent object. */
29         void update(T transientObject);
30
31         /** Remove an object from persistent storage in the database */
32         void delete(T persistentObject);
33 }