org.axonframework.mongo3.serializer.bson
Class DBObjectHierarchicalStreamWriter
java.lang.Object
org.axonframework.mongo3.serializer.bson.DBObjectHierarchicalStreamWriter
- All Implemented Interfaces:
- com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriter, com.thoughtworks.xstream.io.HierarchicalStreamWriter
public class DBObjectHierarchicalStreamWriter
- extends Object
- implements com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriter
HierarchicalStreamWriter implementation that writes objects into a MongoDB DBObject structure. Use the DBObjectHierarchicalStreamReader
to read the object back.
- Since:
- 2.0
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBObjectHierarchicalStreamWriter
public DBObjectHierarchicalStreamWriter(com.mongodb.DBObject root)
- Initialize the writer to write the object structure to the given
root
DBObject.
Note that the given root
DBObject must not contain any data yet.
- Parameters:
root
- The root DBObject to which the serialized structure will be added. Must not contain any data.
startNode
public void startNode(String name)
- Specified by:
startNode
in interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
addAttribute
public void addAttribute(String name,
String value)
- Specified by:
addAttribute
in interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
setValue
public void setValue(String text)
- Specified by:
setValue
in interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
endNode
public void endNode()
- Specified by:
endNode
in interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
flush
public void flush()
- Specified by:
flush
in interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
close
public void close()
- Specified by:
close
in interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
underlyingWriter
public com.thoughtworks.xstream.io.HierarchicalStreamWriter underlyingWriter()
- Specified by:
underlyingWriter
in interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
startNode
public void startNode(String name,
Class clazz)
- Specified by:
startNode
in interface com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriter
Copyright © 2010-2016. All Rights Reserved.