Class FlexibleSearchNamedQueryService
- java.lang.Object
-
- de.hybris.platform.cms2.namedquery.service.impl.FlexibleSearchNamedQueryService
-
- All Implemented Interfaces:
NamedQueryService
public class FlexibleSearchNamedQueryService extends java.lang.Object implements NamedQueryService
NamedQueryService implemented as an adapter for Flexible Search Service. This implementation receives requests to perform the search and uses theFlexibleSearchServiceservice to leverage the final search.
-
-
Constructor Summary
Constructors Constructor Description FlexibleSearchNamedQueryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FlexibleSearchNamedQueryConvertergetFlexibleSearchNamedQueryConverter()protected FlexibleSearchServicegetFlexibleSearchService()protected I18NServicegetI18NService()protected NamedQueryConversionDtogetInternalNamedQuery(NamedQuery namedQuery, java.lang.String query)Creates the internal named query object, which contains the query statementprotected NamedQueryFactorygetNamedQueryFactory()<T> SearchResult<T>getSearchResult(NamedQuery namedQuery)Performs a search based on the given namedQuery attribute<T> java.util.List<T>search(NamedQuery namedQuery)Performs a search based on the given namedQuery attributevoidsetFlexibleSearchNamedQueryConverter(FlexibleSearchNamedQueryConverter flexibleSearchNamedQueryConverter)voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)voidsetI18NService(I18NService i18NService)voidsetNamedQueryFactory(NamedQueryFactory namedQueryFactory)
-
-
-
Method Detail
-
search
public <T> java.util.List<T> search(NamedQuery namedQuery)
Description copied from interface:NamedQueryServicePerforms a search based on the given namedQuery attribute- Specified by:
searchin interfaceNamedQueryService- Type Parameters:
T- - The type to be returned- Parameters:
namedQuery- - object holding everything related to the current query.- Returns:
- the resulting list
-
getSearchResult
public <T> SearchResult<T> getSearchResult(NamedQuery namedQuery) throws InvalidNamedQueryException, SearchExecutionNamedQueryException
Description copied from interface:NamedQueryServicePerforms a search based on the given namedQuery attribute- Specified by:
getSearchResultin interfaceNamedQueryService- Type Parameters:
T- - The type to be returned- Parameters:
namedQuery- - object holding everything related to the current query.- Returns:
- the resulting
SearchResult - Throws:
InvalidNamedQueryException- when the queryName does not match any existing named queriesSearchExecutionNamedQueryException- when an error happens while executing the query on the search engine
-
getInternalNamedQuery
protected NamedQueryConversionDto getInternalNamedQuery(NamedQuery namedQuery, java.lang.String query)
Creates the internal named query object, which contains the query statement- Parameters:
namedQuery- the valued object to be used in the assignmentquery- the query assigned to this namedQuery- Returns:
- an internal named query object, internal to this component.
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
getFlexibleSearchService
protected FlexibleSearchService getFlexibleSearchService()
-
getFlexibleSearchNamedQueryConverter
protected FlexibleSearchNamedQueryConverter getFlexibleSearchNamedQueryConverter()
-
setFlexibleSearchNamedQueryConverter
public void setFlexibleSearchNamedQueryConverter(FlexibleSearchNamedQueryConverter flexibleSearchNamedQueryConverter)
-
getNamedQueryFactory
protected NamedQueryFactory getNamedQueryFactory()
-
setNamedQueryFactory
public void setNamedQueryFactory(NamedQueryFactory namedQueryFactory)
-
getI18NService
protected I18NService getI18NService()
-
setI18NService
public void setI18NService(I18NService i18NService)
-
-