/**
   * Updates the specified order.
   *
   * @param order the specified order
   * @throws ServiceException service exception
   */
  @Transactional
  public void updateOrder(final JSONObject order) throws ServiceException {
    try {
      final String orderId = order.optString(Keys.OBJECT_ID);

      orderRepository.update(orderId, order);
    } catch (final RepositoryException e) {
      LOGGER.log(Level.ERROR, "Updates order failed", e);

      throw new ServiceException(e);
    }
  }