Interface AbstractQueryHelper
-
- All Known Implementing Classes:
DefaultAbstractQueryHelper
public interface AbstractQueryHelperThis helper interface is to create a new search query object with the given query to be set in it.The reason behind this helper interface is both of
FlexibleSearchQueryandGenericSearchQueryhavefinalattribute signature for query attribute. This results no setter for query attribute, so a new search query object has to be instantiated with constructor to set the query and other attributes have to be copied over.Use case of this helper is to update the query of
FlexibleSearchQueryorGenericSearchQuery
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends FlexibleSearchQuery>
TgetUpdatedFlexibleSearchQuery(FlexibleSearchQuery original, java.lang.String query)Get an updated FlexibleSearchQuery of the given original one by setting the query with the given parameter<T extends GenericSearchQuery>
TgetUpdatedGenericSearchQuery(GenericSearchQuery original, GenericQuery query)Get an updated GenericSearchQuery of the given original one by setting the query with the given parameter
-
-
-
Method Detail
-
getUpdatedFlexibleSearchQuery
<T extends FlexibleSearchQuery> T getUpdatedFlexibleSearchQuery(FlexibleSearchQuery original, java.lang.String query)
Get an updated FlexibleSearchQuery of the given original one by setting the query with the given parameter- Type Parameters:
T- the subclass type ofFlexibleSearchQueryto be returned- Parameters:
original- the original FlexibleSearchQuery objectquery- the query needs to be set in the FlexibleSearchQuery- Returns:
- the updated
FlexibleSearchQueryof original one by setting the query with the given parameter - Throws:
java.lang.IllegalArgumentException- if the given original or query is null
-
getUpdatedGenericSearchQuery
<T extends GenericSearchQuery> T getUpdatedGenericSearchQuery(GenericSearchQuery original, GenericQuery query)
Get an updated GenericSearchQuery of the given original one by setting the query with the given parameter- Type Parameters:
T- the subclass of typeGenericSearchQueryto be returned- Parameters:
original- the original GenericSearchQuery objectquery- the query needs to be set in the GenericSearchQuery- Returns:
- the updated
GenericSearchQueryof original one by setting the query with the given parameter - Throws:
java.lang.IllegalArgumentException- if the given original or query is null
-
-