You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
715 B
32 lines
715 B
package dao;
|
|
|
|
import domain.Course; // 引入 Course 类,表示课程数据
|
|
|
|
/**
|
|
* CourseDao 接口,定义了对课程数据的数据库访问方法。
|
|
*/
|
|
public interface CourseDao {
|
|
|
|
/**
|
|
* 添加一门选修课程。
|
|
*
|
|
* @param course 需要添加的课程对象
|
|
*/
|
|
void addOptionalCourse(Course course);
|
|
|
|
/**
|
|
* 根据课程 ID 查询课程信息。
|
|
*
|
|
* @param cid 课程 ID
|
|
* @return 返回对应课程的 Course 对象,若未找到,则返回 null
|
|
*/
|
|
Course findSelectCourseByCourseId(String cid);
|
|
|
|
/**
|
|
* 根据课程 ID 删除课程记录。
|
|
*
|
|
* @param cid 课程 ID
|
|
*/
|
|
void deleteServiceById(String cid);
|
|
}
|