Examples of ProductDao


Examples of com.lei.dao.ProductDao

  }

  private void all(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
   
    HttpSession session=request.getSession();
    ProductDao dao=new ProductDao();
    List<Product> list=dao.findAll();
    session.setAttribute("prolist", list);
    request.getRequestDispatcher("main.jsp").forward(request, response);
   
  }
View Full Code Here

Examples of com.lei.dao.ProductDao

    String id=new String(request.getParameter("id").getBytes("ISO8859-1"),"UTF-8");
    String name=request.getParameter("name");
    float price=Float.parseFloat(request.getParameter("price"));
   
    Product pro=new Product();
    ProductDao pd=new ProductDao();
   
    pro.setId(id);
    pro.setName(name);
    pro.setPrice(price);
    pro.setShangjia(true);
    pd.save(pro);
   
    List<Product> list=pd.findAll();
   
    PrintWriter out=response.getWriter();
    out.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.print("<product>");
    for(Product p:list){
View Full Code Here

Examples of com.openbravo.pos.pda.dao.ProductDAO

        return category.findAllSubcategories(id);
    }

    public List<ProductInfo> findAuxiliars(String id) {
        product = new ProductDAO();

        return product.findAllAuxiliars(id);
    }
View Full Code Here

Examples of com.openbravo.pos.pda.dao.ProductDAO

        return lines.findLinesByTicket(ticketId);
    }

    public ProductInfo findProductById(String productId) {
        product = new ProductDAO();
        if (productId.contains("+")) {
            String[] str = productId.split("+");
            productId = str[str.length - 1];
        }
        return product.findProductById(productId);
View Full Code Here

Examples of com.openbravo.pos.pda.dao.ProductDAO

        return login.findUser(aLogin, password);
    }

    public List<ProductInfo> findProductsByCategory(String categoryId) {
        product = new ProductDAO();

        return product.findProductsByCategory(categoryId);
    }
View Full Code Here

Examples of com.openbravo.pos.pda.dao.ProductDAO

        return place.findPlaceById(placeId);
    }

    public void addLineToTicket(String ticketId, String productId) {
        ticket = new TicketDAO();
        product = new ProductDAO();
        category = new CategoryDAO();
        tax = new TaxDAO();
        taxesLogic = new TaxesLogic(tax.getTaxList());

        TicketInfo obj = ticket.getTicket(ticketId);
View Full Code Here

Examples of dao.ProductDAO

  public List<Product> getBestSellerListProduct(int soluong) {
    logger.debug("getBestSeller start");
    List<Product> Products = new ArrayList<Product>();
    Session session = HibernateUtil.getSessionFactory().openSession();
    try {
      ProductDAO spDAO = new ProductDAOImpl();
      List<Product> sps = spDAO.getListProduct();
      String hql = "";
      Query query = null;
      int[] listFrequence = new int[sps.size()];
      for (int i = 0; i < sps.size(); i++) {
        hql = " SELECT ls.count FROM Billdetail ls WHERE ls.product=:idProduct";
View Full Code Here

Examples of dao.ProductDAO

  // add a type to database
  public boolean addType(Type type) {
    logger.debug("addType start");
    Session session = HibernateUtil.getSessionFactory().openSession();
    ProductDAO spDAO = new ProductDAOImpl();
    if (spDAO.getInfoProduct(type.getIdtype().toString()) != null) {
      return false;
    }
    Transaction transaction = null;
    try {
      transaction = session.beginTransaction();
View Full Code Here

Examples of dao.ProductDAO

  //add a product to database
  public boolean addProduct(Product sp) {
    logger.debug("addproduct start");
    Session session = HibernateUtil.getSessionFactory().openSession();
    ProductDAO spDAO = new ProductDAOImpl();
    if (spDAO.getInfoProduct(sp.getIdproduct().toString()) != null) {
      return false;
    }
    Transaction transaction = null;
    try {
      transaction = session.beginTransaction();
View Full Code Here

Examples of example.dao.ProductDao

            // Configure the execution context to generate a report...
            executionContext.setEventListener(new HtmlReportGenerator("target/report/report-dao.html"));

            DaoRegister<Object> register =
                MapDaoRegister.builder()
                    .put("product", new ProductDao(em))
                    .put("customer", new CustomerDao(em))
                    .put("order", new OrderDao(em))
                    .build();

            PersistenceUtil.setDAORegister(executionContext, register);
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.