Examples of fromStream()


Examples of com.orientechnologies.orient.core.record.impl.ODocument.fromStream()

      if (paramBuffer.length == 0)
        parameters = null;
      else {
        final ODocument param = new ODocument();
        param.fromStream(paramBuffer);

        Map<String, Object> params = param.rawField("params");

        parameters = new HashMap<Object, Object>();
        for (Entry<String, Object> p : params.entrySet()) {
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ODocument.fromStream()

      if (paramBuffer.length == 0)
        parameters = null;
      else {
        final ODocument param = new ODocument(database);
        param.fromStream(paramBuffer);

        Map<String, Object> params = param.field("params");

        parameters = new HashMap<Object, Object>();
        for (Entry<String, Object> p : params.entrySet()) {
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ODocument.fromStream()

    if (iStream == null || iStream.length() == 0)
      // NULL VALUE
      return null;

    final ODocument instance = new ODocument();
    instance.fromStream(OBinaryProtocol.string2bytes(iStream));

    final String className = instance.field(ODocumentSerializable.CLASS_NAME);
    if (className == null)
      return instance;
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ORecordBytes.fromStream()

  }

  public ORecordInternal<?> fromStream(final ODatabaseRecord iDatabase, final byte[] iSource, final ORecordInternal<?> iRecord) {
    final ORecordBytes record = (ORecordBytes) iRecord;

    record.fromStream(iSource);
    record.reset(iSource);
    record.setDatabase(iDatabase);

    return record;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ORecordBytes.fromStream()

  }

  public ORecordInternal<?> fromStream(final ODatabaseRecord iDatabase, final byte[] iSource, final ORecordInternal<?> iRecord) {
    final ORecordBytes record = (ORecordBytes) iRecord;

    record.fromStream(iSource);
    record.reset(iSource);
    record.setDatabase(iDatabase);

    return record;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ORecordBytes.fromStream()

      ODatabaseRecordThreadLocal.INSTANCE.set(db2);
      ORecordBytes record2 = db2.load(record1.getIdentity());

      record2.setDirty();
      record2.fromStream("This is the second version".getBytes());
      record2.save();

      ODatabaseRecordThreadLocal.INSTANCE.set(database);
      record1.setDirty();
      record1.fromStream("This is the third version".getBytes());
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ORecordBytes.fromStream()

      // RE-READ THE RECORD
      record.load();
      int v1 = record.getRecordVersion().getCounter();
      record.setDirty();
      record.fromStream("This is the second version".getBytes());
      record.save();
      database.commit();

      record.reload();
      Assert.assertEquals(record.getRecordVersion().getCounter(), v1 + 1);
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ORecordBytes.fromStream()

      // RE-READ THE RECORD
      record1.load();
      int v1 = record1.getRecordVersion().getCounter();
      record1.setDirty();
      record1.fromStream("This is the second version".getBytes());
      record1.save();

      database.commit();

      ODatabaseRecordThreadLocal.INSTANCE.set(db2);
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.OSerializableStream.fromStream()

      } catch (Exception e) {
        OLogManager.instance().error(this, "Error on unmarshalling content. Class: " + className, e, OSerializationException.class);
      }
    }

    instance.fromStream(OBinaryProtocol.string2bytes(iStream.substring(pos + 1)));
    return instance;
  }

  /**
   * Serialize the class name size + class name + object content
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.OSerializableStream.fromStream()

      } catch (Exception e) {
        OLogManager.instance().error(this, "Error on unmarshalling content. Class: " + className, e, OSerializationException.class);
      }
    }

    instance.fromStream(OBinaryProtocol.string2bytes(iStream.substring(pos + 1)));
    return instance;
  }

  /**
   * Serialize the class name size + class name + object content
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.