1
2
3
4
5
6
7
8
9 package bexee.dao;
10
11 import bexee.core.ProcessContext;
12
13 /***
14 * The <code>ProcessContextDAO</code> abstracts the underlying data access
15 * implementation for <code>ProcessContext</code> objects to enable
16 * transparent access to the data source.
17 *
18 * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:09 $
19 * @author Patric Fornasier
20 * @author Pawel Kowalski
21 */
22 public interface ProcessContextDAO {
23
24 /***
25 * Inserts a new <code>ProcessContext</code>.
26 *
27 * @param ctx
28 * the <code>ProcessContext</code> to insert
29 * @return the new id of the <code>ProcessContext</code>
30 * @throws DAOException
31 * to indicate that there went something wrong
32 */
33 public String insert(ProcessContext ctx) throws DAOException;
34
35 /***
36 * Finds a <code>ProcessContext</code> given its key.
37 *
38 * @param key
39 * the key of the <code>ProcessContext</code> to find
40 * @return the <code>ProcessContext</code> or null if no
41 * <code>ProcessContext</code> matches the given key
42 * @throws DAOException
43 * to indicate that there went something wrong
44 */
45 public ProcessContext find(String key) throws DAOException;
46
47 /***
48 * Deletes a <code>ProcessContext</code> given its key.
49 *
50 * @param key
51 * the id of the <code>ProcessContext</code> to delete
52 * @throws DAOException
53 * to indicate that there went something wrong
54 */
55 public void delete(String id) throws DAOException;
56
57 /***
58 * Updates an existing <code>ProcessContext</code>.
59 *
60 * @param ctx
61 * the <code>ProcessContext</code> to update
62 * @throws DAOException
63 * to indicate that there went something wrong
64 */
65 public void update(ProcessContext ctx) throws DAOException;
66
67 }