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

Loading…
Cancel
Save