Biblioteca Java - Blame information for rev 14
Subversion Repositories:
Rev | Author | Line No. | Line |
---|---|---|---|
14 | mihai | 1 | package hm.spring.web.dao; |
2 | |||
3 | import hm.spring.web.domain.Student; | ||
4 | |||
5 | import java.util.List; | ||
6 | |||
7 | import javax.sql.DataSource; | ||
8 | |||
9 | public interface StudentDAO { | ||
10 | /** | ||
11 | * This is the method to be used to initialize | ||
12 | * database resources ie. connection. | ||
13 | */ | ||
14 | public void setDataSource(DataSource ds); | ||
15 | /** | ||
16 | * This is the method to be used to create | ||
17 | * a record in the Student table. | ||
18 | */ | ||
19 | public void create(String name, Integer age); | ||
20 | /** | ||
21 | * This is the method to be used to list down | ||
22 | * a record from the Student table corresponding | ||
23 | * to a passed student id. | ||
24 | */ | ||
25 | public Student getStudent(Integer id); | ||
26 | /** | ||
27 | * This is the method to be used to list down | ||
28 | * all the records from the Student table. | ||
29 | */ | ||
30 | public List<Student> listStudents(); | ||
31 | /** | ||
32 | * This is the method to be used to delete | ||
33 | * a record from the Student table corresponding | ||
34 | * to a passed student id. | ||
35 | */ | ||
36 | public void delete(Integer id); | ||
37 | /** | ||
38 | * This is the method to be used to update | ||
39 | * a record into the Student table. | ||
40 | */ | ||
41 | public void update(Integer id, Integer age); | ||
42 | |||
43 | } |