Interface ODocumentSerializable
- All Known Implementing Classes:
OCompositeKey,OLuceneCompositeKey,OSpatialCompositeKey
public interface ODocumentSerializable
Interface for objects which are hold inside of document as field values and can serialize
yourself into document. In such way it is possible to serialize complex types and do not break
compatibility with non-Java binary drivers.
After serialization into document additional field CLASS_NAME will be added. This
field contains value of class of original object.
During deserialization of embedded object if embedded document contains CLASS_NAME
field we try to find class with given name and only if this class implements ODocumentSerializable interface it will be converted to the object. So it is pretty safe to use
field with CLASS_NAME in ordinary documents if it is needed.
Class which implements this interface should have public no-arguments constructor.
- Since:
- 3/27/14
- Author:
- Andrey Lomakin (a.lomakin-at-orientdb.com)
-
Field Summary
Fields -
Method Summary
-
Field Details
-
CLASS_NAME
- See Also:
-
-
Method Details
-
toDocument
ODocument toDocument() -
fromDocument
-