📄 petserviceimpl.java
字号:
package com.sean.pet.model.service.impl;
import java.util.List;
import com.sean.pet.hibernate.dao.PetDao;
import com.sean.pet.hibernate.po.Pet;
import com.sean.pet.model.service.PetService;
import com.sean.pet.modelfactory.ModelFactory;
public class PetServiceImpl implements PetService {
private PetDao petDao = null;
public PetServiceImpl(){
petDao = (PetDao)ModelFactory.getBean("com.sean.pet.hibernate.dao.impl.PetDaoImpl");
}
public void delete(String id) {
// TODO Auto-generated method stub
this.petDao.delete(id);
}
public List findAll() {
// TODO Auto-generated method stub
return this.petDao.findAll();
}
public Pet findByID(String id) {
// TODO Auto-generated method stub
return this.petDao.findByID(id);
}
public void save(Pet pet) {
// TODO Auto-generated method stub
this.petDao.save(pet);
}
public void update(Pet pet) {
// TODO Auto-generated method stub
this.petDao.update(pet);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -