Package dev.hilla.endpointransfermapper
Class PageMapper
- java.lang.Object
-
- dev.hilla.endpointransfermapper.PageMapper
-
- All Implemented Interfaces:
EndpointTransferMapper.Mapper<org.springframework.data.domain.Page<?>,List<?>>
public class PageMapper extends Object implements EndpointTransferMapper.Mapper<org.springframework.data.domain.Page<?>,List<?>>
A mapper betweenPageandList.
-
-
Constructor Summary
Constructors Constructor Description PageMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends org.springframework.data.domain.Page<?>>getEndpointType()Returns the type used in the endpoint.Class<? extends List<?>>getTransferType()Returns the type used when transfering data to/from the client.org.springframework.data.domain.PagetoEndpointType(List list)Converts the given transfer value to the endpoint type.ListtoTransferType(org.springframework.data.domain.Page page)Converts the given endpoint value to the transfer type.
-
-
-
Method Detail
-
getEndpointType
public Class<? extends org.springframework.data.domain.Page<?>> getEndpointType()
Description copied from interface:EndpointTransferMapper.MapperReturns the type used in the endpoint.- Specified by:
getEndpointTypein interfaceEndpointTransferMapper.Mapper<org.springframework.data.domain.Page<?>,List<?>>- Returns:
- the endpoint type
-
getTransferType
public Class<? extends List<?>> getTransferType()
Description copied from interface:EndpointTransferMapper.MapperReturns the type used when transfering data to/from the client.- Specified by:
getTransferTypein interfaceEndpointTransferMapper.Mapper<org.springframework.data.domain.Page<?>,List<?>>- Returns:
- the transfer type
-
toTransferType
public List toTransferType(org.springframework.data.domain.Page page)
Description copied from interface:EndpointTransferMapper.MapperConverts the given endpoint value to the transfer type.- Specified by:
toTransferTypein interfaceEndpointTransferMapper.Mapper<org.springframework.data.domain.Page<?>,List<?>>- Parameters:
page- the value used in the endpoint- Returns:
- the value used in communication with the client
-
toEndpointType
public org.springframework.data.domain.Page toEndpointType(List list)
Description copied from interface:EndpointTransferMapper.MapperConverts the given transfer value to the endpoint type.- Specified by:
toEndpointTypein interfaceEndpointTransferMapper.Mapper<org.springframework.data.domain.Page<?>,List<?>>- Parameters:
list- the value used in communication with the client- Returns:
- the value used in the endpoint
-
-