Package de.mhus.lib.test.adb.model

Examples of de.mhus.lib.test.adb.model.Book


     
      UUID p2 = p.getId();
     
      // create books
     
      Book b = new Book();
      b.setName("Yust Another Boring Book");
      manager.createObject(b);
      UUID b1 = b.getId();
     
      b.setId(null);
      b.setName("Mystic Almanach");
      manager.createObject(b);
      UUID b2 = b.getId();
     
      // get a book and modify
     
      b = (Book) manager.getObject(Book.class, b1);
      b.setLendToId(p1);
      manager.saveObject(b);
     
      b.setLendToId(null);
      manager.saveObject(b);
     
      b.setLendToId(p2);
      b.setAuthorId(new UUID[] {p1});
      manager.saveObject(b);

      Book copy = (Book) manager.getObject(Book.class, b.getId());
      assertEquals(copy.getAuthorId()[0],p1) ;

     
      // test relations
      assertNotNull(b.getLendTo());
      Person rel = b.getLendTo().getRelation();
View Full Code Here

TOP

Related Classes of de.mhus.lib.test.adb.model.Book

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.