Class OrderService

java.lang.Object
org.mybatis.jpetstore.service.OrderService

@Service public class OrderService extends Object
The Class OrderService.
Author:
Eduardo Macarron
  • Constructor Details

  • Method Details

    • insertOrder

      @Transactional public void insertOrder(Order order)
      Insert order.
      Parameters:
      order - the order
    • getOrder

      @Transactional public Order getOrder(int orderId)
      Gets the order.
      Parameters:
      orderId - the order id
      Returns:
      the order
    • getOrdersByUsername

      public List<Order> getOrdersByUsername(String username)
      Gets the orders by username.
      Parameters:
      username - the username
      Returns:
      the orders by username
    • getNextId

      public int getNextId(String name)
      Gets the next id.
      Parameters:
      name - the name
      Returns:
      the next id