-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentDAO.java
More file actions
42 lines (33 loc) · 993 Bytes
/
Copy pathStudentDAO.java
File metadata and controls
42 lines (33 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com;
import java.util.List;
import javax.sql.DataSource;
public interface StudentDAO {
/**
* This is the method to be used to initialize database resources ie.
* connection.
*/
public void setDataSource(DataSource ds);
/**
* This is the method to be used to create a record in the Student table.
*/
public void create(Integer id,String name, Integer age);
/**
* This is the method to be used to list down a record from the Student
* table corresponding to a passed student id.
*/
public Student getStudent(Integer id);
/**
* This is the method to be used to list down all the records from the
* Student table.
*/
public List<Student> listStudents();
/**
* This is the method to be used to delete a record from the Student table
* corresponding to a passed student id.
*/
public void delete(Integer id);
/**
* This is the method to be used to update a record into the Student table.
*/
public void update(Integer id, Integer age);
}