Examples of ICategoryDao


Examples of com.lgx8.gateway.dao.ICategoryDao

    return getHibernateTemplate().find(hql);
  }
 
  public static void main(String[] args) {
    ApplicationContext ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
    ICategoryDao categoryDao = (ICategoryDao) ac.getBean("categoryDao");
    List<Category> list = categoryDao.findAllCategoryList(new Long(5));
    for(int i=0;i<list.size();i++) {
      System.out.println(list.get(i).getName());
    }
  }
View Full Code Here

Examples of com.lgx8.gateway.dao.ICategoryDao

    String id = request.getParameter("categoryId");
    String sendMsg = request.getParameter("sendMsg");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
   
    ICategoryDao categoryDao = (ICategoryDao)ac.getBean("categoryDao");
    Category category = categoryDao.findCategory(Long.parseLong(id));
   
    if(category != null)
    {
      category.setName(name);
      category.setDescription(description);
      category.setSendMsg(sendMsg);
      categoryDao.updateCategory(category);
    }
   
   
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    //更新ServletContext中的目录列表
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.