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.StringCATEGORY_TO_VENDOR_RELATIONprotected static java.lang.StringCONSIGNMENT_CODEprotected static java.lang.StringFIND_ACTIVE_CATALOGSprotected static java.lang.StringFIND_ACTIVE_CATALOGVERSIONSprotected static java.lang.StringFIND_ACTIVE_VENDORSprotected static java.lang.StringFIND_PENDING_CONSIGNMENTENTRY_FOR_VENDORprotected static java.lang.StringFIND_VENDOR_BY_CONSIGNMENT_CODEprotected static java.lang.StringFIND_VENDOR_BY_PRODUCT_CODEprotected static java.lang.StringFIND_VENDOR_FOR_IDprotected static java.lang.StringORDER_BY_NAME_ASCprotected static java.lang.StringORDER_BY_NAME_DESCprotected static java.lang.StringPRODUCT_CODEprotected static java.lang.StringVENDOR_ACTIVEprotected static java.lang.StringVENDOR_CODE
-
Constructor Summary
Constructors Constructor Description DefaultVendorDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SortQueryDatacreateSortQueryData(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 PagedFlexibleSearchServicegetPagedFlexibleSearchService()voidsetPagedFlexibleSearchService(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:VendorDaoFind VendorModel by given code- Specified by:
findVendorByCodein interfaceVendorDao- Returns:
- VendorModel otherwise empty option
-
findActiveVendors
public java.util.List<VendorModel> findActiveVendors()
Description copied from interface:VendorDaoFind all active vendors- Specified by:
findActiveVendorsin interfaceVendorDao- Returns:
- the list of all active vendors
-
findVendorByProduct
public java.util.Optional<VendorModel> findVendorByProduct(ProductModel product)
Description copied from interface:VendorDaoFind vendor for given product- Specified by:
findVendorByProductin 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:VendorDaoFind vendor for given consignment- Specified by:
findVendorByConsignmentCodein interfaceVendorDao- Parameters:
consignmentCode- code of the consignment- Returns:
- VendorModel otherwise empty option
-
findActiveCatalogs
public java.util.List<CatalogModel> findActiveCatalogs()
Description copied from interface:VendorDaoFind all catalogs belongs to active vendors- Specified by:
findActiveCatalogsin interfaceVendorDao- Returns:
- list of all active catalogs
-
findActiveCatalogVersions
public java.util.List<CatalogVersionModel> findActiveCatalogVersions()
Description copied from interface:VendorDaoFinal all active catalog versions belongs to active vendors- Specified by:
findActiveCatalogVersionsin interfaceVendorDao- Returns:
- list of all active catalog versions
-
findPendingConsignmentEntryForVendor
public java.util.List<ConsignmentEntryModel> findPendingConsignmentEntryForVendor(java.lang.String vendorCode)
Description copied from interface:VendorDaofind consignmententries in WAITING status for a vendor- Specified by:
findPendingConsignmentEntryForVendorin interfaceVendorDao- Parameters:
vendorCode- the vendor's code- Returns:
- list of consignmententries
-
findPagedActiveVendors
public SearchPageData<VendorModel> findPagedActiveVendors(PageableData pageableData)
Description copied from interface:VendorDaoFind all active vendors- Specified by:
findPagedActiveVendorsin 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)
-
-