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.String
DOESNOTEXIST
static java.lang.String
ONECATALOG
static java.lang.String
TWOCATALOGS
-
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 givenSortParameters
to 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 givenSortParameters
to 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 ofcount
instances of model given as a generic type matching given parameters using givenSortParameters
to sort results.java.util.Collection<CatalogModel>
findAllCatalogs()
Return allCatalogModel
s sorted in ascending order byCatalogModel.ID
.CatalogModel
findCatalogById(java.lang.String id)
ReturnsCatalogModel
with the given id.java.util.Collection<CatalogModel>
findDefaultCatalogs()
Returns a collection ofCatalogModel
s with the current defaultCatalogModel
of 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:CatalogDao
Return allCatalogModel
s sorted in ascending order byCatalogModel.ID
.- Specified by:
findAllCatalogs
in interfaceCatalogDao
- Returns:
Collection
ofCatalogModel
s or empty collection.
-
findCatalogById
public CatalogModel findCatalogById(java.lang.String id)
Description copied from interface:CatalogDao
ReturnsCatalogModel
with the given id.- Specified by:
findCatalogById
in interfaceCatalogDao
- Parameters:
id
- catalog id- Returns:
- Matching
CatalogModel
-
find
public java.util.List<CatalogModel> find()
Description copied from interface:GenericDao
Searches for all instances of model given as a generic type.- Specified by:
find
in 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:GenericDao
Searches for all instances of model given as a generic type matching given parameters.- Specified by:
find
in interfaceGenericDao<CatalogModel>
- Parameters:
params
- parameters to add to search query asMap
with parameter name as a key and parameter value as a value.
-
find
public java.util.List<CatalogModel> find(SortParameters sortParameters)
Description copied from interface:GenericDao
Searches for all instances of model given as a generic type using givenSortParameters
to sort results.- Specified by:
find
in interfaceGenericDao<CatalogModel>
- Parameters:
sortParameters
-SortParameters
object 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:GenericDao
Searches for all instances of model given as a generic type matching given parameters using givenSortParameters
to sort results.- Specified by:
find
in interfaceGenericDao<CatalogModel>
- Parameters:
params
- parameters to add to search query asMap
with parameter name as a key and parameter value as a value.sortParameters
-SortParameters
object 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:GenericDao
Searches for maximum ofcount
instances of model given as a generic type matching given parameters using givenSortParameters
to sort results.- Specified by:
find
in interfaceGenericDao<CatalogModel>
- Parameters:
params
- parameters to add to search query asMap
with parameter name as a key and parameter value as a value.sortParameters
-SortParameters
object used to sort results.
-
findDefaultCatalogs
public java.util.Collection<CatalogModel> findDefaultCatalogs()
Description copied from interface:CatalogDao
Returns a collection ofCatalogModel
s with the current defaultCatalogModel
of the system (one element).- Specified by:
findDefaultCatalogs
in interfaceCatalogDao
- Returns:
- an empty collection if no default catalog is set in the system.
-
-