Class DefaultAvailableToPromiseDao

    • Field Detail

      • STOCK_LEVELS_RETURNED

        protected static final java.lang.String STOCK_LEVELS_RETURNED
        See Also:
        Constant Field Values
      • STOCK_LEVELS_EXTERNAL

        protected static final java.lang.String STOCK_LEVELS_EXTERNAL
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultAvailableToPromiseDao

        public DefaultAvailableToPromiseDao()
    • Method Detail

      • getAvailabilityForStockLevels

        public java.lang.Long getAvailabilityForStockLevels​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: AvailableToPromiseDao
        Get the quantity in stock of a certain product for a collection of stock levels (excluding availability in the external warehouses)
        Specified by:
        getAvailabilityForStockLevels in interface AvailableToPromiseDao
        Parameters:
        params - the parameters required to perform the search
        Returns:
        the quantity of product in stock
      • getAllocationQuantityForStockLevels

        public java.lang.Long getAllocationQuantityForStockLevels​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: AvailableToPromiseDao
        Get the allocated quantity of a certain product for a collection of stock levels
        Specified by:
        getAllocationQuantityForStockLevels in interface AvailableToPromiseDao
        Parameters:
        params - the parameters required to perform the search
        Returns:
        the quantity of product allocated
      • getCancellationQuantityForStockLevels

        public java.lang.Long getCancellationQuantityForStockLevels​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: AvailableToPromiseDao
        Get the cancelled quantity of a certain product for a collection of stock levels
        Specified by:
        getCancellationQuantityForStockLevels in interface AvailableToPromiseDao
        Parameters:
        params - the parameters required to perform the search
        Returns:
        the quantity of product cancelled
      • getReservedQuantityForStockLevels

        public java.lang.Long getReservedQuantityForStockLevels​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: AvailableToPromiseDao
        Get the reserved quantity of a certain product for a collection of stock levels
        Specified by:
        getReservedQuantityForStockLevels in interface AvailableToPromiseDao
        Parameters:
        params - the parameters required to perform the search
        Returns:
        the quantity of product in reserve
      • getShrinkageQuantityForStockLevels

        public java.lang.Long getShrinkageQuantityForStockLevels​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: AvailableToPromiseDao
        Get the Shrinkage quantity of a certain product for a collection of stock levels
        Specified by:
        getShrinkageQuantityForStockLevels in interface AvailableToPromiseDao
        Parameters:
        params - the parameters required to perform the search
        Returns:
        the quantity of shrinkage product that have shrinkage event
      • getWastageQuantityForStockLevels

        public java.lang.Long getWastageQuantityForStockLevels​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: AvailableToPromiseDao
        Get the Wastage quantity of a certain product for a collection of stock levels
        Specified by:
        getWastageQuantityForStockLevels in interface AvailableToPromiseDao
        Parameters:
        params - the parameters required to perform the search
        Returns:
        the quantity of Wastage product that have Wastage event
      • getIncreaseQuantityForStockLevels

        public java.lang.Long getIncreaseQuantityForStockLevels​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: AvailableToPromiseDao
        Get the Increased quantity of a certain product for a collection of stock levels
        Specified by:
        getIncreaseQuantityForStockLevels in interface AvailableToPromiseDao
        Parameters:
        params - the parameters required to perform the search
        Returns:
        the quantity of added product that have increase event
      • returnAggregateQuantity

        protected java.lang.Long returnAggregateQuantity​(java.lang.String queryString,
                                                         java.util.Map<java.lang.String,​java.lang.Object> params,
                                                         java.lang.String key)
        Runs an aggregation query that returns an instance of Long. Never null.
        Parameters:
        queryString - Query to run
        params - Parameters to apply to the query
        Returns:
        The aggregation result