|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.xml.XMLEncoder
public class XMLEncoder
A helper class to encode objects to XML.
Constructor Summary | |
---|---|
XMLEncoder()
Creates new XMLEncoder. |
|
XMLEncoder(String mappingUrl)
Creates new XMLEncoder that will use a mapping descriptor loaded via provided URL. |
Method Summary | |
---|---|
String |
encode(Object object)
Encodes an object using "root" as a root tag. |
String |
encode(String rootTag,
Object object)
Encodes using provided root XML tag. |
void |
encodeProperty(String xmlTag,
Object value)
A callback method for XMLSerializable objects to encode an object property. |
void |
setRoot(String xmlTag,
String type)
A callback for XMLSerializable objects to add a node to an encoding tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLEncoder()
public XMLEncoder(String mappingUrl)
Method Detail |
---|
public void setRoot(String xmlTag, String type)
public void encodeProperty(String xmlTag, Object value)
xmlTag
- The name of the XML element used to represent the property.value
- The object's property value to encode.public String encode(Object object) throws CayenneRuntimeException
CayenneRuntimeException
public String encode(String rootTag, Object object) throws CayenneRuntimeException
CayenneRuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |