Package net.sf.joafip.store.entity.objectio

Examples of net.sf.joafip.store.entity.objectio.ObjectAndPersistInfo


    for (int index = 0; index < referencedSons.length; index++) {
      final ObjectClassInfoAndDeclared objectClassInfoAndDeclared = referencedSons[index];
      assertEquals("bad declared class for field #" + index,
          declaredClass[index], objectClassInfoAndDeclared
              .getDeclaredClassInfo().getObjectClass());
      final ObjectAndPersistInfo objectAndPersistInfo = objectClassInfoAndDeclared
          .getObjectAndPersistInfo();
      assertEquals("bad referenced class for field #" + index,
          referencedClass[index],
          objectAndPersistInfo.objectClassInfo.getObjectClass());
      assertSame("bad son object", sonObject[index],
          objectAndPersistInfo.getObject());
    }
  }
View Full Code Here


      final Object object, final ClassInfo classInfo)
      throws HeapException, ObjectIOException,
      ObjectIODataCorruptedException {
    final DataRecordIdentifier dataRecordIdentifier = dataManager
        .getNewDataRecordIdentifier();
    final ObjectAndPersistInfo objectAndItsPersistInfo = objectIOManager
        .getOrCreateObjectPersistInfoOfObject(object, false, classInfo,
            dataRecordIdentifier);
    return objectAndItsPersistInfo;
  }
View Full Code Here

    final BobSerializable bob = new BobSerializable();
    Integer firstField = Integer.valueOf(1);
    bob.setObject(firstField);// first field
    bob.setValue(1);// second field
    bob.setBoolean1(Boolean.TRUE);// third field
    final ObjectAndPersistInfo objectAndItsPersistInfo = createObjectAndItsPersistInfo(bob);
    WriteResult writeResult = write(objectAndItsPersistInfo);
    assertValueChangeForFirstWrite(writeResult);
    assertType(new int[] { HelperBinaryConversion.REFERENCE_TYPE,
        HelperBinaryConversion.INTEGER_TYPE,
        HelperBinaryConversion.BOOLEAN_TYPE }, writeResult);
View Full Code Here

      ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
      HeapException, BinaryConverterException,
      ObjectIOTooBigForSerializationException {
    final WithIntField withIntField = new WithIntField();
    withIntField.setIntField(0);
    final ObjectAndPersistInfo objectAndPersistInfo = createObjectAndItsPersistInfo(withIntField);
    /* initial write */
    WriteResult writeResult = write(objectAndPersistInfo);
    assertValueChangeForFirstWrite(writeResult);
    assertNoSonReferenced(writeResult);
    assertNoReferenceChange(writeResult);
View Full Code Here

      ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
      HeapException, BinaryConverterException,
      ObjectIOTooBigForSerializationException {
    final WithIntegerField withIntegerField = new WithIntegerField();
    withIntegerField.setIntegerField(Integer.valueOf(0));
    final ObjectAndPersistInfo objectAndItsClassInfo = createObjectAndItsPersistInfo(withIntegerField);
    /* initial write */
    WriteResult writeResult = write(objectAndItsClassInfo);
    assertValueChangeForFirstWrite(writeResult);
    assertNoSonReferenced(writeResult);
    assertNoReferenceChange(writeResult);
View Full Code Here

      ObjectIOInvalidClassException, ObjectIONotSerializableException,
      ObjectIODataRecordNotFoundException,
      ObjectIOClassNotFoundException, BinaryConverterException,
      ObjectIOTooBigForSerializationException {
    final WithObjectField withObjectField = new WithObjectField();
    final ObjectAndPersistInfo objectAndPersistInfo = createObjectAndItsPersistInfo(withObjectField);
    /* initial write */
    Integer fieldValue = Integer.valueOf(0);
    withObjectField.setObject(fieldValue);
    WriteResult writeResult = write(objectAndPersistInfo);
    assertValueChangeForFirstWrite(writeResult);
View Full Code Here

      ObjectIOInvalidClassException, ObjectIONotSerializableException,
      ObjectIODataRecordNotFoundException,
      ObjectIOClassNotFoundException, BinaryConverterException,
      ObjectIOTooBigForSerializationException {
    final Object[] array = new Object[2];
    final ObjectAndPersistInfo objectAndPersistInfo = createObjectAndItsPersistInfo(array);
    /* initial write */
    array[0] = Integer.valueOf(0);
    WriteResult writeResult = write(objectAndPersistInfo);
    assertValueChangeForFirstWrite(writeResult);
    assertReferencedSons(new Class[] { Object.class },
View Full Code Here

      ObjectIOInvalidClassException, ObjectIONotSerializableException,
      ObjectIODataRecordNotFoundException,
      ObjectIOClassNotFoundException, BinaryConverterException,
      ObjectIOTooBigForSerializationException {
    final Integer[] array = new Integer[2];
    final ObjectAndPersistInfo objectAndPersistInfo = createObjectAndItsPersistInfo(array);
    /* initial write */
    array[0] = Integer.valueOf(0);
    WriteResult writeResult = write(objectAndPersistInfo);
    assertValueChangeForFirstWrite(writeResult);
    assertReferencedSons(new Class[] {}, new Class[] {},
View Full Code Here

      ObjectIOInvalidClassException, ObjectIONotSerializableException,
      ObjectIODataRecordNotFoundException,
      ObjectIOClassNotFoundException, BinaryConverterException,
      ObjectIOTooBigForSerializationException {
    final int[] array = new int[2];
    final ObjectAndPersistInfo objectAndPersistInfo = createObjectAndItsPersistInfo(array);
    /* initial write */
    array[0] = 0;
    array[1] = 1;
    WriteResult writeResult = write(objectAndPersistInfo);
    assertValueChangeForFirstWrite(writeResult);
View Full Code Here

      final FieldInfo fieldInfo = new FieldInfo(declaringClass,
          fieldName, fieldType, Boolean.valueOf(staticField),
          Boolean.valueOf(transientField));
      final Integer previousIndex = fieldValueIndexByFieldInfoMap
          .get(fieldInfo);
      final ObjectAndPersistInfo fieldValue = fieldsValue.get(index);
      if (previousIndex == null) {
        fieldValueIndexByFieldInfoMap.put(fieldInfo, index);
        fieldInfoByIndex.put(index, fieldInfo);
        // if (fieldValue != null) {
        // FIXMELUC x explain case not assignable accepted
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.entity.objectio.ObjectAndPersistInfo

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.