customerserviceimpl.java

来自「网上书店源码。功能全面」· Java 代码 · 共 85 行

JAVA
85
字号
/**
 * 
 */
package com.ascent.business.service;

import java.util.List;

import com.ascent.bean.Customer;
import com.ascent.business.ICustomerService;
import com.ascent.dao.ICustomerDAO;

public class CustomerServiceImpl implements ICustomerService{
	
	private ICustomerDAO customerDAO;
	
	/**
	 * 
	 * @return
	 */
	public ICustomerDAO getCustomerDAO(){
		return this.customerDAO;
	}
	
	public void setCustomerDAO(ICustomerDAO customerDAO){
		this.customerDAO = customerDAO;
	}

	/**
	 * 
	 */
	public CustomerServiceImpl() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * 
	 * @param Customer
	 * @return Customer
	 */
	public Customer saveCustomer(Customer customer){
		
		return this.getCustomerDAO().saveCustomer(customer);
	}

	/**
	 * 
	 * @param id Integer
	 *            
	 * @return Customer
	 */
	public Customer getCustomer(int id){
		return this.getCustomerDAO().getCustomer(new Integer(id));
	}

	/**
	 * 
	 * @return List
	 */
	public List findCustomerAll(){
		return this.getCustomerDAO().findCustomerAll();
	}

	/**
	 * 
	 * @param type String
	 *            
	 * @return List
	 */
	public List findCustomerByName(String name){
		return this.getCustomerDAO().findCustomerByName(name);
	}

	/**
	 * 
	 * @param Customer
	 *   
	 */
	public void removeCustomer(Customer customer){
		this.getCustomerDAO().removeCustomer(customer);
	}


}

⌨️ 快捷键说明

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