01: /**
02: * Report DAO interface.
03: */package org.emforge.report.dao;
04:
05: import java.util.Collection;
06:
07: import org.emforge.xfer.ReportTO;
08:
09: /**
10: * Report DAO interface.
11: *
12: * @author szakusov, 10.04.2008: created.
13: */
14: public interface ReportDaoInterface {
15:
16: /**
17: * Retrieves a report object by identifier
18: *
19: * @param i_id is a report identifier
20: * @return Found report or <code>null</code> if required report will not be found.
21: */
22: public Report getById(Long i_id);
23:
24: /**
25: * Retrieves a report object by name
26: *
27: * @param i_name is a name of required report
28: * @return Found report or <code>null</code> if required report will not be found.
29: */
30: public Report getByName(String i_name);
31:
32: /**
33: * Returns a list of all reports in the system
34: *
35: * @return java.util.Collection of reports
36: */
37: public Collection<Report> getAll();
38:
39: /**
40: * Saves the specified report. If specified report does not exist in the data store then we should insert it, else
41: * just update it
42: *
43: * @param i_report is a report to save
44: * @return Synchronized report object
45: */
46: public Report save(Report i_report);
47:
48: /**
49: * Finds a report by name like name of the specified report and updates found report or just creates a new one. <br>
50: * REM: if report with specified name does not exist in the data store then it will be created.
51: *
52: * @param i_report is a report transfer object to save
53: * @return Synchronized report object
54: */
55: public Report save(ReportTO i_report);
56:
57: /**
58: * Deletes the specified report from the data store
59: *
60: * @param i_report is a report to delete
61: */
62: public void delete(Report i_report);
63:
64: /**
65: * Deletes the specified report from the data store
66: *
67: * @param i_name is a name of report to delete
68: */
69: public void delete(String i_name);
70: }
|