• λ我爱Aspx >> Asp.Net >> struts和hibernate简单问题
  • struts和hibernate简单问题

  • :aspxer  Դ:csdn  :2007-7-6 2:38:00  ؼ:
  • /**

    * @param args

    */

    private Session session;

    private Logger log;

    public static void main(String[] args) {

    MyTest myTest = new MyTest();

    try{

    myTest.setUp();

    myTest.testCreateDomains();

    myTest.testAddRemoveRelation();

    //myTest.listBooks();

    myTest.tearDown();

    }catch(Exception e){

    e.printStackTrace();

    }

    }

    private void testCreateDomains(){

    Transaction tx = session.beginTransaction();

    Book book = new Book();

    book.setAuthor("Sebastian");

    book.setTitle("Hibernate in Winter");

    book.setBorrowallowed(new Short((short)1));

    session.save(book);

    tx.commit();

    tx = session.beginTransaction();

    Customer customer = new Customer();

    customer.setFirstname("Carsten");

    customer.setLastname("Liebzeit");

    Ҷƪл˵?
  • һƪ如何遍历窗体上的控件并按TYPE给它定具体风格
    һƪ用spring创建sessionFactory时的错误