Class DefaultVendorDao

    • Field Detail

      • 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
    • Constructor Detail

      • DefaultVendorDao

        public DefaultVendorDao()
    • 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 interface VendorDao
        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 interface VendorDao
        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 interface VendorDao
        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 interface VendorDao
        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 interface VendorDao
        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 interface VendorDao
        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 interface VendorDao
        Parameters:
        vendorCode - the vendor's code
        Returns:
        list of consignmententries
      • createSortQueryData

        protected SortQueryData createSortQueryData​(java.lang.String sortCode,
                                                    java.lang.String query)
      • setPagedFlexibleSearchService

        public void setPagedFlexibleSearchService​(PagedFlexibleSearchService pagedFlexibleSearchService)