01: package org.contineo.core.document.dao;
02:
03: import java.util.Collection;
04:
05: import org.contineo.core.document.History;
06:
07: /**
08: * DAO for <code>History</code> handling.
09: *
10: * @author Michael Scholz
11: * @author Alessandro Gasparini
12: */
13: public interface HistoryDAO {
14:
15: /**
16: * This method persists a history object.
17: *
18: * @param history History to be stored.
19: * @return True if successfully stored in a database.
20: */
21: public boolean store(History history);
22:
23: /**
24: * This method deletes a history.
25: *
26: * @param historyid ID of the history which should be delete.
27: */
28: public boolean delete(int historyid);
29:
30: /**
31: * This method selects all histories of a given document.
32: *
33: * @param docId - ID of the document.
34: */
35: public Collection<History> findByDocId(int docId);
36:
37: /**
38: * This method selects all histories of a given username.
39: *
40: * @param username
41: */
42: public Collection<History> findByUsername(String username);
43: }
|