* @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);