Update TrainDao.java ysx

pull/1/head
prwfxgajt 8 months ago
parent 8b8cb5df31
commit 1cf6336e5a

@ -1,82 +1,96 @@
package com.cn.dao; package com.cn.dao; // 定义接口所在的包名
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实体类
/** /**
* * TrainDao访DAO
* <p></p>
* @ClassName: TrainDao * @ClassName: TrainDao
* @Description: Train * @Description: Train
* @author: ljy * @author: ljy
* @date: 201991 1:33:46 * @date: 201991 1:33:46
*/ */
public interface TrainDao { public interface TrainDao {
/** /**
* *
* @return 1 * <p>Train</p>
* @throws SQLException * @param train
* @return 10
* @throws SQLException
*/ */
int add(Train train) throws SQLException; int add(Train train) throws SQLException;
/** /**
* * ID
* @return 1 * <p>IDID</p>
* @throws SQLException * @param trainId ID
* @return 10
* @throws SQLException
*/ */
int delete(Integer trainId) throws SQLException; int delete(Integer trainId) throws SQLException;
/** /**
* *
* @return 1 * <p>TrainID</p>
* @throws SQLException * @param train
* @return 10
* @throws SQLException
*/ */
int update(Train train) throws SQLException; int update(Train train) throws SQLException;
/** /**
* *
* @return Trainlist * <p></p>
* @throws SQLException * @return
* @throws SQLException
*/ */
List<Train> getAll() throws SQLException; List<Train> getAll() throws SQLException;
/** /**
* id * ID
* @return Train * <p>IDID</p>
* @throws SQLException * @param trainId ID
* @return ID
* @throws SQLException
*/ */
Train getById(Integer trainId) throws SQLException; Train getById(Integer trainId) throws SQLException;
/** /**
* *
* @return Trainlist * <p></p>
* @throws SQLException * @param trainNumber
* @return
* @throws SQLException
*/ */
List<Train> getByTrainNumber(String trainNumber) throws SQLException; List<Train> getByTrainNumber(String trainNumber) throws SQLException;
/** /**
* *
* <p></p>
* @param startStation * @param startStation
* @param endStation * @param endStation
* @param startTime * @param startTime
* @return Train * @return
* @throws SQLException * @throws SQLException
*/ */
List<Train> getByStartEndStation(String startStation, String endStation, String startTime) throws SQLException; List<Train> getByStartEndStation(String startStation, String endStation, String startTime) throws SQLException;
/** /**
* *
* @return * <p></p>
* @throws SQLException * @return
* @throws SQLException
*/ */
List<Train> getAllStartStation() throws SQLException; List<Train> getAllStartStation() throws SQLException;
/** /**
* *
* @return * <p></p>
* @throws SQLException * @return
* @throws SQLException
*/ */
List<Train> getAllEndStation() throws SQLException; List<Train> getAllEndStation() throws SQLException;
} }

Loading…
Cancel
Save