Search in sources :

Example 1 with OAfterDeserialization

use of com.orientechnologies.orient.core.annotation.OAfterDeserialization in project orientdb by orientechnologies.

the class Account method fromStream.

@OAfterDeserialization
public void fromStream(final ODocument iDocument) {
    initialized = true;
    if (iDocument.containsField("externalPhoto")) {
        // READ THE PHOTO FROM AN EXTERNAL RECORD AS PURE BINARY
        OBlob extRecord = iDocument.field("externalPhoto");
        photo = extRecord.toStream();
    }
}
Also used : OBlob(com.orientechnologies.orient.core.record.impl.OBlob) OAfterDeserialization(com.orientechnologies.orient.core.annotation.OAfterDeserialization)

Aggregations

OAfterDeserialization (com.orientechnologies.orient.core.annotation.OAfterDeserialization)1 OBlob (com.orientechnologies.orient.core.record.impl.OBlob)1