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
* @ClassName: TrainDao * <p></p>
* @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 {
/**
/** *
* * <p>Train</p>
* @return 1 * @param train
* @throws SQLException * @return 10
*/ * @throws SQLException
int add(Train train) throws SQLException; */
int add(Train train) throws SQLException;
/**
* /**
* @return 1 * ID
* @throws SQLException * <p>IDID</p>
*/ * @param trainId ID
int delete(Integer trainId) throws SQLException; * @return 10
* @throws SQLException
/** */
* int delete(Integer trainId) throws SQLException;
* @return 1
* @throws SQLException /**
*/ *
int update(Train train) throws SQLException; * <p>TrainID</p>
* @param train
/** * @return 10
* * @throws SQLException
* @return Trainlist */
* @throws SQLException int update(Train train) throws SQLException;
*/
List<Train> getAll() throws SQLException; /**
*
/** * <p></p>
* id * @return
* @return Train * @throws SQLException
* @throws SQLException */
*/ List<Train> getAll() throws SQLException;
Train getById(Integer trainId) throws SQLException;
/**
/** * ID
* * <p>IDID</p>
* @return Trainlist * @param trainId ID
* @throws SQLException * @return ID
*/ * @throws SQLException
List<Train> getByTrainNumber(String trainNumber) throws SQLException; */
Train getById(Integer trainId) throws SQLException;
/**
* /**
* @param startStation *
* @param endStation * <p></p>
* @param startTime * @param trainNumber
* @return Train * @return
* @throws SQLException * @throws SQLException
*/ */
List<Train> getByStartEndStation(String startStation, String endStation, String startTime) throws SQLException; List<Train> getByTrainNumber(String trainNumber) throws SQLException;
/** /**
* *
* @return * <p></p>
* @throws SQLException * @param startStation
*/ * @param endStation
List<Train> getAllStartStation() throws SQLException; * @param startTime
* @return
/** * @throws SQLException
* */
* @return List<Train> getByStartEndStation(String startStation, String endStation, String startTime) throws SQLException;
* @throws SQLException
*/ /**
List<Train> getAllEndStation() throws SQLException; *
* <p></p>
* @return
* @throws SQLException
*/
List<Train> getAllStartStation() throws SQLException;
/**
*
* <p></p>
* @return
* @throws SQLException
*/
List<Train> getAllEndStation() throws SQLException;
} }

Loading…
Cancel
Save