de.javakaffee.web.msm.serializer.javolution
Class HibernateCollectionsXMLFormat

java.lang.Object
  extended by javolution.xml.XMLFormat<T>
      extended by de.javakaffee.web.msm.serializer.javolution.CustomXMLFormat<org.hibernate.collection.AbstractPersistentCollection>
          extended by de.javakaffee.web.msm.serializer.javolution.HibernateCollectionsXMLFormat

public class HibernateCollectionsXMLFormat
extends CustomXMLFormat<org.hibernate.collection.AbstractPersistentCollection>

A CustomXMLFormat that handles hibernate mapped collections (subclasses of AbstractPersistentCollection).

Author:
Martin Grotzke

Nested Class Summary
 
Nested classes/interfaces inherited from class javolution.xml.XMLFormat
javolution.xml.XMLFormat.InputElement, javolution.xml.XMLFormat.OutputElement
 
Field Summary
 
Fields inherited from class javolution.xml.XMLFormat
APPENDABLE_XML, BOOLEAN_XML, BYTE_XML, CHARACTER_XML, CLASS_XML, COLLECTION_XML, CONFIGURABLE_XML, DOUBLE_XML, FAST_COLLECTION_XML, FAST_COMPARATOR_XML, FAST_MAP_XML, FLOAT_XML, INDEX_XML, INTEGER_XML, LONG_XML, MAP_XML, OBJECT_ARRAY_XML, OBJECT_XML, PERSISTENT_CONTEXT_XML, QNAME_XML, SHORT_XML, STRING_XML, TEXT_XML
 
Constructor Summary
HibernateCollectionsXMLFormat()
           
 
Method Summary
 boolean canConvert(Class<?> cls)
          Used to determine if this XMLFormat can handle the given class, both during serialization and deserialization.
 void read(javolution.xml.XMLFormat.InputElement input, org.hibernate.collection.AbstractPersistentCollection obj)
           
 void write(org.hibernate.collection.AbstractPersistentCollection obj, javolution.xml.XMLFormat.OutputElement output)
          
 
Methods inherited from class de.javakaffee.web.msm.serializer.javolution.CustomXMLFormat
getTargetClass
 
Methods inherited from class javolution.xml.XMLFormat
getBoundClass, getDefault, isReferenceable, newInstance, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HibernateCollectionsXMLFormat

public HibernateCollectionsXMLFormat()
Method Detail

canConvert

public boolean canConvert(Class<?> cls)
Description copied from class: CustomXMLFormat
Used to determine if this XMLFormat can handle the given class, both during serialization and deserialization.

Specified by:
canConvert in class CustomXMLFormat<org.hibernate.collection.AbstractPersistentCollection>
Parameters:
cls - the class to check
Returns:
true if this XMLFormat serializes/deserializes instances of the provided class.

read

public void read(javolution.xml.XMLFormat.InputElement input,
                 org.hibernate.collection.AbstractPersistentCollection obj)
          throws javolution.xml.stream.XMLStreamException
Specified by:
read in class javolution.xml.XMLFormat<org.hibernate.collection.AbstractPersistentCollection>
Throws:
javolution.xml.stream.XMLStreamException

write

public void write(org.hibernate.collection.AbstractPersistentCollection obj,
                  javolution.xml.XMLFormat.OutputElement output)
           throws javolution.xml.stream.XMLStreamException

Specified by:
write in class javolution.xml.XMLFormat<org.hibernate.collection.AbstractPersistentCollection>
Throws:
javolution.xml.stream.XMLStreamException


Copyright © 2009-2012. All Rights Reserved.