39 * @throws SQLException on any kind of SQL errors |
39 * @throws SQLException on any kind of SQL errors |
40 */ |
40 */ |
41 List<T> list() throws SQLException; |
41 List<T> list() throws SQLException; |
42 |
42 |
43 /** |
43 /** |
|
44 * Finds an entity by its integer ID. |
|
45 * |
|
46 * @param id the id |
|
47 * @return the enity or null if there is no such entity |
|
48 * @throws SQLException on any kind of SQL errors |
|
49 */ |
|
50 T find(int id) throws SQLException; |
|
51 |
|
52 /** |
44 * Inserts an instance into database. |
53 * Inserts an instance into database. |
45 * |
54 * |
46 * @param instance the instance to insert |
55 * @param instance the instance to insert |
47 * @throws SQLException on any kind of SQL errors |
56 * @throws SQLException on any kind of SQL errors |
48 */ |
57 */ |