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 java.lang.Object implements org.springframework.core.convert.converter.Converter<NamedQueryConversionDto,FlexibleSearchQuery>
Default Converter used byFlexibleSearchNamedQueryServiceto build the final FlexibleSearchQuery object.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCLOSE_BRACKETprotected static java.lang.StringCOMMAprotected static java.lang.IntegerDEFAULT_INITIAL_PAGEprotected static java.lang.StringEMPTY_STRINGprotected static java.lang.StringOPEN_BRACKETprotected static java.lang.StringORDER_BYprotected static java.lang.StringSPACE
-
Constructor Summary
Constructors Constructor Description FlexibleSearchNamedQueryConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringappendSort(java.util.List<Sort> sort)Append the order by clause if the Sort list is not empty.FlexibleSearchQueryconvert(NamedQueryConversionDto namedQueryConversion)protected java.lang.IntegergetDefaultPageSize()voidsetDefaultPageSize(java.lang.Integer defaultPageSize)protected voidsetFlexibleSearchStartAndCount(FlexibleSearchQuery flexibleSearchQuery, java.lang.Integer requestedCurrentPage, java.lang.Integer requestedPageSize)Set the requested currentPage and pageSize or use the default values.
-
-
-
Field Detail
-
ORDER_BY
protected static final java.lang.String ORDER_BY
- See Also:
- Constant Field Values
-
DEFAULT_INITIAL_PAGE
protected static final java.lang.Integer DEFAULT_INITIAL_PAGE
-
COMMA
protected static final java.lang.String COMMA
- See Also:
- Constant Field Values
-
SPACE
protected static final java.lang.String SPACE
- See Also:
- Constant Field Values
-
EMPTY_STRING
protected static final java.lang.String EMPTY_STRING
- See Also:
- Constant Field Values
-
OPEN_BRACKET
protected static final java.lang.String OPEN_BRACKET
- See Also:
- Constant Field Values
-
CLOSE_BRACKET
protected static final java.lang.String CLOSE_BRACKET
- See Also:
- Constant Field Values
-
-
Method Detail
-
convert
public FlexibleSearchQuery convert(NamedQueryConversionDto namedQueryConversion) throws ConversionException
- Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<NamedQueryConversionDto,FlexibleSearchQuery>- Throws:
ConversionException
-
appendSort
protected java.lang.String appendSort(java.util.List<Sort> sort)
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, java.lang.Integer requestedCurrentPage, java.lang.Integer requestedPageSize)
Set the requested currentPage and pageSize or use the default values.- Parameters:
flexibleSearchQuery-requestedCurrentPage-requestedPageSize-
-
setDefaultPageSize
public void setDefaultPageSize(java.lang.Integer defaultPageSize)
-
getDefaultPageSize
protected java.lang.Integer getDefaultPageSize()
-
-