Package org.springframework.data.domain.jaxb.SpringDataJaxb

Examples of org.springframework.data.domain.jaxb.SpringDataJaxb.SortDto


    if (source == null) {
      return null;
    }

    SortDto dto = new SortDto();
    dto.orders = SpringDataJaxb.marshal(source, OrderAdapter.INSTANCE);

    return dto;
  }
View Full Code Here


   * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
   */
  @Override
  public PageRequestDto marshal(Pageable request) {

    SortDto sortDto = SortAdapter.INSTANCE.marshal(request.getSort());

    PageRequestDto dto = new PageRequestDto();
    dto.orders = sortDto == null ? Collections.<OrderDto> emptyList() : sortDto.orders;
    dto.page = request.getPageNumber();
    dto.size = request.getPageSize();
View Full Code Here

    if (v.orders.isEmpty()) {
      return new PageRequest(v.page, v.size);
    }

    SortDto sortDto = new SortDto();
    sortDto.orders = v.orders;
    Sort sort = SortAdapter.INSTANCE.unmarshal(sortDto);

    return new PageRequest(v.page, v.size, sort);
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.domain.jaxb.SpringDataJaxb.SortDto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.