|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.run.xml.PropertyAdapter
com.tangosol.run.xml.IterableAdapter
public abstract class IterableAdapter
An IterableAdapter is the base class for any data type that must be iterated over to serialize/deserialize, such as arrays, collections and maps.
<property>
<name>People</name>
<xml-name>people</xml-name> <!-- optional, empty name indicates anonymous element -->
<adapter>...</adapter> <!-- optional -->
<type>...</type> <!-- defaults via reflection -->
<class>...</class> <!-- defaults to <type> -->
<sparse>true</sparse> <!-- defaults to false -->
<empty-is-null>true</empty-is-null> <!-- defaults to false -->
<element> <!-- optional, depends on the adapter -->
<xml-name>person</xml-name> <!-- optional, nests the elements -->
</element>
<property>
Example of collection/array nested within collection tags:
<doc>
<people>
<person>...</person>
<person>...</person>
...
</people>
</doc>
Example of collection/array nested directly within the document:
<doc>
<person>...</person>
<person>...</person>
...
</doc>
Example of map nested within collection tags:
<doc>
<people>
<person>
<name>...</name>
<number>...</number>
</person>
<person>
<name>...</name>
<number>...</number>
</person>
...
</people>
</doc>
Example of map nested directly within the document:
<doc>
<person>
<name>...</name>
<number>...</number>
</person>
<person>
<name>...</name>
<number>...</number>
</person>
...
</doc>
| Field Summary | |
|---|---|
protected boolean |
m_fEmptyIsNullEmpty-is-null option: Empty iterable values are not stored in the serialized form of the XmlBean nor in the XML form of the XmlBean. |
protected boolean |
m_fSparseSparse array storage option. |
protected java.lang.String |
m_sElementName used for each element of the array when formatted into XML. |
| Fields inherited from class com.tangosol.run.xml.PropertyAdapter |
|---|
m_clzType, m_fAttribute, m_infoBean, m_methodClone, m_methodGet, m_methodSet, m_sName, m_sNmsPrefix, m_sNmsUri, m_sXml, NOPARAMS |
| Constructor Summary | |
|---|---|
IterableAdapter(XmlBean.BeanInfo infoBean, java.lang.Class clzType, java.lang.String sName, java.lang.String sXml, XmlElement xml)Construct a IterableAdapter. |
|
| Method Summary | |
|---|---|
protected PropertyAdapter |
findAdapter(XmlBean.BeanInfo infoBean, XmlElement xml)Obtain a PropertyAdapapter for a map entry key or value |
java.lang.Object |
fromXml(XmlElement xml)Deserialize an object from an XML element. |
java.lang.String |
getElementName() |
boolean |
isCloneRequired()Determine if the property value must be deep-cloned. |
boolean |
isEmptyIsNull() |
boolean |
isNested() |
boolean |
isSparse() |
protected abstract java.lang.Object |
readElements(XmlElement xml) |
XmlElement |
toXml(java.lang.Object o)Serialize an object into an XML element. |
protected abstract void |
writeElements(XmlElement xml, java.lang.Object o) |
| Methods inherited from class com.tangosol.run.xml.PropertyAdapter |
|---|
clone, equalsValue, findAttribute, findElement, fromUri, get, getAccessor, getBeanInfo, getCloner, getElements, getLocalXmlName, getMutator, getName, getNamespacePrefix, getNamespaceUri, getType, getXmlName, hash, isAnonymous, isAttribute, isElementMatch, isEmpty, readExternal, readXml, set, setNamespacePrefix, toString, toUri, writeExternal, writeXml |
| Methods inherited from class com.tangosol.util.BitHelper |
|---|
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong, toLong |
| Field Detail |
|---|
protected boolean m_fSparse
protected boolean m_fEmptyIsNull
protected java.lang.String m_sElement
| Constructor Detail |
|---|
public IterableAdapter(XmlBean.BeanInfo infoBean,
java.lang.Class clzType,
java.lang.String sName,
java.lang.String sXml,
XmlElement xml)
infoBean - BeanInfo for a bean containing this propertyclzType - the type of the propertysName - the property namesXml - the XML tag namexml - additional XML information| Method Detail |
|---|
public boolean isCloneRequired()
PropertyAdapterisCloneRequired in class PropertyAdapterpublic boolean isSparse()
public boolean isEmptyIsNull()
public java.lang.String getElementName()
public boolean isNested()
public java.lang.Object fromXml(XmlElement xml)
fromXml in class PropertyAdapterxml - the XML element to deserialize fromjava.lang.UnsupportedOperationException - if the property cannot be read from a single XML elementpublic XmlElement toXml(java.lang.Object o)
toXml in class PropertyAdaptero - the object to serializejava.lang.UnsupportedOperationException - if the property cannot be written to a single XML elementprotected abstract java.lang.Object readElements(XmlElement xml)
xml - the XML element containing the XML elements to deserialize from
protected abstract void writeElements(XmlElement xml,
java.lang.Object o)
xml - the XML element to which the iterable elements are writteno - the object to serialize (not null)
protected PropertyAdapter findAdapter(XmlBean.BeanInfo infoBean,
XmlElement xml)
infoBean - BeanInfo for a bean containing this propertyxml - the information about the map entry key or value
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||