1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package com.ebay.carad.os.vitalsigns.dao;
22
23 import java.util.List;
24
25 /***
26 * Defines an interface for executing arbitrary SQL against a database.
27 * Used to assist in accessing raw data for arbitrary reports, or as a data
28 * source from which data can be pulled to be logged as a DataPoint for
29 * a "data in timeline" type report.
30 *
31 * @author Jeremy Kraybill
32 * @author Jeremy Thomerson
33 * @version $Id$
34 */
35 public interface ISqlDAO {
36
37 /***
38 * Executes an arbitrary SQL select statement against the configured connection,
39 * and returns the result as a List of Maps (via Commons DbUtils).
40 *
41 * @param query the SQL query to run
42 * @return a list of maps
43 */
44 public List findBySqlQuery(String query);
45
46 /***
47 * Executes an arbitrary SQL UPDATE or INSERT statement against the configured connection.
48 *
49 * @param query the SQL query to run
50 * @return the number of affected rows
51 */
52 public int updateWithSQL(String query);
53
54 }