Package de.hybris.platform.catalog
Class CatalogMockDao
- java.lang.Object
-
- de.hybris.platform.catalog.CatalogMockDao
-
- All Implemented Interfaces:
CatalogDao,GenericDao<CatalogModel>
public class CatalogMockDao extends java.lang.Object implements CatalogDao
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDOESNOTEXISTstatic java.lang.StringONECATALOGstatic java.lang.StringTWOCATALOGS
-
Constructor Summary
Constructors Constructor Description CatalogMockDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CatalogModel>find()Searches for all instances of model given as a generic type.java.util.List<CatalogModel>find(SortParameters sortParameters)Searches for all instances of model given as a generic type using givenSortParametersto sort results.java.util.List<CatalogModel>find(java.util.Map<java.lang.String,? extends java.lang.Object> params)Searches for all instances of model given as a generic type matching given parameters.java.util.List<CatalogModel>find(java.util.Map<java.lang.String,? extends java.lang.Object> params, SortParameters sortParameters)Searches for all instances of model given as a generic type matching given parameters using givenSortParametersto sort results.java.util.List<CatalogModel>find(java.util.Map<java.lang.String,? extends java.lang.Object> params, SortParameters sortParameters, int count)Searches for maximum ofcountinstances of model given as a generic type matching given parameters using givenSortParametersto sort results.java.util.Collection<CatalogModel>findAllCatalogs()Return allCatalogModels sorted in ascending order byCatalogModel.ID.CatalogModelfindCatalogById(java.lang.String id)ReturnsCatalogModelwith the given id.java.util.Collection<CatalogModel>findDefaultCatalogs()Returns a collection ofCatalogModels with the current defaultCatalogModelof the system (one element).
-
-
-
Field Detail
-
DOESNOTEXIST
public static final java.lang.String DOESNOTEXIST
- See Also:
- Constant Field Values
-
ONECATALOG
public static final java.lang.String ONECATALOG
- See Also:
- Constant Field Values
-
TWOCATALOGS
public static final java.lang.String TWOCATALOGS
- See Also:
- Constant Field Values
-
-
Method Detail
-
findAllCatalogs
public java.util.Collection<CatalogModel> findAllCatalogs()
Description copied from interface:CatalogDaoReturn allCatalogModels sorted in ascending order byCatalogModel.ID.- Specified by:
findAllCatalogsin interfaceCatalogDao- Returns:
CollectionofCatalogModels or empty collection.
-
findCatalogById
public CatalogModel findCatalogById(java.lang.String id)
Description copied from interface:CatalogDaoReturnsCatalogModelwith the given id.- Specified by:
findCatalogByIdin interfaceCatalogDao- Parameters:
id- catalog id- Returns:
- Matching
CatalogModel
-
find
public java.util.List<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
public java.util.List<CatalogModel> find(java.util.Map<java.lang.String,? extends java.lang.Object> params)
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
public java.util.List<CatalogModel> find(SortParameters sortParameters)
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
public java.util.List<CatalogModel> find(java.util.Map<java.lang.String,? extends java.lang.Object> params, SortParameters sortParameters)
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 java.util.List<CatalogModel> find(java.util.Map<java.lang.String,? extends java.lang.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
public java.util.Collection<CatalogModel> 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.
-
-