All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.thoughtworks.xstream.hibernate.package.html Maven / Gradle / Ivy



Support of Hibernate enhanced collections and proxied types and Hibernate's collection proxies from the Envers add-on. To drop the internals of Hibernate when marshalling such objects to XStream, all converters and the mapper have to be registered for the XStream instance:

final XStream xstream = new XStream() {
  protected MapperWrapper wrapMapper(final MapperWrapper next) {
    return new HibernateMapper(next);
  }
};
xstream.registerConverter(new HibernateProxyConverter());
xstream.registerConverter(new HibernatePersistentCollectionConverter(xstream.getMapper()));
xstream.registerConverter(new HibernatePersistentMapConverter(xstream.getMapper()));
xstream.registerConverter(new HibernatePersistentSortedMapConverter(xstream.getMapper()));
xstream.registerConverter(new HibernatePersistentSortedSetConverter(xstream.getMapper()));





© 2015 - 2024 Weber Informatics LLC | Privacy Policy