⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 petmgrimpl.java

📁 爱心”宠物诊所的职员需要使用系统提供的如下功能: 浏览诊所的兽医以及他们的专业特长; 浏览宠物的主人(即诊所的客户)的相关信息; 更新宠物的主人的相关信息; 向系统中增加一个新客户; 浏览宠
💻 JAVA
字号:
package com.wzxy.business;

import java.util.ArrayList;
import java.util.List;

import com.wzxy.dao.IPetService;
import com.wzxy.dao.PetServiceImpl;
import com.wzxy.exception.DBException;
import com.wzxy.exception.LoginFailedException;
import com.wzxy.exception.PetOrOwnerNotExistsException;
import com.wzxy.exception.VetNotExistsException;
import com.wzxy.exception.VisitHistoryNotExist;
import com.wzxy.pojos.EmpDTO;
import com.wzxy.pojos.Fenye;
import com.wzxy.pojos.PetDTO;
import com.wzxy.pojos.PetOwnerDTO;
import com.wzxy.pojos.PetVisitDTO;

public class PetMgrImpl implements IPetMgr {

	public EmpDTO LoginVerify(String name, String pwd)
			throws LoginFailedException, DBException {
		IPetService service = new PetServiceImpl();
		EmpDTO emp = service.LoginVerify(name, pwd);
		return emp;
	}

	public List VetSearch(String name, String vetSpecName) throws DBException, VetNotExistsException {
		IPetService service = new PetServiceImpl();
		ArrayList list = (ArrayList) service.VetSearch(name, vetSpecName);
		return list;
	}

	public List PetSearch(String petName, String ownerName,Fenye fy) throws PetOrOwnerNotExistsException, DBException {
		IPetService service = new PetServiceImpl();
		ArrayList list = (ArrayList) service.PetSearch(petName, ownerName,fy);
		return list;
	}

	public PetDTO selectPetById(int petId) throws DBException {
		IPetService service = new PetServiceImpl();
		PetDTO pet=service.selectPetById(petId);
		return pet;
	}

	public void updatePet(PetDTO pet) throws DBException {
		IPetService service = new PetServiceImpl();
		service.updatePet(pet);
		
	}

	public List selectPetTypes() throws DBException {
		IPetService service = new PetServiceImpl();
		ArrayList list = (ArrayList) service.selectPetTypes();
		return list;
	}

	public List selectPetOwners() throws DBException {
		IPetService service = new PetServiceImpl();
		ArrayList list = (ArrayList) service.selectPetOwners();
		return list;
	}

	public void addPet(PetDTO pet) throws DBException {
		IPetService service = new PetServiceImpl();
		service.addPet(pet);
		
	}

	public void addPetOwner(PetOwnerDTO petOwner) throws DBException {
		IPetService service = new PetServiceImpl();
		service.addPetOwner(petOwner);
	}

	public void updatePetOwner(PetOwnerDTO petOwner) throws DBException {
		IPetService service = new PetServiceImpl();
		service.updatePetOwner(petOwner);
	}

	public PetOwnerDTO viewPetOwner(int petOwnerId) throws DBException {
		IPetService service = new PetServiceImpl();
		PetOwnerDTO owner=service.viewPetOwner(petOwnerId);
		return owner;
	}

	public List searchPetVisitHistory(int petId) throws DBException, VisitHistoryNotExist {
		IPetService service = new PetServiceImpl();
		ArrayList list=(ArrayList) service.searchPetVisitHistory(petId);
		return list;
	}

	public void addVisitHistory(PetVisitDTO visit) throws DBException {
		IPetService service = new PetServiceImpl();
		service.addVisitHistory(visit);
		
	}

}

⌨️ 快捷键说明

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