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

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


      if (object == null) {
        throw new ObjectIOException("object can not be null");
      }
      model.initializeForMarshal();

      ObjectAndPersistInfo objectToVisit;
      ClassInfo rootObjectClassInfo;
      rootObjectClassInfo = classInfoFactory.getNoProxyClassInfo(object
          .getClass());
      final ObjectAndPersistInfo rootObjectAndItsClassInfo;
      rootObjectAndItsClassInfo =
      /**/getOrCreateObjectPersistInfoOfObject(object, Boolean.FALSE,
          rootObjectClassInfo, true);
      toVisitForSaveQueue.clear();
      visitedForSave.clear();
View Full Code Here


    final ClassInfo objectClassInfo = objectToVisit.objectClassInfo;
    if (objectClassInfo.isSubstituted()) {
      visitOneObjectForSave2(objectToVisit);
    } else {
      if (objectClassInfo.isWriteSubstituted()) {
        final ObjectAndPersistInfo objectAndItsClassInfo = objectToVisit;
        ObjectAndPersistInfo substituteObjectAndItsClassInfo;
        substituteObjectAndItsClassInfo = substituteForWrite(objectAndItsClassInfo);
        visitOneObjectForSave2(substituteObjectAndItsClassInfo);
      } else {
        visitOneObjectForSave2(objectToVisit);
      }
View Full Code Here

    if (visitedForSave.add(objectToVisit)) {
      prepareWrite(objectToVisit);
      if (!markedNotStorableEncountered) {
        final ObjectClassInfoAndDeclared[] sons = write(objectToVisit);
        for (final ObjectClassInfoAndDeclared son : sons) {
          final ObjectAndPersistInfo objectAndPersistInfo = son
              .getObjectAndPersistInfo();
          final Object sonObject = son.getObject();
          if (!(
          /**/sonObject == null ||
          /**/son.isDeclaredPrimitive() ||
View Full Code Here

        objectClassInfo, dataRecordIdentifier);
    final ObjectModelForImport objectModelForImport;
    if (dummyValueObject == null) {
      objectModelForImport = ObjectModelForImport.NULL;
    } else {
      final ObjectAndPersistInfo objectAndItsClassInfo =
      /**/setDataRecordIdentifierAssociatedToObject(dummyValueObject,
          dataRecordIdentifier);
      dummyObjectSet.add(objectAndItsClassInfo);
      objectModelForImport = new ObjectModelForImport(
          dataRecordIdentifier, classDef.getReplacementDef(),
View Full Code Here

      throws ImportException {
    // ASSERTX
    assert dataRecordIdentifier != null : "data record identfier must be defined";
    final Object dummyValueObject = createDummyObjectInstance(
        objectClassInfo, dataRecordIdentifier);
    final ObjectAndPersistInfo objectAndItsClassInfo =
    /**/setDataRecordIdentifierAssociatedToObject(dummyValueObject,
        dataRecordIdentifier);
    dummyObjectSet.add(objectAndItsClassInfo);
    return objectAndItsClassInfo;
  }
View Full Code Here

            .getClass());
      } catch (final ClassInfoException exception) {
        throw new ImportException(exception);
      }
    }
    final ObjectAndPersistInfo objectAndPersistInfo;
    try {
      objectIOManager
          .clearObjectAndPersistInfoByDataRecordIdentifier(dataRecordIdentifier);
      objectAndPersistInfo =
      /**/objectIOManager.createObjectPersistInfoOfObject(object, false,
          classInfo, dataRecordIdentifier);
      objectAndPersistInfo.setNewObject(true);
    } catch (final ObjectIOException exception) {
      throw new ImportException(exception);
    }
    return objectAndPersistInfo;
  }
View Full Code Here

              .classInfoOfObject(elementObject);
        } catch (ProxyException exception) {
          throw new ObjectIOException(exception);
        }
      }
      final ObjectAndPersistInfo elementAndPersistInfo = objectIOManager
          .getOrCreateObjectPersistInfoOfObject(elementObject, null,
              elementClassInfo, true);
      currentValue[index] =
      /**/new ObjectClassInfoAndDeclared(elementAndPersistInfo,// NOPMD
          arrayComponentType);
View Full Code Here

        elementObject = helperReflect.getArrayElement(array, index);
      } catch (ReflectException exception) {
        logger.fatal(REFLECT_ERROR, exception);
        throw new ObjectIOException(exception);
      }
      final ObjectAndPersistInfo elementAndPersistInfo = objectIOManager
          .getOrCreateObjectPersistInfoOfObject(elementObject,
              Boolean.FALSE, arrayComponentType, false);
      currentValue[index] = new ObjectClassInfoAndDeclared(// NOPMD
          elementAndPersistInfo, arrayComponentType);
    }
View Full Code Here

          }
        } else {
          toRemove = fieldInfo;
        }
        if (toRemove == null) {
          final ObjectAndPersistInfo fieldValue = defaultValue(fieldInfo
              .getFieldTypeInfo());
          convertedValuedFieldList.addNewFieldAndItsValue(fieldInfo,
              fieldValue);
        } else {
          // remove needed to replace the key
          convertedValuedFieldList.removeFieldInfo(toRemove);
          if (index != null) {
            convertedValuedFieldList.addFieldInfo(index, fieldInfo);
            final ObjectAndPersistInfo objectAndPersistInfo = convertedValuedFieldList
                .getFieldValue(index);
            // ASSERTX
            assert assertFieldValue(fieldInfo, objectAndPersistInfo);
            if (objectAndPersistInfo.getObject() != null
                && !fieldInfo.isBasicOrPrimitiveType()
                && !fieldInfo
                    .getFieldTypeInfo()
                    .isAssignableFrom(
                        objectAndPersistInfo.objectClassInfo)) {
              final ObjectAndPersistInfo fieldValue = createDummyValueObject(
                  fieldInfo.getFieldTypeInfo(),
                  objectAndPersistInfo.dataRecordIdentifier);
              convertedValuedFieldList.setFieldValue(index,
                  fieldValue);
            }
View Full Code Here

  }

  private ObjectAndPersistInfo defaultValue(final ClassInfo classInfo)
      throws ImportException {
    final Object object = classInfo.defaultValue();
    final ObjectAndPersistInfo defaultValue;
    if (object == null) {
      defaultValue = ObjectAndPersistInfo.NULL;
    } else {
      try {
        defaultValue = new ObjectAndPersistInfo(object, false,
            classInfo);
      } catch (final ObjectIOException exception) {
        throw new ImportException(exception);
      } catch (final ClassInfoException exception) {
        throw new ImportException(exception);
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.