Package de.hybris.platform.catalog
Class CatalogMockDao
java.lang.Object
de.hybris.platform.catalog.CatalogMockDao
- All Implemented Interfaces:
CatalogDao,GenericDao<CatalogModel>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfind()Searches for all instances of model given as a generic type.find(SortParameters sortParameters) Searches for all instances of model given as a generic type using givenSortParametersto sort results.Searches for all instances of model given as a generic type matching given parameters.find(Map<String, ? extends Object> params, SortParameters sortParameters) Searches for all instances of model given as a generic type matching given parameters using givenSortParametersto sort results.find(Map<String, ? extends Object> params, SortParameters sortParameters, int count) Searches for maximum ofcountinstances of model given as a generic type matching given parameters using givenSortParametersto sort results.Return allCatalogModels sorted in ascending order byCatalogModel.ID.ReturnsCatalogModelwith the given id.Returns a collection ofCatalogModels with the current defaultCatalogModelof the system (one element).
-
Field Details
-
DOESNOTEXIST
- See Also:
-
ONECATALOG
- See Also:
-
TWOCATALOGS
- See Also:
-
-
Constructor Details
-
CatalogMockDao
public CatalogMockDao()
-
-
Method Details
-
findAllCatalogs
Description copied from interface:CatalogDaoReturn allCatalogModels sorted in ascending order byCatalogModel.ID.- Specified by:
findAllCatalogsin interfaceCatalogDao- Returns:
CollectionofCatalogModels or empty collection.
-
findCatalogById
Description copied from interface:CatalogDaoReturnsCatalogModelwith the given id.- Specified by:
findCatalogByIdin interfaceCatalogDao- Parameters:
id- catalog id- Returns:
- Matching
CatalogModel
-
find
Description copied from interface:GenericDaoSearches for all instances of model given as a generic type.- Specified by:
findin interfaceGenericDao<CatalogModel>- Returns:
- List of all instances of model given as a generic type.
-
find
Description copied from interface:GenericDaoSearches for all instances of model given as a generic type matching given parameters.- Specified by:
findin interfaceGenericDao<CatalogModel>- Parameters:
params- parameters to add to search query asMapwith parameter name as a key and parameter value as a value.
-
find
Description copied from interface:GenericDaoSearches for all instances of model given as a generic type using givenSortParametersto sort results.- Specified by:
findin interfaceGenericDao<CatalogModel>- Parameters:
sortParameters-SortParametersobject used to sort results.- Returns:
- List of all instances of model given as a generic type sorted using
SortParameters.
-
find
Description copied from interface:GenericDaoSearches for all instances of model given as a generic type matching given parameters using givenSortParametersto sort results.- Specified by:
findin interfaceGenericDao<CatalogModel>- Parameters:
params- parameters to add to search query asMapwith parameter name as a key and parameter value as a value.sortParameters-SortParametersobject used to sort results.
-
find
public List<CatalogModel> find(Map<String, ? extends Object> params, SortParameters sortParameters, int count) Description copied from interface:GenericDaoSearches for maximum ofcountinstances of model given as a generic type matching given parameters using givenSortParametersto sort results.- Specified by:
findin interfaceGenericDao<CatalogModel>- Parameters:
params- parameters to add to search query asMapwith parameter name as a key and parameter value as a value.sortParameters-SortParametersobject used to sort results.
-
findDefaultCatalogs
Description copied from interface:CatalogDaoReturns a collection ofCatalogModels with the current defaultCatalogModelof the system (one element).- Specified by:
findDefaultCatalogsin interfaceCatalogDao- Returns:
- an empty collection if no default catalog is set in the system.
-