public class ConvertUtils extends Object
| Constructor and Description |
|---|
ConvertUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <Type> org.springframework.data.domain.Page<Type> |
buildPage(Object result,
org.springframework.data.domain.Pageable request,
Class<Type> type)
Builds paged response for the default parameters names (`{"records":[…],"count":X}`).
|
static <Type> org.springframework.data.domain.Page<Type> |
buildPage(Object result,
org.springframework.data.domain.Pageable request,
Class<Type> type,
String recordsParam,
String countParam)
Builds paged response.
|
static <LocalType,TransferType> |
dump(LocalType entity,
org.springframework.core.convert.converter.Converter<LocalType,TransferType> strategy)
Dumps entity into transfer POJO.
|
public static <Type> org.springframework.data.domain.Page<Type> buildPage(Object result, org.springframework.data.domain.Pageable request, Class<Type> type, String recordsParam, String countParam)
Type - Contained type.result - JSON-RPC call response.request - Page request specification.type - Desired type class.recordsParam - Page content parameter name.countParam - Results count parameter name.public static <Type> org.springframework.data.domain.Page<Type> buildPage(Object result, org.springframework.data.domain.Pageable request, Class<Type> type)
Type - Contained type.result - JSON-RPC call response.request - Page request specification.type - Desired type class.public static <LocalType,TransferType> TransferType dump(LocalType entity,
org.springframework.core.convert.converter.Converter<LocalType,TransferType> strategy)
LocalType - Local persistent type (eg. database entity).TransferType - JSON-able transfer object type (in bast case a POJO class).entity - Source entity.strategy - Dumping strategy that defines structure of destination object.Copyright © 2015 Rafał Wrzeszcz - Wrzasq.pl. All rights reserved.