|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dellroad.stuff.pobj.AbstractDelegate<T>
org.dellroad.stuff.pobj.SpringDelegate<T>
T - type of the root persistent objectpublic class SpringDelegate<T>
PersistentObjectDelegate that uses Spring's Marshaller and Unmarshaller interfaces
for XML conversion.
| Field Summary |
|---|
| Fields inherited from class org.dellroad.stuff.pobj.AbstractDelegate |
|---|
log |
| Constructor Summary | |
|---|---|
SpringDelegate()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
T |
deserialize(Source source)
Deserialize a root object from XML. |
void |
serialize(T obj,
Result result)
Serialize a root object into XML. |
void |
setMarshaller(Marshaller marshaller)
Set the Marshaller used to convert instances to XML. |
void |
setUnmarshaller(Unmarshaller unmarshaller)
Set the Marshaller used to convert instances to XML. |
| Methods inherited from class org.dellroad.stuff.pobj.AbstractDelegate |
|---|
copy, handleWritebackException, isSameGraph, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringDelegate()
| Method Detail |
|---|
public void setMarshaller(Marshaller marshaller)
Marshaller used to convert instances to XML. Required property.
public void setUnmarshaller(Unmarshaller unmarshaller)
Marshaller used to convert instances to XML. Required property.
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
public void serialize(T obj,
Result result)
throws IOException
PersistentObjectDelegate
Note that this method effectively defines what is contained in the object graph
rooted at obj.
This method must not modify obj or any other object in its object graph.
serialize in interface PersistentObjectDelegate<T>obj - object to serialize; must not be modifiedresult - XML destination
IOException
public T deserialize(Source source)
throws IOException
PersistentObjectDelegate
deserialize in interface PersistentObjectDelegate<T>source - XML source
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||