📄 petmgrimpl.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 + -