Package de.mhus.lib.adb

Examples of de.mhus.lib.adb.DbManager.saveObject()


     
      // 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);
View Full Code Here


      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);
View Full Code Here

      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) ;

     
View Full Code Here

      assertEquals(1,retRel.size());
      assertEquals(b.getId(), retRel.get(0).getId());

      retRel.add(manager.getObject(Book.class, b2));
     
      manager.saveObject(rel);
     
      rel.getLendTo().reset();
      retRel = rel.getLendTo().getRelations();
      assertNotNull(retRel);
      assertEquals(2,retRel.size());
View Full Code Here

      assertEquals(2,retRel.size());
     
      b = manager.getObject(Book.class, b1);
      assertNotNull(b.getLendToId());
      b.getLendTo().setRelation(null);
      manager.saveObject(b);
      assertNull(b.getLendToId());
      b.getLendTo().setRelation(p);
      manager.saveObject(b);
      assertNotNull(b.getLendToId());
     
View Full Code Here

      assertNotNull(b.getLendToId());
      b.getLendTo().setRelation(null);
      manager.saveObject(b);
      assertNull(b.getLendToId());
      b.getLendTo().setRelation(p);
      manager.saveObject(b);
      assertNotNull(b.getLendToId());
     
     
      // remove book
     
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.