Package com.rosivanyshyn.service.impl

# Class OrderServiceImpl

java.lang.Object
com.rosivanyshyn.service.impl.OrderServiceImpl

All Implemented Interfaces:
  `OrderService`

public class OrderServiceImpl extends Object implements OrderService

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OrderServiceImpl(OrderDAO orderDAO, ResponseToOrderDAO responseToOrderDAO, DBManager dbManager)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Boolean`
  `createOrder(Order order)`
  Create new order
  `Boolean`
  `deleteOrder(Order order)`
  Delete order, response-to-order and all apartments submitted to response-to-order
  `ArrayList<Order>`
  `findFewOrders(int start, int total)`
  Find few orders by total count and from set start id
  `ArrayList<Order>`
  `findFewOrdersAndSort(String secondQueryPart, Object... fields)`
  Find few orders using second query part conditions and by fields for them
  `Order`
  `findOrderByField(String field, Object value)`
  Find order by field
  `int`
  `getRowsNumber()`
  Get last statement rows count
  `Boolean`
  `updateOrder(Order order)`
  Update order

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### OrderServiceImpl

    public OrderServiceImpl(OrderDAO orderDAO, ResponseToOrderDAO responseToOrderDAO, DBManager dbManager)

- ## Method Details

  - ### createOrder

    public Boolean createOrder(Order order)
    Description copied from interface: `OrderService`
    Create new order
    Specified by:
      `createOrder` in interface `OrderService`
    Parameters:
      `order` - the order to be added
    Returns:
      operation result

  - ### findOrderByField

    public Order findOrderByField(String field, Object value)
    Description copied from interface: `OrderService`
    Find order by field
    Specified by:
      `findOrderByField` in interface `OrderService`
    Parameters:
      `field` - field name
      `value` - unique field value
    Returns:
      found order

  - ### findFewOrders

    public ArrayList<Order> findFewOrders(int start, int total)
    Description copied from interface: `OrderService`
    Find few orders by total count and from set start id
    Specified by:
      `findFewOrders` in interface `OrderService`
    Parameters:
      `start` - countdown start id
      `total` - total rows count
    Returns:
      found orders

  - ### findFewOrdersAndSort

    public ArrayList<Order> findFewOrdersAndSort(String secondQueryPart, Object... fields)
    Description copied from interface: `OrderService`
    Find few orders using second query part conditions and by fields for them
    Specified by:
      `findFewOrdersAndSort` in interface `OrderService`
    Parameters:
      `secondQueryPart` - QueryBuilder result string
      `fields` - fields to insert in second query part statement
    Returns:
      found orders

  - ### updateOrder

    public Boolean updateOrder(Order order)
    Description copied from interface: `OrderService`
    Update order
    Specified by:
      `updateOrder` in interface `OrderService`
    Parameters:
      `order` - order to update
    Returns:
      operation result

  - ### deleteOrder

    public Boolean deleteOrder(Order order)
    Delete order, response-to-order and all apartments submitted to response-to-order
    Specified by:
      `deleteOrder` in interface `OrderService`
    Parameters:
      `order` - order to delete
    Returns:
      Boolean result of operation

  - ### getRowsNumber

    public int getRowsNumber()
    Description copied from interface: `OrderService`
    Get last statement rows count
    Specified by:
      `getRowsNumber` in interface `OrderService`
    Returns:
      last statement rows count