Package com.apress.prospring.ch10.domain

Examples of com.apress.prospring.ch10.domain.Test


   
  private void test() {
    TestDao testDao = (TestDao)context.getBean("testDao");
    List tests = testDao.getAll();
    for (Iterator i = tests.iterator(); i.hasNext();) {
      Test test = (Test)i.next();
      System.out.println(test);
    }
   
    Test test1, test2;
    test1 = testDao.getById(1);
    test2 = testDao.getById(1);
    test1.setName("new Name");
    test2.setName("other name");
    testDao.save(test1);
    testDao.save(test2);
  }
View Full Code Here


  /* (non-Javadoc)
   * @see com.apress.prospring.ch11.data.TestDao#delete(int)
   */
  public void delete(int testId) {
    Test t = new Test();
    t.setTestId(testId);
    getHibernateTemplate().delete(t);
  }
View Full Code Here

TOP

Related Classes of com.apress.prospring.ch10.domain.Test

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.