Interface AbstractQueryHelper
-
- All Known Implementing Classes:
DefaultAbstractQueryHelper
public interface AbstractQueryHelper
This 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
FlexibleSearchQuery
andGenericSearchQuery
havefinal
attribute 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
FlexibleSearchQuery
orGenericSearchQuery
-
-
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 ofFlexibleSearchQuery
to be returned- Parameters:
original
- the original FlexibleSearchQuery objectquery
- the query needs to be set in the FlexibleSearchQuery- Returns:
- the updated
FlexibleSearchQuery
of 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 typeGenericSearchQuery
to be returned- Parameters:
original
- the original GenericSearchQuery objectquery
- the query needs to be set in the GenericSearchQuery- Returns:
- the updated
GenericSearchQuery
of original one by setting the query with the given parameter - Throws:
java.lang.IllegalArgumentException
- if the given original or query is null
-
-