完成了接口和基本的类定义
This commit is contained in:
33
src/backend/controller/interfaces/QueryController.java
Normal file
33
src/backend/controller/interfaces/QueryController.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package backend.controller.interfaces;
|
||||
import backend.service.interfaces.DataQueryService;
|
||||
|
||||
/**
|
||||
* 查询控制器接口
|
||||
* 定义了数据查询和管理的相关操作接口
|
||||
*/
|
||||
public interface QueryController {
|
||||
DataQueryService dataService;
|
||||
//getter/setter
|
||||
|
||||
/**
|
||||
* 显示所有数据项
|
||||
* 该方法用于获取并展示系统中的全部数据记录
|
||||
*/
|
||||
void displayAll();
|
||||
|
||||
/**
|
||||
* 根据关键字搜索数据
|
||||
* @param keyword 搜索关键字,用于匹配数据项的标题、描述等字段
|
||||
*/
|
||||
void searchData(String keyword);
|
||||
|
||||
/**
|
||||
* 添加新的数据项
|
||||
* @param title 数据项标题
|
||||
* @param desc 数据项描述
|
||||
* @param category 数据项分类
|
||||
* @param userId 用户ID,标识数据项的创建者
|
||||
*/
|
||||
void addDataItem(String title, String desc, String category, int userId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user