Package org.jugile.proto2.domain

Examples of org.jugile.proto2.domain.Domain.rollback()


    Domain d = Domain.getDomain();
    createDomain(d);
    verifyDomain(d); // before commit, all is in uow
    d.commit();
    verifyDomain(d); // after commit, all is now in dd
    d.rollback();
  }
 
  public static void createDomain(Domain d) {
    Person p1 = d.createPerson();
    p1.setName("Jukka");
View Full Code Here


    assertEquals(1,p2.getFriendFamilies().size());
    d.commit();
    p2 = d.getPerson(p2.id());
    assertEquals(1,p2.getFriendFamilies().size());
   
    d.rollback();
   
  }

  public void testDeleteNNEnd() {
    Domain.reset();
View Full Code Here

   
    f1.delete();
    d.dump("deleted f1");
    assertEquals(0,p1.getFriendFamilies().size());

    d.rollback();
  }
 
 

}
View Full Code Here

    //d.dump("p2.removeFriendFamily(f1) done");

    assertEquals(0,p2.getFriendFamilies().size());
    assertEquals(0,f1.getFriendPersons().size());

    d.rollback();
  }
 
}
View Full Code Here

    assertEquals(0,f1.getPersons().size());
    d.commit();
   
    f1 = d.getFamily(f1.id());
    assertEquals(0,f1.getPersons().size());
    d.rollback();
   
  }
 
}
View Full Code Here

    p1 = d.getPerson(id);
    assertNotNull(p1);
    String name = p1.getName();
    assertEquals("Bart Simpson", name);
   
    d.rollback();
  }
 
  public void testDelete() {
    Domain d = Domain.getDomain();
    for (Person p : d.getPersons()) p.delete();
View Full Code Here

    Family f = (Family)Bo.createNew(Family.class);
    f.setName("Rahkonen");
    p.setFamily(f);

    assertEquals("Rahkonen", p.getFamily().getName());
    d.rollback();
  }
 
  public void testAnno() {
    Person p = new Person();
    print("table: " + p.table());
View Full Code Here

  public void testDomain() {
    Domain d = Domain.getDomain();
    Person p1 = d.createPerson(); // new instance, no origin
    p1.setName("Jukka");
    assertEquals("Jukka",p1.getName());
    d.rollback();
  }
 
 
}
View Full Code Here

public class ConcurrencyTest extends JugileTestCase {
 
  public void testCommitAfterRollback() {
    Domain d = Domain.getDomain();
    d.rollback();
    d.commit();
  }
 
  public void testCommitAndRollback() {
    Domain d = Domain.getDomain();
View Full Code Here

    d.commit();
   
    p = d.getPerson(p.id());
    d.commit();
    d.commit();
    d.rollback();
    p = d.getPerson(p.id());
    d.rollback();
    d.commit();
  }
 
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.