Class DefaultVendorDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<VendorModel>
-
- de.hybris.platform.marketplaceservices.vendor.daos.impl.DefaultVendorDao
-
- All Implemented Interfaces:
VendorDao
,GenericDao<VendorModel>
public class DefaultVendorDao extends DefaultGenericDao<VendorModel> implements VendorDao
Default implementation forVendorDao
.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CATEGORY_TO_VENDOR_RELATION
protected static java.lang.String
CONSIGNMENT_CODE
protected static java.lang.String
FIND_ACTIVE_CATALOGS
protected static java.lang.String
FIND_ACTIVE_CATALOGVERSIONS
protected static java.lang.String
FIND_ACTIVE_VENDORS
protected static java.lang.String
FIND_PENDING_CONSIGNMENTENTRY_FOR_VENDOR
protected static java.lang.String
FIND_VENDOR_BY_CONSIGNMENT_CODE
protected static java.lang.String
FIND_VENDOR_BY_PRODUCT_CODE
protected static java.lang.String
FIND_VENDOR_FOR_ID
protected static java.lang.String
ORDER_BY_NAME_ASC
protected static java.lang.String
ORDER_BY_NAME_DESC
protected static java.lang.String
PRODUCT_CODE
protected static java.lang.String
VENDOR_ACTIVE
protected static java.lang.String
VENDOR_CODE
-
Constructor Summary
Constructors Constructor Description DefaultVendorDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SortQueryData
createSortQueryData(java.lang.String sortCode, java.lang.String query)
java.util.List<CatalogModel>
findActiveCatalogs()
Find all catalogs belongs to active vendorsjava.util.List<CatalogVersionModel>
findActiveCatalogVersions()
Final all active catalog versions belongs to active vendorsjava.util.List<VendorModel>
findActiveVendors()
Find all active vendorsSearchPageData<VendorModel>
findPagedActiveVendors(PageableData pageableData)
Find all active vendorsjava.util.List<ConsignmentEntryModel>
findPendingConsignmentEntryForVendor(java.lang.String vendorCode)
find consignmententries in WAITING status for a vendorprotected java.util.Optional<VendorModel>
findUnique(FlexibleSearchQuery query)
java.util.Optional<VendorModel>
findVendorByCode(java.lang.String vendorCode)
Find VendorModel by given codejava.util.Optional<VendorModel>
findVendorByConsignmentCode(java.lang.String consignmentCode)
Find vendor for given consignmentjava.util.Optional<VendorModel>
findVendorByProduct(ProductModel product)
Find vendor for given productprotected PagedFlexibleSearchService
getPagedFlexibleSearchService()
void
setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao
find, find, find, find, find, getFlexibleSearchService, setFlexibleSearchService
-
-
-
-
Field Detail
-
VENDOR_CODE
protected static final java.lang.String VENDOR_CODE
- See Also:
- Constant Field Values
-
VENDOR_ACTIVE
protected static final java.lang.String VENDOR_ACTIVE
- See Also:
- Constant Field Values
-
PRODUCT_CODE
protected static final java.lang.String PRODUCT_CODE
- See Also:
- Constant Field Values
-
CONSIGNMENT_CODE
protected static final java.lang.String CONSIGNMENT_CODE
- See Also:
- Constant Field Values
-
CATEGORY_TO_VENDOR_RELATION
protected static final java.lang.String CATEGORY_TO_VENDOR_RELATION
- See Also:
- Constant Field Values
-
ORDER_BY_NAME_ASC
protected static final java.lang.String ORDER_BY_NAME_ASC
- See Also:
- Constant Field Values
-
ORDER_BY_NAME_DESC
protected static final java.lang.String ORDER_BY_NAME_DESC
- See Also:
- Constant Field Values
-
FIND_VENDOR_FOR_ID
protected static final java.lang.String FIND_VENDOR_FOR_ID
- See Also:
- Constant Field Values
-
FIND_ACTIVE_VENDORS
protected static final java.lang.String FIND_ACTIVE_VENDORS
- See Also:
- Constant Field Values
-
FIND_VENDOR_BY_PRODUCT_CODE
protected static final java.lang.String FIND_VENDOR_BY_PRODUCT_CODE
- See Also:
- Constant Field Values
-
FIND_VENDOR_BY_CONSIGNMENT_CODE
protected static final java.lang.String FIND_VENDOR_BY_CONSIGNMENT_CODE
- See Also:
- Constant Field Values
-
FIND_ACTIVE_CATALOGS
protected static final java.lang.String FIND_ACTIVE_CATALOGS
- See Also:
- Constant Field Values
-
FIND_ACTIVE_CATALOGVERSIONS
protected static final java.lang.String FIND_ACTIVE_CATALOGVERSIONS
- See Also:
- Constant Field Values
-
FIND_PENDING_CONSIGNMENTENTRY_FOR_VENDOR
protected static final java.lang.String FIND_PENDING_CONSIGNMENTENTRY_FOR_VENDOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
findVendorByCode
public java.util.Optional<VendorModel> findVendorByCode(java.lang.String vendorCode)
Description copied from interface:VendorDao
Find VendorModel by given code- Specified by:
findVendorByCode
in interfaceVendorDao
- Returns:
- VendorModel otherwise empty option
-
findActiveVendors
public java.util.List<VendorModel> findActiveVendors()
Description copied from interface:VendorDao
Find all active vendors- Specified by:
findActiveVendors
in interfaceVendorDao
- Returns:
- the list of all active vendors
-
findVendorByProduct
public java.util.Optional<VendorModel> findVendorByProduct(ProductModel product)
Description copied from interface:VendorDao
Find vendor for given product- Specified by:
findVendorByProduct
in interfaceVendorDao
- Parameters:
product
- product to check- Returns:
- VendorModel otherwise empty option
-
findVendorByConsignmentCode
public java.util.Optional<VendorModel> findVendorByConsignmentCode(java.lang.String consignmentCode)
Description copied from interface:VendorDao
Find vendor for given consignment- Specified by:
findVendorByConsignmentCode
in interfaceVendorDao
- Parameters:
consignmentCode
- code of the consignment- Returns:
- VendorModel otherwise empty option
-
findActiveCatalogs
public java.util.List<CatalogModel> findActiveCatalogs()
Description copied from interface:VendorDao
Find all catalogs belongs to active vendors- Specified by:
findActiveCatalogs
in interfaceVendorDao
- Returns:
- list of all active catalogs
-
findActiveCatalogVersions
public java.util.List<CatalogVersionModel> findActiveCatalogVersions()
Description copied from interface:VendorDao
Final all active catalog versions belongs to active vendors- Specified by:
findActiveCatalogVersions
in interfaceVendorDao
- Returns:
- list of all active catalog versions
-
findPendingConsignmentEntryForVendor
public java.util.List<ConsignmentEntryModel> findPendingConsignmentEntryForVendor(java.lang.String vendorCode)
Description copied from interface:VendorDao
find consignmententries in WAITING status for a vendor- Specified by:
findPendingConsignmentEntryForVendor
in interfaceVendorDao
- Parameters:
vendorCode
- the vendor's code- Returns:
- list of consignmententries
-
findPagedActiveVendors
public SearchPageData<VendorModel> findPagedActiveVendors(PageableData pageableData)
Description copied from interface:VendorDao
Find all active vendors- Specified by:
findPagedActiveVendors
in interfaceVendorDao
- Parameters:
pageableData
- the pagination data- Returns:
- paging result of all active vendors
-
findUnique
protected java.util.Optional<VendorModel> findUnique(FlexibleSearchQuery query)
-
createSortQueryData
protected SortQueryData createSortQueryData(java.lang.String sortCode, java.lang.String query)
-
getPagedFlexibleSearchService
protected PagedFlexibleSearchService getPagedFlexibleSearchService()
-
setPagedFlexibleSearchService
public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
-
-