org.apache.jdo.tck.pc.shoppingcart
Class Cart
java.lang.Object
org.apache.jdo.tck.pc.shoppingcart.Cart
- All Implemented Interfaces:
- java.io.Serializable
- public class Cart
- extends java.lang.Object
- implements java.io.Serializable
This class represents an online shopping cart. It has a list of entries of
type CartEntry.
- See Also:
- Serialized Form
Nested Class Summary |
static class |
Cart.Oid
|
Field Summary |
protected java.lang.String |
customerId
The identity of the customer whose shopping cart this is. |
protected java.util.Set |
entries
The list of entries in this cart |
protected long |
id
Identity field for use with application identity |
protected static long |
nextId
|
Constructor Summary |
protected |
Cart()
For JDO compliance only; not for public consumption. |
protected |
Cart(long id,
java.lang.String customerId)
|
|
Cart(java.lang.String customerId)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
nextId
protected static long nextId
id
protected long id
- Identity field for use with application identity
customerId
protected java.lang.String customerId
- The identity of the customer whose shopping cart this is.
entries
protected java.util.Set entries
- The list of entries in this cart
Cart
protected Cart()
- For JDO compliance only; not for public consumption.
Cart
public Cart(java.lang.String customerId)
Cart
protected Cart(long id,
java.lang.String customerId)
nextId
public static long nextId()
getId
public long getId()
setId
protected void setId(long id)
newCartEntry
public CartEntry newCartEntry(Product product,
int quantity)
addCartEntry
public void addCartEntry(CartEntry ce)
getEntries
public java.util.Iterator getEntries()
getCustomerId
public java.lang.String getCustomerId()
setCustomerId
public void setCustomerId(java.lang.String customerId)
equals
public boolean equals(java.lang.Object that)
equals
public boolean equals(Cart that)
hashCode
public int hashCode()
Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.