public class DocumentObjectConverter extends Object
SpaceDocument
and vice versa.Modifier | Constructor and Description |
---|---|
|
DocumentObjectConverter()
Default constructor.
|
protected |
DocumentObjectConverter(boolean throwExceptionOnTypeMissing) |
Modifier and Type | Method and Description |
---|---|
protected Object |
fromDocumentIfNeeded(Object object,
SpaceDocumentSupport documentSupport,
Class<?> expectedType) |
static DocumentObjectConverter |
instance()
Returns a singleton instance of DocumentObjectConverter.
|
Object |
toDocumentIfNeeded(Object object,
SpaceDocumentSupport documentSupport) |
Object |
toObject(SpaceDocument document)
Converts the specified space document to a POJO.
|
SpaceDocument |
toSpaceDocument(Object object)
Converts the specified POJO to a
SpaceDocument . |
public DocumentObjectConverter()
protected DocumentObjectConverter(boolean throwExceptionOnTypeMissing)
public static DocumentObjectConverter instance()
public SpaceDocument toSpaceDocument(Object object)
SpaceDocument
.object
- Object to convert.SpaceDocument
whose type and properties are the same as the object.public Object toObject(SpaceDocument document)
document
- Document to convert.public Object toDocumentIfNeeded(Object object, SpaceDocumentSupport documentSupport)
protected Object fromDocumentIfNeeded(Object object, SpaceDocumentSupport documentSupport, Class<?> expectedType)
Copyright © GigaSpaces.