Package net.sf.joafip.store.service.objectio

Examples of net.sf.joafip.store.service.objectio.ObjectIOException


      final Deque<ClassReplacementDef> replacementDef)
      throws ObjectIOException {
    final ClassInfo originalClassInfo = replacementDef.peekFirst()
        .getOriginalClass();
    if (!classInfo.equals(originalClassInfo)) {
      throw new ObjectIOException("class missmatch");
    }
    return true;
  }
View Full Code Here


  private boolean assertHasPersistenceState(
      final ObjectAndPersistInfo objectAndPersistInfo)
      throws ObjectIOException {
    if (!objectHasPersistenceState(objectAndPersistInfo)) {
      throw new ObjectIOException(
          "created object must have persistent state:\n"
              + objectAndPersistInfo);
    }
    return true;
  }
View Full Code Here

  private boolean assertObjectCreated(final ClassInfo classInfo,
      final ObjectAndPersistInfo objectAndPersistInfo)
      throws ObjectIOException {
    if (objectAndPersistInfo.getObject() == null) {
      throw new ObjectIOException("must create object instance of "
          + classInfo);
    }
    return true;
  }
View Full Code Here

  }

  private boolean assertClassExists(final ClassInfo classInfo)
      throws ObjectIOException {
    if (classInfo.classDoesNotExist()) {
      throw new ObjectIOException("can not create object instance of "
          + classInfo);
    }
    return true;
  }
View Full Code Here

      final ObjectAndPersistInfo objectAndPersistInfo)
      throws ObjectIOException {
    if (objectInput.isLazy()
        && !ProxyManager2.isProxyOrEnhanced(objectAndPersistInfo
            .getObject())) {
      throw new ObjectIOException("can not use lazy load because "
          + objectAndPersistInfo.toString()
          + " is not proxy or not transformed by java agent");
    }
    return true;
  }
View Full Code Here

  private boolean assertHasDataRecordIdentfier(
      final ObjectAndPersistInfo objectAndPersistInfo,
      final DataRecordIdentifier dataRecordIdentifier)
      throws ObjectIOException {
    if (dataRecordIdentifier == null) {
      throw new ObjectIOException("data record identifier is null for "
          + objectAndPersistInfo.toString());
    }
    return true;
  }
View Full Code Here

          .getInstanceFactoryFields()) {
        helperReflect.setFieldValue(objectAndPersistInfo.getObject(),
            fieldInfo, instanceFactory);
      }
    } catch (final ClassInfoException exception) {
      throw new ObjectIOException(exception);
    } catch (final ReflectException exception) {
      throw new ObjectIOException(exception);
    } catch (final ReflectFailedSetException exception) {
      throw new ObjectIOException(exception);
    }
  }
View Full Code Here

    } catch (final ObjectIOException exception) {
      final String message = "error creating object of class "
          + classInfo.toString() + "\ndata record identifier "
          + dataRecordIdentifier;
      logger.fatal(message);
      throw new ObjectIOException(message, exception);
    }
    assert assertTransformed(objectInput, objectAndPersistInfo);
    assertNotSubstituted(objectAndPersistInfo);
    setInstanceFactoryFieldsOfObject(objectAndPersistInfo);
    // not a new object to add to storage, created reading in storage
View Full Code Here

  protected void assertNotSubstituted(
      final ObjectAndItsClassInfo objectAndItsClassInfo)
      throws ObjectIOException {
    if (objectAndItsClassInfo.objectClassInfo.isSubstituted()) {
      throw new ObjectIOException("substituted object are not persisted");
    }
  }
View Full Code Here

        || dataModelIdentifier != currentDataModelIdentifier) {
      try {
        replacementDefList = classInfo.getReplacementDef(
            joafipReleaseId, dataModelIdentifier);
      } catch (final ClassInfoException exception) {
        throw new ObjectIOException(exception);
      }
    } else {
      replacementDefList = EMPTY_LINKED_LIST;
    }
    return replacementDefList;
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.objectio.ObjectIOException

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.