pull/1/head
puxcofief 8 months ago
parent 2b893282b8
commit 991c3418a0

@ -1,74 +1,83 @@
package com.cn.service; package com.cn.service;
import java.sql.SQLException; import java.sql.SQLException; // 导入SQLException类用于处理数据库操作时可能遇到的异常
import java.util.List; import java.util.List; // 导入List接口用于返回列表类型的数据
import com.cn.domain.Train; import com.cn.domain.Train; // 导入Train类该类代表车次的实体
/**
*
*/
public interface TrainService { public interface TrainService {
/**
* /**
* @return 1 *
* @throws SQLException * @param train
*/ * @return 1
int add(Train train); * @throws SQLException SQLException
*/
/** int add(Train train);
*
* @return 1 /**
* @throws SQLException * ID
*/ * @param trainId ID
int delete(Integer trainId); * @return 1
* @throws SQLException SQLException
/** */
* int delete(Integer trainId);
* @return 1
* @throws SQLException /**
*/ *
int update(Train train); * @param train
* @return 1
/** * @throws SQLException SQLException
* */
* @return Trainlist int update(Train train);
* @throws SQLException
*/ /**
List<Train> getAll(); *
* @return ListTrain
/** * @throws SQLException SQLException
* id */
* @return Train List<Train> getAll();
* @throws SQLException
*/ /**
Train getById(Integer trainId); * ID
* @param trainId ID
/** * @return Train
* * @throws SQLException SQLException
* @return Trainlist */
* @throws SQLException Train getById(Integer trainId);
*/
List<Train> getByTrainNumber(String trainNumber); /**
*
/** * @param trainNumber
* * @return ListTrain
* @param startStation * @throws SQLException SQLException
* @param endStation */
* @param startTime List<Train> getByTrainNumber(String trainNumber);
* @return Trainlist
* @throws SQLException /**
*/ *
List<Train> getByStartEndStation(String startStation, String endStation, String startTime); * @param startStation
* @param endStation
/** * @param startTime
* * @return ListTrain
* @return * @throws SQLException SQLException
* @throws SQLException */
*/ List<Train> getByStartEndStation(String startStation, String endStation, String startTime);
List<Train> getAllStartStation();
/**
/** *
* * @return ListTrain
* @return * @throws SQLException SQLException
* @throws SQLException */
*/ List<Train> getAllStartStation();
List<Train> getAllEndStation();
} /**
*
* @return ListTrain
* @throws SQLException SQLException
*/
List<Train> getAllEndStation();
}
Loading…
Cancel
Save