Class HibernatePersistentSortedMapConverter
java.lang.Object
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
com.thoughtworks.xstream.converters.collections.MapConverter
com.thoughtworks.xstream.converters.collections.TreeMapConverter
com.thoughtworks.xstream.hibernate.converter.HibernatePersistentSortedMapConverter
- All Implemented Interfaces:
Converter,ConverterMatcher
A converter for Hibernate's PersistentSortedMap and for the SortedMapProxy from Hibernate's
Envers add-on. The converter will drop any reference to the Hibernate collection and emit at
serialization time an equivalent JDK collection instead.
- Since:
- 1.4
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a HibernatePersistentSortedMapConverter. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Class type) Determines whether the converter can marshall a particular type.unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) Convert textual data back into an object.Methods inherited from class com.thoughtworks.xstream.converters.collections.TreeMapConverter
marshal, marshalComparator, populateTreeMap, unmarshalComparatorMethods inherited from class com.thoughtworks.xstream.converters.collections.MapConverter
createCollection, populateMap, populateMap, putCurrentEntryIntoMapMethods inherited from class com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
mapper, readBareItem, readCompleteItem, readItem, writeBareItem, writeCompleteItem, writeItem, writeNullItem
-
Constructor Details
-
HibernatePersistentSortedMapConverter
Construct a HibernatePersistentSortedMapConverter.- Parameters:
mapper-- Since:
- 1.4
-
-
Method Details
-
canConvert
Description copied from interface:ConverterMatcherDetermines whether the converter can marshall a particular type.- Specified by:
canConvertin interfaceConverterMatcher- Overrides:
canConvertin classMapConverter- Parameters:
type- the Class representing the object type to be converted
-
unmarshal
Description copied from interface:ConverterConvert textual data back into an object.- Specified by:
unmarshalin interfaceConverter- Overrides:
unmarshalin classTreeMapConverter- Parameters:
reader- The stream to read the text from.context-- Returns:
- The resulting object.
-