Class SearchImpl
- java.lang.Object
-
- de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.search.impl.SearchImpl
-
- All Implemented Interfaces:
BackendAware,BusinessObject,MessageListHolder,Search,java.io.Serializable,java.lang.Cloneable
public class SearchImpl extends BusinessObjectBase implements Search
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
backendObject, backendType, bobMessages, bobState, extensionData, genericFactory, handle, moduleConfigurationAccess, techKey
-
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID
-
-
Constructor Summary
Constructors Constructor Description SearchImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDateRange()Retrieves the date range (i.e.SearchBackendgetSearchBackend()java.util.List<SearchResult>getSearchResult(SearchFilter searchFilter, PageableData pageableData)Triggers a search.intgetSearchResultsTotalNumber()java.util.List<SortData>getSortOptions()Sort options which are stored in the session.booleanisDirty()Is state dirty, i.e.voidsetDirty(boolean b)Sets state to dirty, i.e.voidsetSearchBackend(SearchBackend searchBackend)Can be used for testing.protected voidsetSortOptions(java.util.List<SortData> sortData)-
Methods inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
addExtensionData, addMessage, clearMessages, clearMessages, clearOwnMessages, clone, copyMessages, copyMessages, createUniqueHandle, destroy, determineBackendObject, equals, getBackendBusinessObject, getBackendBusinessObject, getBackendType, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getMessageList, getModuleConfigurationAccess, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hashCode, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setBackendObject, setBackendType, setExtensionMap, setGenericFactory, setHandle, setInvalid, setModuleConfigurationAccess, setTechKey, setValid, toString
-
-
-
-
Method Detail
-
getSortOptions
public java.util.List<SortData> getSortOptions()
Description copied from interface:SearchSort options which are stored in the session. The UI might not always send the sort options, so we need a session storage- Specified by:
getSortOptionsin interfaceSearch- Returns:
- Current sort options
-
isDirty
public boolean isDirty()
Description copied from interface:SearchIs state dirty, i.e. do we need to access the back end for the next search call?
-
getSearchBackend
public SearchBackend getSearchBackend() throws BackendException
- Returns:
- the searchBackend
- Throws:
BackendException
-
setSearchBackend
public void setSearchBackend(SearchBackend searchBackend)
Can be used for testing. If not called, the backend object will be derived via anotations.- Parameters:
searchBackend- the searchBackend to set
-
getSearchResult
public java.util.List<SearchResult> getSearchResult(SearchFilter searchFilter, PageableData pageableData)
Description copied from interface:SearchTriggers a search. In case the search is not dirty, no back end call will be made but paging will be done in the BOL layer- Specified by:
getSearchResultin interfaceSearch- Parameters:
searchFilter- Filter settingspageableData- Paging settings- Returns:
- List of search result entries according to filter and paging settings
-
setDirty
public void setDirty(boolean b)
Description copied from interface:SearchSets state to dirty, i.e. the next search call needs to access the back end
-
getSearchResultsTotalNumber
public int getSearchResultsTotalNumber()
- Specified by:
getSearchResultsTotalNumberin interfaceSearch- Returns:
- Total number of search results, taking no paging into account
-
getDateRange
public int getDateRange()
Description copied from interface:SearchRetrieves the date range (i.e. the number of days the system will search for in the past) from customizing- Specified by:
getDateRangein interfaceSearch- Returns:
- Date range in days
-
setSortOptions
protected void setSortOptions(java.util.List<SortData> sortData)
- Parameters:
sortData-
-
-