public ODocumentWrapper(ODocument doc){ this(); doc.copyTo(this); }
/** * Copies the current instance to a new one. Hasn't been choose the clone() to let ODocument return type. Once copied the new * instance has the same identity and values but all the internal structure are totally independent by the source. */ public ODocument copy() { return (ODocument) copyTo(new ODocument()); }
if (!iterator.hasNext()) { ODocument unwindedDoc = new ODocument(); doc.copyTo(unwindedDoc); unwindedDoc.field(firstField, (Object) null); result.addAll(unwind(unwindedDoc, nextFields, iContext)); Object o = iterator.next(); ODocument unwindedDoc = new ODocument(); doc.copyTo(unwindedDoc); unwindedDoc.field(firstField, o); result.addAll(unwind(unwindedDoc, nextFields, iContext));
final ODocumentSerializable documentSerializable = (ODocumentSerializable) clazz.newInstance(); final ODocument docClone = new ODocument(); instance.copyTo(docClone); docClone.removeField(ODocumentSerializable.CLASS_NAME); documentSerializable.fromDocument(docClone);