customerserviceimp.java

来自「用STRUTS ,HIBERNATE, SPRING 三种框架整合做的实战项目」· Java 代码 · 共 36 行

JAVA
36
字号
package com.ghy.service.customer;

import java.util.List;

import com.ghy.base.BaseService;
import com.ghy.data.customer.Customer;

public class CustomerServiceImp extends BaseService implements
		CustomerServiceIfc {

	public boolean saveCustomer(Customer customer) {

		if (findCustomerByName(customer.getName()).size() == 0)
			
		{
			getBookDaoFactory().getCustomerDao().saveCustomer(customer);
			return true;
		}
		else
			return false ;

	}

	public List findCustomerByName(String name) {
		// TODO Auto-generated method stub
		return getBookDaoFactory().getCustomerDao().findCustomerByName(name);
	}

	public boolean checkCustomer(String name, String password) {
		// TODO Auto-generated method stub
		return getBookDaoFactory().getCustomerDao().checkCustomer(name, password);
	}
	

}

⌨️ 快捷键说明

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