org.springframework.data.domain.jaxb
Class SpringDataJaxb
java.lang.Object
org.springframework.data.domain.jaxb.SpringDataJaxb
public class SpringDataJaxb
- extends Object
Helper class containing utility methods to implement JAXB XmlAdapter
s as well as the DTO types to be
marshalled by JAXB.
- Author:
- Oliver Gierke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
SpringDataJaxb
public SpringDataJaxb()
unmarshal
public static <T,S> List<T> unmarshal(Collection<S> source,
XmlAdapter<S,T> adapter)
throws Exception
- Unmarshals each element of the given
Collection
using the given XmlAdapter
.
- Parameters:
source
- adapter
- must not be null.
- Returns:
-
- Throws:
Exception
marshal
public static <T,S> List<S> marshal(Iterable<T> source,
XmlAdapter<S,T> adapter)
throws Exception
- Marshals each of the elements of the given
Iterable
using the given XmlAdapter
.
- Parameters:
source
- adapter
- must not be null.
- Returns:
-
- Throws:
Exception
Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.