org.apache.jdo.tck.pc.shoppingcart
Class CartEntry

java.lang.Object
  extended byorg.apache.jdo.tck.pc.shoppingcart.CartEntry
All Implemented Interfaces:
java.io.Serializable

public class CartEntry
extends java.lang.Object
implements java.io.Serializable

This class represents an entry in an online shopping cart that has a quantity of a product.

See Also:
Serialized Form

Nested Class Summary
static class CartEntry.Oid
           
 
Field Summary
protected  Cart cart
           
protected  long id
          Identity field for use with application identity
protected static long nextId
           
protected  Product product
           
protected  int quantity
           
 
Constructor Summary
protected CartEntry()
          No-arg constructor required by JDO; not for public consumption
  CartEntry(Cart cart, long id, Product product)
           
  CartEntry(Cart cart, long id, Product product, int quantity)
           
  CartEntry(Cart cart, Product product)
           
 
Method Summary
 boolean equals(CartEntry that)
           
 boolean equals(java.lang.Object that)
           
 Cart getCart()
           
 long getId()
           
 Product getProduct()
           
 int getQuantity()
           
 int hashCode()
           
static long nextId()
           
protected  void setCart(Cart cart)
           
protected  void setId(long id)
           
 void setProduct(Product product)
           
 void setQuantity(int quantity)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextId

protected static long nextId

id

protected long id
Identity field for use with application identity


cart

protected Cart cart

product

protected Product product

quantity

protected int quantity
Constructor Detail

CartEntry

protected CartEntry()
No-arg constructor required by JDO; not for public consumption


CartEntry

public CartEntry(Cart cart,
                 Product product)

CartEntry

public CartEntry(Cart cart,
                 long id,
                 Product product)

CartEntry

public CartEntry(Cart cart,
                 long id,
                 Product product,
                 int quantity)
Method Detail

nextId

public static long nextId()

getId

public long getId()

setId

protected void setId(long id)

getCart

public Cart getCart()

setCart

protected void setCart(Cart cart)

getProduct

public Product getProduct()

setProduct

public void setProduct(Product product)

getQuantity

public int getQuantity()

setQuantity

public void setQuantity(int quantity)

equals

public boolean equals(java.lang.Object that)

equals

public boolean equals(CartEntry that)

hashCode

public int hashCode()


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.