Package com.charitas.dao.impl

Examples of com.charitas.dao.impl.ProductDAOImpl


* @author edepe1
*/
public class TestClass {
    public static void main(String[] args) {
        try {
            ProductDAO productDAO = new ProductDAOImpl(DatabaseConnection.getInstance().getConnection());
            Calendar cal = Calendar.getInstance();
           
            Category cat1 = new Category();
            cat1.setId(1);
           
            Product prod1 =new Product();
            prod1.setCategory(cat1);
            prod1.setDescription("tes prod");
            prod1.setExpiredDate(cal.getTime());
            prod1.setName("permen");
            prod1.setPrice(7500);
            productDAO.save(prod1);
                   
            Product product = new Product();
            List<Product> allData = productDAO.findAll();
           
            for(int i = 0; i < allData.size(); i++ ){
                Category cat = new Category();
               
                product = allData.get(i);
View Full Code Here


    public InternalFrameProduct() {
       
        initComponents();
        try {
           
            productDAO = new ProductDAOImpl(DatabaseConnection.getInstance().getConnection() );
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(InternalFrameProduct.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(InternalFrameProduct.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

TOP

Related Classes of com.charitas.dao.impl.ProductDAOImpl

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.