com.silverpeas.gallery.dao
Class OrderDAO

java.lang.Object
  extended by com.silverpeas.gallery.dao.OrderDAO

public class OrderDAO
extends Object


Constructor Summary
OrderDAO()
           
 
Method Summary
static String createOrder(Connection con, Collection<String> basket, String userId, String instanceId)
          Persists a new order.
static void deleteOrder(Connection con, Order order)
          Deletes an order and its details.
static List<Order> findByCriteria(Connection con, MediaOrderCriteria criteria)
          Finds orders from the specified criteria.
static List<OrderRow> getAllOrderDetails(Connection con, String orderId)
          Gets all medias of an order.
static Order getByCriteria(Connection con, MediaOrderCriteria criteria)
          Gets a unique result.
static void updateOrder(Connection con, Order order)
          Updates an order and its details.
static void updateOrderRow(Connection con, OrderRow row)
          Updates a row of an order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderDAO

public OrderDAO()
Method Detail

createOrder

public static String createOrder(Connection con,
                                 Collection<String> basket,
                                 String userId,
                                 String instanceId)
                          throws SQLException,
                                 com.stratelia.webactiv.util.exception.UtilException
Persists a new order.

Parameters:
con -
basket -
userId -
instanceId -
Returns:
the identifier of the new order.
Throws:
SQLException
com.stratelia.webactiv.util.exception.UtilException

updateOrder

public static void updateOrder(Connection con,
                               Order order)
                        throws SQLException
Updates an order and its details.

Parameters:
con -
order -
Throws:
SQLException

deleteOrder

public static void deleteOrder(Connection con,
                               Order order)
                        throws SQLException
Deletes an order and its details.

Parameters:
con -
order -
Throws:
SQLException

getAllOrderDetails

public static List<OrderRow> getAllOrderDetails(Connection con,
                                                String orderId)
                                         throws SQLException
Gets all medias of an order.

Parameters:
con -
orderId -
Returns:
Throws:
SQLException

updateOrderRow

public static void updateOrderRow(Connection con,
                                  OrderRow row)
                           throws SQLException
Updates a row of an order.

Parameters:
con -
row -
Throws:
SQLException

getByCriteria

public static Order getByCriteria(Connection con,
                                  MediaOrderCriteria criteria)
                           throws SQLException
Gets a unique result.

Parameters:
con -
criteria -
Returns:
Throws:
SQLException

findByCriteria

public static List<Order> findByCriteria(Connection con,
                                         MediaOrderCriteria criteria)
                                  throws SQLException
Finds orders from the specified criteria.

Parameters:
con -
criteria -
Returns:
a list of orders, empty if no order found.
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.