|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.beasys.commerce.foundation.BelongingImpl
com.beasys.commerce.ebusiness.shoppingcart.ShoppingCartImpl
@Deprecated public class ShoppingCartImpl
The ShoppingCart is used to contain a list of ShoppingCartLines. The ShoppingCart also has a Customer associated with it so that it can calculate Customer dependent prices if necessary.
ShoppingCart,
ShoppingCartHome,
Serialized Form| Field Summary | |
|---|---|
Money |
shipping
Deprecated Containment: By Value Multiplicity: 1:1 |
Collection |
shoppingCartLines
Deprecated The shopping cart contains a list of ShoppingCart lines Containment: By Value Multiplicity: 0:N Interface: java.util.Collection |
Money |
subtotal
Deprecated |
Money |
total
Deprecated |
| Fields inherited from class com.beasys.commerce.foundation.BelongingImpl |
|---|
__classIdentifier, __containingBelonging, __containingEntity, __mapKey, __sequenceNumber, _isDirty |
| Constructor Summary | |
|---|---|
ShoppingCartImpl()
Deprecated |
|
| Method Summary | |
|---|---|
void |
addItemsFromShoppingCart(ShoppingCart items)
Deprecated Add the ShoppingCartLines from the specified ShoppingCart to this ShoppingCart. |
ShoppingCartLine |
addProductItem(ProductItem item,
double quantity)
Deprecated Add an Item to the ShoppingCart. |
ShoppingCartLine |
addProductItem(ProductItem item,
double quantity,
Money unitPrice)
Deprecated Add an Item to the ShoppingCart. |
boolean |
addShoppingCartLine(ShoppingCartLine element)
Deprecated Ensures that this collection contains the specified element (optional operation). |
boolean |
addShoppingCartLineCollection(Collection collection)
Deprecated Adds all of the elements in the specified collection to this collection (optional operation). |
void |
clearShoppingCartLineCollection()
Deprecated Removes all of the elements from this collection (optional operation). |
int |
compareTo(Object o)
Deprecated Compare this belonging to another |
boolean |
containsShoppingCartLine(ShoppingCartLine element)
Deprecated Returns true if this collection contains the specified element. |
boolean |
containsShoppingCartLineCollection(Collection collection)
Deprecated Returns true if this collection contains all of the elements in the specified collection. |
ShoppingCartLine |
createShoppingCartLine()
Deprecated Used internally by the ShoppingCart to create ShoppingCartLines. |
boolean |
equalsShoppingCartLineCollection(Object object)
Deprecated Compares the specified object with this collection for equality. |
ShoppingCartLine |
findShoppingCartLine(String productIdentifier)
Deprecated Find the ShoppingCartLine associated with the specified Item. |
double |
getCategoryQuantity(String categoryId)
Deprecated Count the number of product items that belong to a category Note This method creates/calls the CatalogManager and the ProductItemManager to resolve which items belong to what category! This means the performance of this method cannot be great, and the method should be used parcimoniously. |
double |
getNumberOfUnits()
Deprecated Count the total quantity of items by summing the quantity on each line. |
ArrayList |
getOrderDiscountPresentations()
Deprecated Gets the order level discount list |
Money |
getShipping()
Deprecated Get the value of shipping |
ArrayList |
getShippingDiscountPresentations()
Deprecated Gets the shipping discount list |
Collection |
getShoppingCartLineCollection()
Deprecated Returns a deep copy of the entire collection |
Money |
getSubtotal()
Deprecated Get the value of subtotal |
Money |
getTotal()
Deprecated Get the value of total |
Money |
getTotal(int totalType)
Deprecated Gets the shopping cart total for the given total type |
Money |
getTotalPrice()
Deprecated Gets the overal shopping cart total |
String |
interfaceName()
Deprecated interfaceName() returns the unqualified name of the interface from the UML model |
boolean |
isEmpty()
Deprecated Returns true if the shopping cart has no items |
boolean |
isShoppingCartLineCollectionEmpty()
Deprecated Returns true if this collection contains no elements. |
void |
removeAllProductItems()
Deprecated Removes all ShoppingCartLines. |
ProductItem |
removeProductItem(String productIdentifier)
Deprecated Remove the ShoppingCartLine associated with the Item specified. |
boolean |
removeShoppingCartLine(ShoppingCartLine element)
Deprecated Removes a single instance of the specified element from this collection, if it is present (optional operation). |
boolean |
removeShoppingCartLineCollection(Collection collection)
Deprecated Removes all this collection's elements that are also contained in the specified collection (optional operation). |
boolean |
retainShoppingCartLineCollection(Collection collection)
Deprecated Retains only the elements in this collection that are contained in the specified collection (optional operation). |
void |
setByValue(Belonging value)
Deprecated It is possible to call set-by-value with a superclass. |
void |
setOrderDiscountPresentations(ArrayList orderDiscountPresentations)
Deprecated Sets the order level discount list |
void |
setProductItemQuantity(ProductItem item,
double quantity)
Deprecated Sets the Quantity of the ShoppingCartLine associated with this Item. |
void |
setShipping(Money shipping)
Deprecated Set the value of shipping |
void |
setShippingDiscountPresentations(ArrayList shippingDiscountPresentations)
Deprecated Sets the shipping discount list |
void |
setShoppingCartLineCollection(Collection collection)
Deprecated Sets the entire collection |
void |
setSubtotal(Money subtotal)
Deprecated Set the value of subtotal |
void |
setTotal(Money total)
Deprecated Set the value of total |
int |
shoppingCartLineCollectionHashCode()
Deprecated Returns the hash code value for this collection. |
Iterator |
shoppingCartLineCollectionIterator()
Deprecated Returns an iterator over the elements in this collection. |
int |
shoppingCartLineCollectionSize()
Deprecated Returns the number of elements in this collection. |
Belonging |
value()
Deprecated value() is a more typesafe implementation of clone() |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.beasys.commerce.foundation.Belonging |
|---|
clone, equals |
| Field Detail |
|---|
public Money shipping
public Money subtotal
public Money total
public Collection shoppingCartLines
| Constructor Detail |
|---|
public ShoppingCartImpl()
| Method Detail |
|---|
public Money getTotal()
getTotal in interface ShoppingCartpublic void setTotal(Money total)
setTotal in interface ShoppingCarttotal - total to be addedpublic Money getSubtotal()
getSubtotal in interface ShoppingCartpublic void setSubtotal(Money subtotal)
setSubtotal in interface ShoppingCartsubtotal - subtotal to be addedpublic Money getShipping()
getShipping in interface ShoppingCartpublic void setShipping(Money shipping)
setShipping in interface ShoppingCartshipping - shipping to be addedpublic Collection getShoppingCartLineCollection()
getShoppingCartLineCollection in interface ShoppingCartpublic void setShoppingCartLineCollection(Collection collection)
setShoppingCartLineCollection in interface ShoppingCartpublic boolean addShoppingCartLine(ShoppingCartLine element)
addShoppingCartLine in interface ShoppingCartpublic boolean addShoppingCartLineCollection(Collection collection)
addShoppingCartLineCollection in interface ShoppingCartpublic void clearShoppingCartLineCollection()
clearShoppingCartLineCollection in interface ShoppingCartpublic boolean containsShoppingCartLine(ShoppingCartLine element)
containsShoppingCartLine in interface ShoppingCartpublic boolean containsShoppingCartLineCollection(Collection collection)
containsShoppingCartLineCollection in interface ShoppingCartpublic boolean equalsShoppingCartLineCollection(Object object)
equalsShoppingCartLineCollection in interface ShoppingCartpublic int shoppingCartLineCollectionHashCode()
shoppingCartLineCollectionHashCode in interface ShoppingCartpublic boolean isShoppingCartLineCollectionEmpty()
isShoppingCartLineCollectionEmpty in interface ShoppingCartpublic Iterator shoppingCartLineCollectionIterator()
shoppingCartLineCollectionIterator in interface ShoppingCartpublic boolean removeShoppingCartLine(ShoppingCartLine element)
removeShoppingCartLine in interface ShoppingCartpublic boolean removeShoppingCartLineCollection(Collection collection)
removeShoppingCartLineCollection in interface ShoppingCartpublic boolean retainShoppingCartLineCollection(Collection collection)
retainShoppingCartLineCollection in interface ShoppingCartpublic int shoppingCartLineCollectionSize()
shoppingCartLineCollectionSize in interface ShoppingCartpublic Belonging value()
value in interface Belongingpublic String interfaceName()
interfaceName in interface Belongingpublic void setByValue(Belonging value)
It is also possible to call set-by-value with a subclass. In this case, the specialized fields in the subclass will be ignored. The overridden fields in the subclass will be populated.
setByValue in interface BelongingsetByValue in class BelongingImplvalue - The Belonging to use for initialization.public int compareTo(Object o)
compareTo in interface ComparablecompareTo in class BelongingImplo - target object for comparision
public void addItemsFromShoppingCart(ShoppingCart items)
throws InvalidArgumentException
addItemsFromShoppingCart in interface ShoppingCartInvalidArgumentException
public void setProductItemQuantity(ProductItem item,
double quantity)
throws InvalidArgumentException
setProductItemQuantity in interface ShoppingCartInvalidArgumentException
public ProductItem removeProductItem(String productIdentifier)
throws InvalidArgumentException
removeProductItem in interface ShoppingCartproductIdentifier, - (See productItem.getKey( ).getIdentifier( ) )
InvalidArgumentExceptionpublic void removeAllProductItems()
removeAllProductItems in interface ShoppingCart
public ShoppingCartLine findShoppingCartLine(String productIdentifier)
throws ItemNotInShoppingCartException,
InvalidArgumentException
findShoppingCartLine in interface ShoppingCartproductIdentifier, - (See productItem.getKey( ).getIdentifier( ) )
ItemNotInShoppingCartException
InvalidArgumentExceptionpublic double getNumberOfUnits()
getNumberOfUnits in interface ShoppingCart
public double getCategoryQuantity(String categoryId)
throws RemoteException
getCategoryQuantity in interface ShoppingCartcategoryId, - a string that identifies the category
RemoteExceptionpublic ShoppingCartLine createShoppingCartLine()
createShoppingCartLine in interface ShoppingCart
public ShoppingCartLine addProductItem(ProductItem item,
double quantity)
throws InvalidArgumentException
addProductItem in interface ShoppingCartInvalidArgumentException
public ShoppingCartLine addProductItem(ProductItem item,
double quantity,
Money unitPrice)
throws InvalidArgumentException
addProductItem in interface ShoppingCartInvalidArgumentExceptionpublic boolean isEmpty()
isEmpty in interface ShoppingCart
public Money getTotal(int totalType)
throws InvalidArgumentException
getTotal in interface ShoppingCarttotal - type
InvalidArgumentExceptionpublic Money getTotalPrice()
getTotalPrice in interface ShoppingCartpublic ArrayList getShippingDiscountPresentations()
getShippingDiscountPresentations in interface ShoppingCartpublic void setShippingDiscountPresentations(ArrayList shippingDiscountPresentations)
setShippingDiscountPresentations in interface ShoppingCartpublic ArrayList getOrderDiscountPresentations()
getOrderDiscountPresentations in interface ShoppingCartpublic void setOrderDiscountPresentations(ArrayList orderDiscountPresentations)
setOrderDiscountPresentations in interface ShoppingCart
|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||