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

📄 categoryserviceimpl.java

📁 采用最新Struts2+Hibernate架构开发
💻 JAVA
字号:
package org.itfuture.www.service.impl;

import java.util.List;

import org.itfuture.www.dao.CategoryDao;
import org.itfuture.www.dao.impl.CategoryDaoImpl;
import org.itfuture.www.po.Category;
import org.itfuture.www.po.Item;
import org.itfuture.www.po.Product;
import org.itfuture.www.service.CategoryService;
//服务接口的实现类,调用的全是CategoryDao中的方法
public class CategoryServiceImpl implements CategoryService {
	public CategoryDao getCategoryDao() {
	
		return  new CategoryDaoImpl();
	}

	public List <Category> getCategory() {

		return this.getCategoryDao().getCategory();
	}

	public List <Item> getItem(String productid) {
		
		return this.getCategoryDao().getItem(productid);
	}

	public List <Product> getProduct(String catid) {
	
		return this.getCategoryDao().getProduct(catid);
	}
	
	
 public Item getOneItem(String itemid) {
		return this.getCategoryDao().getOneItem(itemid);
	}

public static void main(String[]arghs){
	 CategoryServiceImpl c = new CategoryServiceImpl();
	 List list = c.getItem("1");
	 System.out.println(list);
 }
}

⌨️ 快捷键说明

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