Package by.bsuir.hypermarket.dao.concrete

Examples of by.bsuir.hypermarket.dao.concrete.GoodsDao


   
    List<Goods> goodsList = null;
    try {
      switch (showGoodsType) {
      case Commands.SHOW_GOODS_BY_CATEGORY :
        GoodsDao goodsDao = new GoodsDao();
        int categoryUid = Integer.parseInt(request.getParameter(Commands.SHOW_GOODS_CATEGOTY));
        goodsList = goodsDao.findEntitiesByCategory(categoryUid);
        break;
      case Commands.SHOW_GOODS_BY_DEPARTMENT :
        GoodsDao goodsDepDao = new GoodsDao();
        int departmentUid = Integer.parseInt(request.getParameter(Commands.SHOW_GOODS_DEPARTMENT));
        goodsList = goodsDepDao.findEntitiesByDepartment(departmentUid);
        break;
      default:
        AbstractDao<Goods> abstrGoodsDao = new GoodsDao();
        goodsList = abstrGoodsDao.findAll();   
        break;
      }
    } catch (DaoException e) {
      log.error("Was not able to get goods data", e);
   
View Full Code Here

TOP

Related Classes of by.bsuir.hypermarket.dao.concrete.GoodsDao

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.