Package com.orientechnologies.orient.core.exception

Examples of com.orientechnologies.orient.core.exception.OFetchException


    if (settings.keepTypes && buffer.length() > 0)
      try {
        jsonWriter.writeAttribute(settings.indentLevel > -1 ? settings.indentLevel + 1 : -1, true,
            ORecordSerializerJSON.ATTRIBUTE_FIELD_TYPES, buffer.toString());
      } catch (IOException e) {
        throw new OFetchException("Error writing field types", e);
      }
  }
View Full Code Here


    try {
      manageTypes(iFieldName, iterable);
      jsonWriter.beginCollection(settings.indentLevel, true, iFieldName);
      collectionStack.add(iRootRecord);
    } catch (IOException e) {
      throw new OFetchException("Error writing collection field " + iFieldName + " of record " + iRootRecord.getIdentity(), e);
    }
  }
View Full Code Here

  public void onAfterCollection(final ODocument iRootRecord, final String iFieldName, final Object iUserObject) {
    try {
      jsonWriter.endCollection(settings.indentLevel, false);
      collectionStack.pop();
    } catch (IOException e) {
      throw new OFetchException("Error writing collection field " + iFieldName + " of record " + iRootRecord.getIdentity(), e);
    }
  }
View Full Code Here

  public void onBeforeMap(final ODocument iRootRecord, final String iFieldName, final Object iUserObject) {
    settings.indentLevel++;
    try {
      jsonWriter.beginObject(settings.indentLevel, true, iFieldName);
    } catch (IOException e) {
      throw new OFetchException("Error writing map field " + iFieldName + " of record " + iRootRecord.getIdentity(), e);
    }
  }
View Full Code Here

  public void onAfterMap(final ODocument iRootRecord, final String iFieldName, final Object iUserObject) {
    try {
      jsonWriter.endObject(settings.indentLevel, true);
    } catch (IOException e) {
      throw new OFetchException("Error writing map field " + iFieldName + " of record " + iRootRecord.getIdentity(), e);
    }
    settings.indentLevel--;
  }
View Full Code Here

      else
        fieldName = iFieldName;
      jsonWriter.beginObject(settings.indentLevel, false, fieldName);
      writeSignature(jsonWriter, iDocument);
    } catch (IOException e) {
      throw new OFetchException("Error writing link field " + iFieldName + " of record " + iRootRecord.getIdentity(), e);
    }
  }
View Full Code Here

  public void onAfterDocument(final ODocument iRootRecord, final ODocument iDocument, final String iFieldName,
      final Object iUserObject) {
    try {
      jsonWriter.endObject(settings.indentLevel--, true);
    } catch (IOException e) {
      throw new OFetchException("Error writing link field " + iFieldName + " of record " + iRootRecord.getIdentity(), e);
    }
  }
View Full Code Here

      final OFetchContext iContext, final Object iusObject, final String iFormat) {
    try {
      ((OJSONFetchContext) iContext).getJsonWriter().writeAttribute(((OJSONFetchContext) iContext).getIndentLevel(), true,
          iFieldName, iFieldValue);
    } catch (IOException e) {
      throw new OFetchException("Error processing field '" + iFieldValue + " of record " + iRecord.getIdentity(), e);
    }
  }
View Full Code Here

  public void parseLinked(final ODocument iRootRecord, final OIdentifiable iLinked, final Object iUserObject,
      final String iFieldName, final OFetchContext iContext) throws OFetchException {
    try {
      ((OJSONFetchContext) iContext).writeLinkedAttribute(iLinked, iFieldName);
    } catch (IOException e) {
      throw new OFetchException("Error writing linked field " + iFieldName + " (record:" + iLinked.getIdentity() + ") of record "
          + iRootRecord.getIdentity(), e);
    }
  }
View Full Code Here

        ((OJSONFetchContext) iContext).writeLinkedValue(iLinked, iFieldName);
      } else {
        ((OJSONFetchContext) iContext).writeLinkedAttribute(iLinked, iFieldName);
      }
    } catch (IOException e) {
      throw new OFetchException("Error writing linked field " + iFieldName + " (record:" + iLinked.getIdentity() + ") of record "
          + iRootRecord.getIdentity(), e);
    }
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.exception.OFetchException

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.