Package net.sf.joafip.store.entity.classinfo

Examples of net.sf.joafip.store.entity.classinfo.ClassInfo


      ObjectIONotSerializableException {
    if (logger.debugEnabled) {
      logger.debug("create object " + classInfo.toString()
          + ", data record #" + dataRecordIdentifier);
    }
    final ClassInfo toCreateClassInfo;
    if (storageInfo.hasReplacementDef()) {
      toCreateClassInfo = storageInfo.getReplacementClassInfo();
    } else {
      toCreateClassInfo = classInfo;
    }
View Full Code Here


      final byte[] binary, final int beginOffset,
      final boolean setOriginalValue) throws ObjectIOException,
      ObjectIODataRecordNotFoundException, ObjectIOInvalidClassException,
      ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
      ObjectIONotSerializableException {
    final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
    // ASSERTX
    assert assertClassExists(classInfo, "can not set object state since "
        + classInfo + " can not have instance");
    final FieldInfo[] fieldsInfo = objectAndPersistInfo.fieldToSetInfo;
    final ObjectClassInfoAndDeclared[] originalValue;
View Full Code Here

      final FieldInfo[] fieldsInfo = objectAndPersistInfo.fieldToSetInfo;
      // index in the class of the field to set
      int index = 0;
      for (FieldInfo fieldInfo : fieldsInfo) {
        // fieldInfo is field to set
        final ClassInfo fieldType = fieldInfo.getFieldTypeInfo();
        ObjectAndPersistInfo fieldValueAndPersistInfo = valuedFieldList
            .getValue(index);
        if (fieldValueAndPersistInfo == null) {
          // default value
          fieldValueAndPersistInfo = defaultValue(fieldType);
View Full Code Here

      final IObjectIOInputStream objectIOInputStream,
      final boolean setOriginalValue) throws ObjectIOException,
      ObjectIODataRecordNotFoundException,
      ObjectIOClassNotFoundException, ObjectIOInvalidClassException,
      ObjectIODataCorruptedException, ObjectIONotSerializableException {
    final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
    objectAndPersistInfo.clearSonReadObject();
    Method method = classInfo.getReadObjectMethod();
    if (method == null) {
      try {
        objectIOInputStream.defaultReadObject();
      } catch (IOException exception) {
        throwIOExceptionCause(exception);
      } catch (ClassNotFoundException exception) {
        throw new ObjectIOClassNotFoundException(exception);
      }
    } else {
      final Object object = objectAndPersistInfo.getObject();
      objectAndPersistInfo.setLoading(true);
      try {
        helperReflect.invokeMethod(object, method,
            new Object[] { objectIOInputStream });
      } catch (ReflectException exception) {
        final Throwable cause = exception.getCause();
        if (InvocationTargetException.class.equals(cause.getClass())) {
          throwsInvokationTargetException(cause);
          method = classInfo.getReadObjectNoDataMethod();
          if (method == null) {
            throw new ObjectIOException(exception);
          } else {
            try {
              helperReflect.invokeMethod(objectAndPersistInfo,
View Full Code Here

      final IObjectIOInputStream objectIOInputStream,
      final boolean setOriginalValue) throws ObjectIOException,
      ObjectIODataRecordNotFoundException,
      ObjectIOClassNotFoundException, ObjectIOInvalidClassException,
      ObjectIODataCorruptedException, ObjectIONotSerializableException {
    final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
    final Method method = classInfo.getReadExternalMethod();
    if (method == null) {
      throw new ObjectIOException(
          "missing readExternal method for serialization");
    }
    objectAndPersistInfo.clearSonReadObject();
View Full Code Here

      final FieldInfo fieldInfo) throws ObjectIOException,
      ObjectIODataRecordNotFoundException, ObjectIOInvalidClassException,
      ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
      ObjectIONotSerializableException {
    final int offset;
    ClassInfo fieldType;
    try {
      fieldType = fieldInfo.getFieldTypeInfo();
    } catch (ClassInfoException exception) {
      throw new ObjectIOException(exception);
    }
View Full Code Here

            throw new ObjectIOException(exception);
          }
          // offset = binaryConverter.getOffsetFromBinary();
          offset = binaryConverter.offsetFromBinary;
          final Object fieldValue;
          final ClassInfo fieldValueClassInfo;
          if (binaryConverter.valueDefinedFromBinary) {
            fieldValue = binaryConverter.objectFromBinary;
            binaryConverter.objectFromBinary = null;// NOPMD
            if (fieldValue == null) {
              fieldValueClassInfo = ClassInfo.NULL;
View Full Code Here

  }

  protected void setObjectAllDeclaredFieldsValueToNull(
      final ObjectAndPersistInfo objectAndItsClassInfo)
      throws ObjectIOException, ObjectIOInvalidClassException {
    final ClassInfo classInfo = objectAndItsClassInfo.objectClassInfo;
    FieldInfo[] fieldsInfo;
    try {
      fieldsInfo = classInfo
          .allDeclaredFieldsWithTransientWithoutStatic();
    } catch (ClassInfoException exception) {
      throw new ObjectIOException(exception);
    }
    for (FieldInfo fieldInfo : fieldsInfo) {
      ClassInfo type;
      try {
        type = fieldInfo.getFieldTypeInfo();
      } catch (ClassInfoException exception) {
        throw new ObjectIOException(exception);
      }
      if (!type.isPrimitiveType()) {
        setObjectFieldValueToNull(objectAndItsClassInfo, fieldInfo);
      }
    }
  }
View Full Code Here

      final byte[] binary, final int beginOffset)
      throws ObjectIOException, ObjectIODataRecordNotFoundException,
      ObjectIOInvalidClassException, ObjectIOClassNotFoundException,
      ObjectIODataCorruptedException, ObjectIONotSerializableException {
    int offset = beginOffset;
    final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
    final FieldInfo[] fieldsInfo;
    try {
      fieldsInfo = classInfo.getAllDeclaredFieldsForGenericIO();
    } catch (ClassInfoException exception) {
      throw new ObjectIOException(exception);
    }
    final ObjectClassInfoAndDeclared[] values = new ObjectClassInfoAndDeclared[fieldsInfo.length];
    int index = 0;
View Full Code Here

      final FieldInfo fieldInfo) throws ObjectIOException,
      ObjectIODataRecordNotFoundException, ObjectIOInvalidClassException,
      ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
      ObjectIONotSerializableException {
    final int offset;
    final ClassInfo fieldType;
    try {
      fieldType = fieldInfo.getFieldTypeInfo();
    } catch (ClassInfoException exception) {
      throw new ObjectIOException(exception);
    }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.entity.classinfo.ClassInfo

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.