package com.ims.main;

import java.util.Date;
import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;

import com.ims.domain.*;
import com.ims.domain.util.HibernateUtil;
<<<<<<< HEAD
import com.ims.logic.SupplierLogic;
=======
import com.ims.logic.*;
>>>>>>> c7d72bd3c9e9c8dcb46eac3e3669a478be249221

public class MyMain {

	public static void main(String[] args) {
		
//		Session session = HibernateUtil.getSession(); 
//		Transaction tx = session.beginTransaction();
		
//		Date date = new Date();
		/*
		// Test Retail Logic methods
		
		Retailer testRet = RetailerLogic.viewRetailerById(1);
		
		System.out.println(testRet);
		
		
		List<Retailer> testAllRet = RetailerLogic.viewAllRetailers();
		
		for(Retailer all : testAllRet) {
			System.out.println(all);
		}
		*/
		
		//Session session = HibernateUtil.getSession(); 
		//Transaction tx = session.beginTransaction();
		
		//Date date = new Date();
		
		/*
		Supplier supplier = (Supplier) session.get(Supplier.class, 100);		
		Retailer retailer = (Retailer) session.get(Retailer.class, 5);				
		Product product = (Product) session.get(Product.class, 100);		
		*/
		
		/*
		// Test Purchase Order		
		PurchaseOrder purchaseOrder = new PurchaseOrder(date, supplier, retailer, 79.99);		
		session.save(purchaseOrder);			
		
		PurchaseOrder purchaseOrder = (PurchaseOrder) session.get(PurchaseOrder.class, 108);
		System.out.println(purchaseOrder.toString());
		*/
		
		/*
		// Test Purchase Order Line		
		PurchaseOrder purchaseOrder = (PurchaseOrder) session.get(PurchaseOrder.class, 106);
		PurchaseOrderLine poLine = new PurchaseOrderLine(purchaseOrder, product, 25, 50);
		session.save(poLine);		
		
		PurchaseOrderLine poLine = (PurchaseOrderLine) session.get(PurchaseOrderLine.class, 104);
		System.out.println(poLine.toString());
		*/
		
		/*
		// Test Sale	
		Sale sale = new Sale(retailer, product, 45, 49.99, date);
		session.save(sale);				
		
		Sale sale = (Sale) session.get(Sale.class, 102);
		System.out.println(sale.toString());
		*/	
		
		/*
		// Test Inventory
		Inventory inv = new Inventory(retailer, product, 150, 150);		
		session.save(inv);	
		
		Inventory inv = (Inventory) session.get(Inventory.class, 101);
		System.out.println(inv.toString());
		*/
		List<Supplier> supList = SupplierLogic.getAllSuppliers();
		System.out.println(supList);
//		Supplier sup = SupplierLogic.getSupplier(100);
//		System.out.println(sup);
		
//		tx.commit();
//		session.close(); 
		//tx.commit();
		//session.close(); 
	}
	
}

@@ -276,21 +276,8 @@
 il;%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
 impo
@@ -312,16 +312,8 @@
 ic;%0A
-=======%0A
 impo
@@ -336,58 +336,8 @@
 .*;%0A
-%3E%3E%3E%3E%3E%3E%3E c7d72bd3c9e9c8dcb46eac3e3669a478be249221%0A%0A
 publ

remove merge conflict signals from MyMain