net.sf.emarket.order.repository
Class JdbcOrderDaoImpl

java.lang.Object
  extended by net.sf.emarket.order.repository.JdbcOrderDaoImpl
All Implemented Interfaces:
IOrderDao

@Repository
public class JdbcOrderDaoImpl
extends java.lang.Object
implements IOrderDao


Constructor Summary
JdbcOrderDaoImpl()
           
 
Method Summary
 Order addOrder(Order order)
           
 void createTemplate(javax.sql.DataSource jdbcDatasource)
           
 long generateOrderId()
           
 Order getOrderById(java.lang.String orderId)
           
 java.util.List<Order> getOrdersForAcctIdWithStatus(java.lang.String acctId, java.lang.String orderStatus)
           
 java.util.List<Order> getOrdersForAcctIdWithStatusAndSymbol(java.lang.String acctId, java.lang.String orderStatus, java.lang.String symbol)
           
 Order updateOrder(Order order)
          Updates an order based on "orderId", which maps to "EM_ORDER_ID" column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcOrderDaoImpl

public JdbcOrderDaoImpl()
Method Detail

createTemplate

public void createTemplate(@Qualifier(value="jdbcDataSource")
                           javax.sql.DataSource jdbcDatasource)

addOrder

public Order addOrder(Order order)
Specified by:
addOrder in interface IOrderDao

updateOrder

public Order updateOrder(Order order)
Updates an order based on "orderId", which maps to "EM_ORDER_ID" column. Only some columns can be updated. updated fields are,

Specified by:
updateOrder in interface IOrderDao
Parameters:
order -
Returns:

getOrderById

public Order getOrderById(java.lang.String orderId)
Specified by:
getOrderById in interface IOrderDao

getOrdersForAcctIdWithStatus

public java.util.List<Order> getOrdersForAcctIdWithStatus(java.lang.String acctId,
                                                          java.lang.String orderStatus)
Specified by:
getOrdersForAcctIdWithStatus in interface IOrderDao

getOrdersForAcctIdWithStatusAndSymbol

public java.util.List<Order> getOrdersForAcctIdWithStatusAndSymbol(java.lang.String acctId,
                                                                   java.lang.String orderStatus,
                                                                   java.lang.String symbol)
Specified by:
getOrdersForAcctIdWithStatusAndSymbol in interface IOrderDao

generateOrderId

public long generateOrderId()
Specified by:
generateOrderId in interface IOrderDao


Copyright © 2009. All Rights Reserved.