Package com.im.df.impl.xml
Class DFItemPersister
- java.lang.Object
-
- com.im.df.api.util.xml.BasicPersister<com.im.df.api.ddl.DFItem>
-
- com.im.df.impl.xml.DFItemPersister
-
- All Implemented Interfaces:
com.im.df.api.util.xml.BasicPersisterInit
,com.im.df.api.util.xml.IJCPersister
,com.im.df.api.util.xml.IJCPersister.Reader
,com.im.df.api.util.xml.IJCPersister.Writer
,Cloneable
public class DFItemPersister extends com.im.df.api.util.xml.BasicPersister<com.im.df.api.ddl.DFItem>
Persister for allDFItem
s (likeDFField
,DFEntity
,DFView
, etc.).- Author:
- svata
-
-
Constructor Summary
Constructors Constructor Description DFItemPersister()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> T
assertContainerPresent(String containerType, T test)
protected Object
assertNotNull(String itemType, Object test)
boolean
isPrimitive(Class clazz)
This is a hacky thing: whether the persister can read a primitive depends on whether the context contains the outer element for some classes.protected Object
readAttribute(Object prototype)
protected Object
readElement(Object prototype)
protected Object
readItem(String id, Object prototype)
protected void
writeAttribute()
protected void
writeElement()
-
Methods inherited from class com.im.df.api.util.xml.BasicPersister
addError, canInstantiate, clearErrors, create, createAttribute, createElement, createInstance, createInstance, createLog, createReader, createState, createWriter, defaultReadBean, defaultWriteBean, enterElement, enterElement, getAttribute, getAttribute, getBean, getBeanClass, getBufferedErrors, getClass, getConfiguredQName, getContext, getCurrentClassLoader, getEnv, getNode, getPersisterRegistry, getPropertyValue, getQName, getStorage, getType, init, leaveElement, loadObject, popElement, pushElement, read, readAttr, readAttr, readAttr, readBeanProperties, readBeanProperty, readCollection, readCollection, readCollection, readCollectionProperty, readMap, readMapProperty, readObjectPolymorphic, readObjectStatic, readPrimitiveProperty, setBean, setBeanClass, setClassBeanInfo, setContext, setEnv, setNode, setPersisterRegistry, setPropertyAttributes, setQName, setStorage, storeObject, throwWrappedIOException, throwWrappedIOException, write, write, write, writeArray, writeAttr, writeAttr, writeAttr, writeAttr, writeAttr, writeCollection, writeCollection, writeCollection, writeMap, writeMap, writeObject, writeObjectPolymorphic, writeObjectStatic, writeProperty, writeSuperclass
-
-
-
-
Method Detail
-
assertNotNull
protected Object assertNotNull(String itemType, Object test) throws com.im.df.api.util.xml.IncompleteDataException
- Throws:
com.im.df.api.util.xml.IncompleteDataException
-
assertContainerPresent
protected <T> T assertContainerPresent(String containerType, T test) throws com.im.df.api.util.xml.IncompleteDataException
- Throws:
com.im.df.api.util.xml.IncompleteDataException
-
readAttribute
protected Object readAttribute(Object prototype) throws IOException
- Overrides:
readAttribute
in classcom.im.df.api.util.xml.BasicPersister<com.im.df.api.ddl.DFItem>
- Throws:
IOException
-
readItem
protected Object readItem(String id, Object prototype) throws IOException
- Throws:
IOException
-
readElement
protected Object readElement(Object prototype) throws IOException
- Overrides:
readElement
in classcom.im.df.api.util.xml.BasicPersister<com.im.df.api.ddl.DFItem>
- Throws:
IOException
-
writeElement
protected void writeElement() throws IOException
- Overrides:
writeElement
in classcom.im.df.api.util.xml.BasicPersister<com.im.df.api.ddl.DFItem>
- Throws:
IOException
-
writeAttribute
protected void writeAttribute() throws IOException
- Overrides:
writeAttribute
in classcom.im.df.api.util.xml.BasicPersister<com.im.df.api.ddl.DFItem>
- Throws:
IOException
-
isPrimitive
public boolean isPrimitive(Class clazz)
This is a hacky thing: whether the persister can read a primitive depends on whether the context contains the outer element for some classes.- Specified by:
isPrimitive
in interfacecom.im.df.api.util.xml.IJCPersister
- Overrides:
isPrimitive
in classcom.im.df.api.util.xml.BasicPersister<com.im.df.api.ddl.DFItem>
-
-