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

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