?? categoryservice.java
字號(hào):
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.shopping.model;import com.shopping.dao.CategoryDAO;import com.shopping.dao.CategoryFactory;import java.util.List;/** * * @author Administrator */public class CategoryService { private static CategoryDAO dao; private static CategoryService instance = null; private CategoryService(){ dao = CategoryFactory.getDao(); } public static CategoryService getInstance(){ if(instance == null){ instance = new CategoryService(); } return instance; } //................. public int save(Category c){ return dao.save(c); } public List<Category> getCategorys(){ return dao.getCategorys(); } public void addChildCategory(int pid, String cname, String cdescr,int grade){ dao.addChildCategory(pid, cname, cdescr, grade); } public void delete(int id,int pid){ dao.delete(id, pid); }}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -