com.sun.j2ee.blueprints.customer.order.ejb
Class OrderDAO
java.lang.Object
|
+--com.sun.j2ee.blueprints.customer.order.ejb.OrderDAO
- Direct Known Subclasses:
- OrderDAOCS, OrderDAOOracle, OrderDAOSybase
- public abstract class OrderDAO
- extends java.lang.Object
This class encapsulates all the SQL calls made by
the Order EJB.This class provides two abstract methods,
namely abstract void create( Connection con) and
abstract void store(Connection con).The implementation of
these methods is provided by the subclasses representing
a particular database vendor.This was done primarily
to accomodate the differences between the SQL supported by
different vendors. So for each different DB there would be
a OrderDAOXXX.java class that encapsulates the DB specific
code.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
orderId
protected int orderId
lineItems
protected java.util.Collection lineItems
shipToAddr
protected Address shipToAddr
billToAddr
protected Address billToAddr
shipToFirstName
protected java.lang.String shipToFirstName
shipToLastName
protected java.lang.String shipToLastName
billToFirstName
protected java.lang.String billToFirstName
billToLastName
protected java.lang.String billToLastName
chargeCard
protected CreditCard chargeCard
carrier
protected java.lang.String carrier
userId
protected java.lang.String userId
orderDate
protected Calendar orderDate
status
protected java.lang.String status
totalPrice
protected double totalPrice
dbConnection
protected java.sql.Connection dbConnection
OrderDAO
public OrderDAO()
throws OrderDAOException
create
public abstract void create()
throws OrderDAOException
store
public abstract void store()
throws OrderDAOException
getOrderId
public int getOrderId()
getLineItems
public java.util.Collection getLineItems()
getShipToAddr
public Address getShipToAddr()
getBillToAddr
public Address getBillToAddr()
getBillToFirstName
public java.lang.String getBillToFirstName()
getBillToLastName
public java.lang.String getBillToLastName()
getShipToFirstName
public java.lang.String getShipToFirstName()
getShipToLastName
public java.lang.String getShipToLastName()
getChargeCard
public CreditCard getChargeCard()
getCarrier
public java.lang.String getCarrier()
getUserId
public java.lang.String getUserId()
getOrderDate
public Calendar getOrderDate()
getStatus
public java.lang.String getStatus()
getTotalPrice
public double getTotalPrice()
setOrderId
public void setOrderId(int orderId)
setLineItems
public void setLineItems(java.util.Collection lineItems)
setShipToAddr
public void setShipToAddr(Address shipToAddr)
setBillToAddr
public void setBillToAddr(Address billToAddr)
setShipToFirstName
public void setShipToFirstName(java.lang.String shipToFirstName)
setShipToLastName
public void setShipToLastName(java.lang.String shipToLastName)
setBillToFirstName
public void setBillToFirstName(java.lang.String billToFirstName)
setBillToLastName
public void setBillToLastName(java.lang.String billToLastName)
setChargeCard
public void setChargeCard(CreditCard chargeCard)
setCarrier
public void setCarrier(java.lang.String carrier)
setUserId
public void setUserId(java.lang.String userId)
setOrderDate
public void setOrderDate(Calendar orderDate)
setStatus
public void setStatus(java.lang.String status)
setTotalPrice
public void setTotalPrice(double totalPrice)
load
public void load()
throws OrderDAOException
remove
public void remove()
throws OrderDAOException
findByPrimaryKey
public java.lang.Integer findByPrimaryKey()
throws OrderDAOException
findUserOrders
public java.util.Collection findUserOrders()
throws OrderDAOException
isValidData
protected boolean isValidData()
getDBConnection
protected void getDBConnection()
throws OrderDAOException
closeConnection
protected void closeConnection()
throws OrderDAOException
Copyright © 2000 Sun Microsystems Inc. All Rights Reserved.