Examples of Bob3


Examples of net.sf.joafip.store.service.objectfortest.Bob3

    assertNotNull(MUST_FIND_OBJECT, bob1Lu);
    final Bob2 bob2Lu = bob1Lu.getBob2();
    assertNotNull("read bob1 must contains bob2", bob2Lu);
    assertNotSame("read bob2 must be a copy", bob2, bob2Lu);
    assertEquals(BAD_VALUE, 1, bob2.getVal());
    final Bob3 bob3Lu = bob2Lu.getBob3();
    assertNotNull("read bob2 must contains bob3", bob3Lu);
    assertNotSame("read bob3 must be a copy", bob3, bob3Lu);
    assertEquals(BAD_VALUE, 2, bob3.getVal());
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

    final Bob1 bob1 = new Bob1();
    bob1.setVal(0);
    final Bob2 bob2 = new Bob2();
    bob1.setBob2(bob2);
    bob2.setVal(1);
    final Bob3 bob3 = new Bob3();
    bob2.setBob3(bob3);
    bob3.setVal(2);
    bob3.setBob1(bob1);
    bob3.setBob2(bob2);
    store.setRoot(bob1);
    store.save(true, false);
    // store.checkIntegrity();
    DATA_MANAGER_INTEGRITY_CHECKER.checkIntegrity(dataManager);

    final Bob1 bob1Lu = (Bob1) store.readAndGetRoot();
    assertNotNull(MUST_FIND_OBJECT, bob1Lu);
    final Bob2 Bob2Lu = bob1Lu.getBob2();
    /* Bob2Lu.getVal() should load object */
    assertEquals("read bob2 value must be 1", 1, Bob2Lu.getVal());
    final Bob3 bob3Lu = Bob2Lu.getBob3();
    assertEquals("read bob3 value must be 2", 2, bob3Lu.getVal());
    assertSame("must be same object", bob1Lu, bob3Lu.getBob1());
    assertSame("must be same object", Bob2Lu, bob3Lu.getBob2());
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

      StoreInvalidClassException, StoreNotSerializableException,
      StoreClassNotFoundException, StoreDataCorruptedException,
      HeapException, StoreTooBigForSerializationException {
    final Bob1 bob1 = new Bob1();
    final Bob2 bob2 = new Bob2();
    final Bob3 bob3 = new Bob3();
    bob1.setBob2(bob2);
    bob1.setBob3(bob3);
    bob2.setBob3(bob3);

    bob1.setVal(1);
    bob2.setVal(2);
    bob3.setVal(3);

    store.setRoot(bob1);
    store.save(true, false);
    // store.checkIntegrity();
    DATA_MANAGER_INTEGRITY_CHECKER.checkIntegrity(dataManager);

    final Bob1 bob1Lu = (Bob1) store.readAndGetRoot();
    assertNotNull(MUST_FIND_OBJECT, bob1Lu);
    final Bob3 bob3Lu = bob1Lu.getBob3();
    final Bob2 bob2Lu = bob1Lu.getBob2();
    final Bob3 bob3LuBis = bob2Lu.getBob3();
    assertEquals("value for read bob1 must be 1", 1, bob1Lu.getVal());
    assertEquals("value for read bob2 must be 2", 2, bob2Lu.getVal());
    assertEquals("value for read bob3 must be 3", 3, bob3Lu.getVal());
    assertEquals("value for second read of bob3 must be 3", 3,
        bob3LuBis.getVal());
    bob3Lu.setVal(0);
    assertEquals("must also change second read of bob3", 0,
        bob3LuBis.getVal());
    assertSame("must be same object", bob3Lu, bob3LuBis);
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

      StoreClassNotFoundException, StoreDataCorruptedException {
    final Bob1 bob1 = new Bob1();
    final Bob2 bob2 = new Bob2();
    bob2.setBob1(bob1);
    bob1.setBob2(bob2);
    final Bob3 bob3 = new Bob3();
    bob3.setBob1(bob1);
    bob3.setBob2(bob2);
    store.setRoot(bob1);
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

      StoreInvalidClassException, StoreNotSerializableException,
      StoreClassNotFoundException, StoreDataCorruptedException,
      StoreTooBigForSerializationException {
    final Bob1 bob1 = new Bob1();
    final Bob2 bob2 = new Bob2();
    final Bob3 bob3 = new Bob3();
    bob1.setBob3(bob3);
    bob1.setBob2(bob2);
    store.setRoot(bob1);
    store.save(true, false);

    final Bob1 bob1Lu = (Bob1) store.readAndGetRoot();
    final Bob2 bob2Lu = bob1Lu.getBob2();
    final Bob3 bob3Lu = bob1Lu.getBob3();
    bob2Lu.setBob3(bob3Lu);
    store.save(true, false);
    assertNotNull(ROOT_MUST_BE_DEFINED, store.readAndGetRoot());// for
    // PMD
    // warning
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

      throws StoreException, StoreInvalidClassException,
      StoreNotSerializableException, StoreClassNotFoundException,
      StoreDataCorruptedException, StoreTooBigForSerializationException {
    final Bob1 bob1 = new Bob1();
    final Bob2 bob2 = new Bob2();
    final Bob3 bob3 = new Bob3();
    bob1.setBob3(bob3);
    bob1.setBob2(bob2);
    bob2.setBob3(bob3);
    store.setRoot(bob1);
    store.save(true, false);
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

  }

  @Override
  public Bob3 getBob3() {
    intercept$JOAFIP$();
    final Bob3 bob3 = super.getBob3();
    methodEnd$JOAFIP$();
    return bob3;
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

    filePersistence.setChangeLogEnabled(true, 1);

    session.open();
    bob1 = (Bob1) session.getObject("key");
    bob1.setBob2(null);
    final Bob3 bob3 = new Bob3();
    bob1.setBob3(bob3);
    session.close(EnumFilePersistenceCloseAction.SAVE);

    // changeFileName = filePersistence.getChangeFileName();
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

    BobContainer bobContainer = new BobContainer();
    Bob1 bob1 = new Bob1();
    bobContainer.setObject1(bob1);
    Bob2 bob2 = new Bob2();
    bob1.setBob2(bob2);
    Bob3 bob3 = new Bob3();
    bob2.setBob3(bob3);
    bob3.setBob1(bob1);
    store.setRoot(bobContainer);
    logger.debug("initial save");
    store.save(false, false);
    Map<DataRecordIdentifier, String> map = objectClassMap(new DataRecordIdentifier[] {});
    objectIoManager.clearObjectState();
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.Bob3

    bob1.setVal(10);
    final Bob2 bob2 = new Bob2();
    bob2.setVal(15);
    bob2.setBob1(bob1);
    bob1.setBob2(bob2);
    final Bob3 bob3 = new Bob3();
    bob3.setVal(20);
    bob2.setBob3(bob3);
    bob3.setBob1(bob1);
    bob3.setBob2(bob2);
    bob1.setBob3(bob3);

    byte[] data = marshal(bob1);
    System.out.println("length " + data.length);// NOPMD
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.