📄 suppliermanagerimpl.java
字号:
package com.university.goodsmanager.biz.service.impl;import java.util.ArrayList;import java.util.List;import com.university.goodsmanager.biz.entity.Supplier;import com.university.goodsmanager.biz.service.interf.SupplierManager;import com.university.goodsmanager.dao.hbndao.HbnDao;import com.university.goodsmanager.dao.hbndao.HbnDaoImpl;public class SupplierManagerImpl implements SupplierManager { public boolean add(Supplier supplier) { HbnDao hbndao=new HbnDaoImpl(); boolean flag=false; try { hbndao.save(supplier); flag=true; } catch (Exception e) { e.printStackTrace(); } return flag; } public boolean remove(Supplier supplier) { boolean flag=true; HbnDao hbndao=new HbnDaoImpl(); try { hbndao.delete(supplier); } catch (Exception e) { flag=false; } return flag; } public boolean modify(Supplier supplier) { boolean flag=true; HbnDao hbndao=new HbnDaoImpl(); try { hbndao.update(supplier); } catch (Exception e) { flag=false; } return flag; } public List query() { List list=new ArrayList(); HbnDao hbndao=new HbnDaoImpl(); try { list=hbndao.querySupplier(); } catch (Exception e) { e.printStackTrace(); } return list; } public Supplier query(Supplier supplier) { int supplier_id=supplier.getSupplier_id(); HbnDao hbndao=new HbnDaoImpl(); try { supplier=hbndao.querySupplier(supplier_id); } catch (Exception e) { } return supplier; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -