/* * Created on 2005-10-12 * * TODO To change the template for this generated file go to * Window - PReferences - java - Code Style - Code Templates */ package testdemo;
import java.util.HashSet; import java.util.Set;
/** * @author liuzj * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */
/* * Created on 2005-10-13 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package testdemo;
/** * @author liuzj * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */
import java.io.Serializable; public class Order implements Serializable {
/* * Created on 2005-10-12 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package testdemo;
/** * @author liuzj * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */
public class Test {
SessionFactory sessionFactory = new Configuration().configure().addClass( testdemo.Customer.class).addClass(Order.class).buildSessionFactory(); Session session = sessionFactory.openSession(); public void saveCustomer(Customer customer) throws Exception {