Class FlexibleSearchNamedQueryConverter
java.lang.Object
de.hybris.platform.cms2.namedquery.service.impl.FlexibleSearchNamedQueryConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<NamedQueryConversionDto,FlexibleSearchQuery>
public class FlexibleSearchNamedQueryConverter
extends Object
implements org.springframework.core.convert.converter.Converter<NamedQueryConversionDto,FlexibleSearchQuery>
Default Converter used by
FlexibleSearchNamedQueryService to build the final FlexibleSearchQuery object.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringappendSort(List<Sort> sort) Append the order by clause if the Sort list is not empty.convert(NamedQueryConversionDto namedQueryConversion) protected IntegervoidsetDefaultPageSize(Integer defaultPageSize) protected voidsetFlexibleSearchStartAndCount(FlexibleSearchQuery flexibleSearchQuery, Integer requestedCurrentPage, Integer requestedPageSize) Set the requested currentPage and pageSize or use the default values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Field Details
-
ORDER_BY
- See Also:
-
DEFAULT_INITIAL_PAGE
-
COMMA
- See Also:
-
SPACE
- See Also:
-
EMPTY_STRING
- See Also:
-
OPEN_BRACKET
- See Also:
-
CLOSE_BRACKET
- See Also:
-
-
Constructor Details
-
FlexibleSearchNamedQueryConverter
public FlexibleSearchNamedQueryConverter()
-
-
Method Details
-
convert
public FlexibleSearchQuery convert(NamedQueryConversionDto namedQueryConversion) throws ConversionException - Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<NamedQueryConversionDto,FlexibleSearchQuery> - Throws:
ConversionException
-
appendSort
Append the order by clause if the Sort list is not empty. If sort list is empty, return an empty String.- Parameters:
sort- - a list ofSortobjects- Returns:
- the order by query or empty, if no sort clause is provided
-
setFlexibleSearchStartAndCount
protected void setFlexibleSearchStartAndCount(FlexibleSearchQuery flexibleSearchQuery, Integer requestedCurrentPage, Integer requestedPageSize) Set the requested currentPage and pageSize or use the default values.- Parameters:
flexibleSearchQuery-requestedCurrentPage-requestedPageSize-
-
setDefaultPageSize
-
getDefaultPageSize
-