Package com.hybris.cockpitng.search.data
Class SimpleSearchQueryData
- java.lang.Object
-
- com.hybris.cockpitng.search.data.SimpleSearchQueryData
-
- All Implemented Interfaces:
IdentifiableSearchQuery,SearchQueryData
public class SimpleSearchQueryData extends java.lang.Object implements SearchQueryData
DTO for simple search query data
-
-
Constructor Summary
Constructors Constructor Description SimpleSearchQueryData(java.lang.String typeCode)SimpleSearchQueryData(java.lang.String typeCode, int pageSize)SimpleSearchQueryData(java.lang.String typeCode, java.util.Collection<SearchAttributeDescriptor> attributes, java.lang.String textQuery)SimpleSearchQueryData(java.lang.String searchQueryText, java.util.List<SearchAttributeDescriptor> attributes, java.lang.String typeCode, SortData sortData, int pageSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<SearchAttributeDescriptor>getAttributes()Returns set of current search attributes -SearchAttributeDescriptor/** * Returns set of current search attributes -SearchAttributeDescriptor*java.lang.StringgetAttributeValue(SearchAttributeDescriptor attribute)Returns value for a given attribute i.e.java.util.List<SearchQueryCondition>getConditions()ValueComparisonOperatorgetGlobalComparisonOperator()Returns global operator i.e.intgetPageSize()Returns current page sizejava.lang.StringgetQueryId()java.lang.StringgetSearchQueryText()java.lang.StringgetSearchType()Returns current search typeSortDatagetSortData()Returns sort informationValueComparisonOperatorgetValueComparisonOperator(SearchAttributeDescriptor attribute)Returns search operator for given attribute i.e.booleanisIncludeSubtypes()Whether subtypes should be taken into account in search resulstsbooleanisTokenizable()voidsetAttributes(java.util.Collection<SearchAttributeDescriptor> attributes)voidsetPageSize(int pageSize)voidsetSearchQueryText(java.lang.String searchQueryText)voidsetSortData(SortData sortData)Sets given sort data informationvoidsetValueComparisonOperator(ValueComparisonOperator operator)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.cockpitng.search.data.SearchQueryData
getConditions, getSelectedFacets
-
-
-
-
Constructor Detail
-
SimpleSearchQueryData
public SimpleSearchQueryData(java.lang.String typeCode)
-
SimpleSearchQueryData
public SimpleSearchQueryData(java.lang.String typeCode, int pageSize)
-
SimpleSearchQueryData
public SimpleSearchQueryData(java.lang.String typeCode, java.util.Collection<SearchAttributeDescriptor> attributes, java.lang.String textQuery)
-
SimpleSearchQueryData
public SimpleSearchQueryData(java.lang.String searchQueryText, java.util.List<SearchAttributeDescriptor> attributes, java.lang.String typeCode, SortData sortData, int pageSize)
-
-
Method Detail
-
getSearchQueryText
public java.lang.String getSearchQueryText()
- Specified by:
getSearchQueryTextin interfaceSearchQueryData- Returns:
- the searchQueryText
-
setSearchQueryText
public void setSearchQueryText(java.lang.String searchQueryText)
- Parameters:
searchQueryText- the searchQueryText to set
-
getAttributes
public java.util.Set<SearchAttributeDescriptor> getAttributes()
Description copied from interface:SearchQueryDataReturns set of current search attributes -SearchAttributeDescriptor/** * Returns set of current search attributes -SearchAttributeDescriptor*- Specified by:
getAttributesin interfaceSearchQueryData- Returns:
- the attributes
-
setAttributes
public void setAttributes(java.util.Collection<SearchAttributeDescriptor> attributes)
- Parameters:
attributes- the attributes to set
-
getSearchType
public java.lang.String getSearchType()
Description copied from interface:SearchQueryDataReturns current search type- Specified by:
getSearchTypein interfaceSearchQueryData- Returns:
- search type
-
isIncludeSubtypes
public boolean isIncludeSubtypes()
Description copied from interface:SearchQueryDataWhether subtypes should be taken into account in search resulsts- Specified by:
isIncludeSubtypesin interfaceSearchQueryData- Returns:
- if true all subtypes should be taken into accoutn in search results
-
getPageSize
public int getPageSize()
Description copied from interface:SearchQueryDataReturns current page size- Specified by:
getPageSizein interfaceSearchQueryData- Returns:
- current page size
-
setPageSize
public void setPageSize(int pageSize)
- Parameters:
pageSize- the pageSize to set
-
getSortData
public SortData getSortData()
Description copied from interface:SearchQueryDataReturns sort information- Specified by:
getSortDatain interfaceSearchQueryData- Returns:
- sort information
-
setSortData
public void setSortData(SortData sortData)
Description copied from interface:SearchQueryDataSets given sort data information- Specified by:
setSortDatain interfaceSearchQueryData- Parameters:
sortData- the sort data to set
-
getValueComparisonOperator
public ValueComparisonOperator getValueComparisonOperator(SearchAttributeDescriptor attribute)
Description copied from interface:SearchQueryDataReturns search operator for given attribute i.e.SearchAttributeDescriptor- Specified by:
getValueComparisonOperatorin interfaceSearchQueryData- Parameters:
attribute- given search attribute- Returns:
- appropriate search operator
-
getAttributeValue
public java.lang.String getAttributeValue(SearchAttributeDescriptor attribute)
Description copied from interface:SearchQueryDataReturns value for a given attribute i.e.SearchAttributeDescriptor- Specified by:
getAttributeValuein interfaceSearchQueryData- Parameters:
attribute- given search attribute- Returns:
- appropriate search operator
-
setValueComparisonOperator
public void setValueComparisonOperator(ValueComparisonOperator operator)
- Parameters:
operator- the operator to set
-
isTokenizable
public boolean isTokenizable()
- Specified by:
isTokenizablein interfaceSearchQueryData- Returns:
- whether condition value should be tokenized based on special characters and converted to multiple conditions
-
getConditions
public java.util.List<SearchQueryCondition> getConditions()
- Specified by:
getConditionsin interfaceSearchQueryData- Returns:
- condition collection
-
getGlobalComparisonOperator
public ValueComparisonOperator getGlobalComparisonOperator()
Description copied from interface:SearchQueryDataReturns global operator i.e. how conditions are connected are ther OR-ed or AND-ed- Specified by:
getGlobalComparisonOperatorin interfaceSearchQueryData- Returns:
- global operator
-
getQueryId
public java.lang.String getQueryId()
- Specified by:
getQueryIdin interfaceIdentifiableSearchQuery- Returns:
- identifier of a query. Queries with same identifiers are assumed to perform same request to data source
-
-