xs3201serviceimpl.java

来自「一个完整的物流系统」· Java 代码 · 共 82 行

JAVA
82
字号
package jp.com.cost.xs.service.impl;

import java.util.List;

import jp.com.cost.dao.ShipDao;
import jp.com.cost.pojo.Ship;
import jp.com.cost.xs.service.XS3201Service;

/**
 * Service类,通过调用ShipDao中的方法实现查询和删除功能
 * 
 * @author 彭启刚
 * @version1.0
 */
public class XS3201ServiceImpl implements XS3201Service {

	private ShipDao shipDao;

	public ShipDao getShipDao() {
		return shipDao;
	}

	public void setShipDao(ShipDao shipDao) {
		this.shipDao = shipDao;
	}

	/**
	 * 查询所有船期信息
	 * 
	 * @param --null
	 * @return--List 返回List对象
	 */
	public List searchAll() {
		// TODO Auto-generated method stub
		List list = shipDao.findShipAll();
		return list;
	}

	/**
	 * 根据条件查询船期信息
	 * 
	 * @param String
	 *            startPort--起运港
	 * @param String
	 *            aimPort --目的港
	 * @return --List 返回List对象
	 */
	public List searchByCon(String startPort, String aimPort) {
		// TODO Auto-generated method stub
		List list = shipDao.findByCon(startPort, aimPort);
		return list;
	}

	/**
	 * 根据ID查询船期信息
	 * 
	 * @param String
	 *            id--船期ID
	 * @return Ship --返回查询到的Ship对象
	 */
	public Ship searchById(String id) {
		// TODO Auto-generated method stub

		Ship ship = shipDao.findById(id);
		return ship;
	}

	/**
	 * 根据ID删除对于的船期信息
	 * 
	 * @param String
	 *            id--船期ID
	 * @return boolean 返回操作的结果
	 */
	public boolean delete(String oid) {
		// TODO Auto-generated method stub
		boolean bln = false;
		bln = shipDao.delete(oid);
		return bln;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?