Class OrderServiceImpl

  • All Implemented Interfaces:
    OrderService

    @Service
    public class OrderServiceImpl
    extends java.lang.Object
    implements OrderService
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<OrderTimeLineBean> changeOrderStatus​(java.lang.String orderId, java.lang.String orderStatus)
      This method updates database entity.
      java.util.Optional<Order> createOrder​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> orderAsMap)
      This method creates a database entity.
      OrderTimeLineBean getLastOrderTimelineBean​(java.lang.String orderId)
      This method returns bean.
      java.util.Map<java.lang.String,​java.lang.Object> getOrder​(java.lang.String orderId)
      This method returns data as map.
      java.util.List<CommerceItem> getOrderCommerceItems​(java.lang.String orderId)
      This method returns data as list.
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getOrders()
      This method retrieves a map, which can be processed in a templates.
      java.util.List<OrderTimeLineBean> getOrderTimeLine​(java.lang.String orderId)
      This method returns beans as list.
      boolean isOrderBelongToBuyer​(java.lang.String orderId)
      This method checks is database entity belong to other database entity.
      boolean isOrderBelongToVendor​(java.lang.String orderId)
      This method checks is database entity belong to other database entity.
      boolean isOrderCanceled​(java.lang.String orderStatus)
      This method checks is database entity field had some value.
      boolean isOrderCompleted​(java.lang.String orderId)
      This method checks is database entity field had some value.
      boolean isOrderConfirmed​(java.lang.String orderStatus)
      This method checks is database entity field had some value.
      boolean isOrderDenied​(java.lang.String orderStatus)
      This method checks is database entity field had some value.
      boolean isOrderNew​(java.lang.String orderStatus)
      This method checks is database entity field had some value.
      boolean isOrderPerformed​(java.lang.String orderStatus)
      This method checks is database entity field had some value.
      boolean isOrderShow​(java.lang.String orderId, java.lang.String orderStatus)
      This method checks is database entity field had some value.
      void removeOrder​(java.lang.String orderId)
      This method removes database entities.
      void removeOrderFromCommerceItem​(java.lang.String orderId, java.lang.String commerceItemId)
      This method removes relationship between database entities.
      void removeOrderFromCommerceItems​(java.lang.String orderId)
      This method removes relationship between database entities.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OrderServiceImpl

        public OrderServiceImpl()
    • Method Detail

      • createOrder

        @Transactional
        public java.util.Optional<Order> createOrder​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> orderAsMap)
        Description copied from interface: OrderService
        This method creates a database entity.
        Specified by:
        createOrder in interface OrderService
        Parameters:
        orderAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • removeOrder

        @Transactional
        public void removeOrder​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method removes database entities.
        Specified by:
        removeOrder in interface OrderService
        Parameters:
        orderId - identification for database entity which will be removed
      • removeOrderFromCommerceItem

        @Transactional
        public void removeOrderFromCommerceItem​(java.lang.String orderId,
                                                java.lang.String commerceItemId)
        Description copied from interface: OrderService
        This method removes relationship between database entities.
        Specified by:
        removeOrderFromCommerceItem in interface OrderService
        Parameters:
        orderId - identification for database entity which will be removed
        commerceItemId - identification for database entity which will be updated
      • removeOrderFromCommerceItems

        @Transactional
        public void removeOrderFromCommerceItems​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method removes relationship between database entities.
        Specified by:
        removeOrderFromCommerceItems in interface OrderService
        Parameters:
        orderId - identification for database entity which will be removed
      • getOrders

        @Transactional
        public java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getOrders()
        Description copied from interface: OrderService
        This method retrieves a map, which can be processed in a templates.
        Specified by:
        getOrders in interface OrderService
        Returns:
        map-representation of data
      • getOrder

        @Transactional
        public java.util.Map<java.lang.String,​java.lang.Object> getOrder​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method returns data as map.
        Specified by:
        getOrder in interface OrderService
        Parameters:
        orderId - identification for filter and return data
        Returns:
        data as map
      • getOrderCommerceItems

        @Transactional
        public java.util.List<CommerceItem> getOrderCommerceItems​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method returns data as list.
        Specified by:
        getOrderCommerceItems in interface OrderService
        Parameters:
        orderId - identification for database entity which related entities list be returned
        Returns:
        database entities as list
      • changeOrderStatus

        public java.util.List<OrderTimeLineBean> changeOrderStatus​(java.lang.String orderId,
                                                                   java.lang.String orderStatus)
        Description copied from interface: OrderService
        This method updates database entity.
        Specified by:
        changeOrderStatus in interface OrderService
        Parameters:
        orderId - identification for database entity which will be updated
        orderStatus - field for database entity which will be updated
        Returns:
        bean as list
      • getOrderTimeLine

        public java.util.List<OrderTimeLineBean> getOrderTimeLine​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method returns beans as list.
        Specified by:
        getOrderTimeLine in interface OrderService
        Parameters:
        orderId - identification for database entity which related beans list be returned
        Returns:
        beans as list
      • isOrderBelongToVendor

        public boolean isOrderBelongToVendor​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method checks is database entity belong to other database entity.
        Specified by:
        isOrderBelongToVendor in interface OrderService
        Parameters:
        orderId - identification for database entity which will be checked
        Returns:
        value as boolean
      • isOrderBelongToBuyer

        public boolean isOrderBelongToBuyer​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method checks is database entity belong to other database entity.
        Specified by:
        isOrderBelongToBuyer in interface OrderService
        Parameters:
        orderId - identification for database entity which will be checked
        Returns:
        value as boolean
      • isOrderShow

        public boolean isOrderShow​(java.lang.String orderId,
                                   java.lang.String orderStatus)
        Description copied from interface: OrderService
        This method checks is database entity field had some value.
        Specified by:
        isOrderShow in interface OrderService
        Parameters:
        orderId - identification for database entity which will be find
        orderStatus - field for database entity which will be checked
        Returns:
        value as boolean
      • isOrderNew

        public boolean isOrderNew​(java.lang.String orderStatus)
        Description copied from interface: OrderService
        This method checks is database entity field had some value.
        Specified by:
        isOrderNew in interface OrderService
        Parameters:
        orderStatus - field for database entity which will be checked
        Returns:
        value as boolean
      • isOrderConfirmed

        public boolean isOrderConfirmed​(java.lang.String orderStatus)
        Description copied from interface: OrderService
        This method checks is database entity field had some value.
        Specified by:
        isOrderConfirmed in interface OrderService
        Parameters:
        orderStatus - field for database entity which will be checked
        Returns:
        value as boolean
      • isOrderCanceled

        public boolean isOrderCanceled​(java.lang.String orderStatus)
        Description copied from interface: OrderService
        This method checks is database entity field had some value.
        Specified by:
        isOrderCanceled in interface OrderService
        Parameters:
        orderStatus - field for database entity which will be checked
        Returns:
        value as boolean
      • isOrderDenied

        public boolean isOrderDenied​(java.lang.String orderStatus)
        Description copied from interface: OrderService
        This method checks is database entity field had some value.
        Specified by:
        isOrderDenied in interface OrderService
        Parameters:
        orderStatus - field for database entity which will be checked
        Returns:
        value as boolean
      • isOrderCompleted

        public boolean isOrderCompleted​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method checks is database entity field had some value.
        Specified by:
        isOrderCompleted in interface OrderService
        Parameters:
        orderId - identification for database entity which will be checked
        Returns:
        value as boolean
      • isOrderPerformed

        public boolean isOrderPerformed​(java.lang.String orderStatus)
        Description copied from interface: OrderService
        This method checks is database entity field had some value.
        Specified by:
        isOrderPerformed in interface OrderService
        Parameters:
        orderStatus - field for database entity which will be checked
        Returns:
        value as boolean
      • getLastOrderTimelineBean

        public OrderTimeLineBean getLastOrderTimelineBean​(java.lang.String orderId)
        Description copied from interface: OrderService
        This method returns bean.
        Specified by:
        getLastOrderTimelineBean in interface OrderService
        Parameters:
        orderId - identification for database entity which found last bean and returned
        Returns:
        bean