Obj2 o2 = new Obj2();
o2.setDescription("description");
Obj3 o3 = new Obj3();
o3.setAddress("puey 600");
Obj4 o4 = new Obj4();
o4.setPrueba("this is a test");
o1.setObj4(o4);
admin.openAtomicBlock();
admin.save(o1);
admin.save(o2);
admin.save(o3);
admin.closeAtomicBlock();
Obj1 oo1 = new Obj1();
Obj2 oo2 = new Obj2();
Obj3 oo3 = new Obj3();
System.out.println(admin.obtain(oo1, "name = 'diego'"));
System.out.println(admin.obtain(oo2, "description = 'description'"));
System.out.println(admin.obtain(oo3, "address = 'puey 600'"));
System.out.println("diego".equalsIgnoreCase(oo1.getName()));
System.out.println("description".equalsIgnoreCase(oo2.getDescription()));
System.out.println("puey 600".equalsIgnoreCase(oo3.getAddress()));
admin.openAtomicBlock();
admin.save(o2);
admin.save(o3);
admin.cancelAtomicBlock();
ArrayList array1 = admin.obtainAll(Obj2.class, "id > 0");
ArrayList array2 = admin.obtainAll(Obj3.class, "id > 0");
System.out.println(1 == array1.size());
System.out.println(1 == array2.size());
admin.openAtomicBlock();
admin.save(o1);
admin.closeAtomicBlock();
ArrayList array3 = admin.obtainAll(Obj1.class, "id > 0");
System.out.println(2 == array3.size());
Obj4 oo4 = new Obj4();
ArrayList array4 = admin.obtainAll(Obj4.class, "id > 0");
System.out.println(2 == array4.size());
}