Spring Data Core

org.springframework.data.domain.jaxb
Class SpringDataJaxb

java.lang.Object
  extended by org.springframework.data.domain.jaxb.SpringDataJaxb

public class SpringDataJaxb
extends Object

Helper class containing utility methods to implement JAXB XmlAdapters as well as the DTO types to be marshalled by JAXB.

Author:
Oliver Gierke

Nested Class Summary
static class SpringDataJaxb.OrderDto
          The DTO for Sort.Order.
static class SpringDataJaxb.PageDto
          The DTO for Page.
static class SpringDataJaxb.PageRequestDto
          The DTO for Pageables/PageRequests.
static class SpringDataJaxb.SortDto
          The DTO for Sort.
 
Field Summary
static String NAMESPACE
           
 
Constructor Summary
SpringDataJaxb()
           
 
Method Summary
static
<T,S> List<S>
marshal(Iterable<T> source, XmlAdapter<S,T> adapter)
          Marshals each of the elements of the given Iterable using the given XmlAdapter.
static
<T,S> List<T>
unmarshal(Collection<S> source, XmlAdapter<S,T> adapter)
          Unmarshals each element of the given Collection using the given XmlAdapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
See Also:
Constant Field Values
Constructor Detail

SpringDataJaxb

public SpringDataJaxb()
Method Detail

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

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.