com.beasys.commerce.ebusiness.shoppingcart
Class ShoppingCartImpl

java.lang.Object
  extended by com.beasys.commerce.foundation.BelongingImpl
      extended by com.beasys.commerce.ebusiness.shoppingcart.ShoppingCartImpl
All Implemented Interfaces
ShoppingCart, Belonging, BusinessSmartComponent, RelationalReference, Serializable, Cloneable, Comparable

Deprecated

@Deprecated
public class ShoppingCartImpl
extends BelongingImpl
implements ShoppingCart

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.

See Also
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 com.beasys.commerce.foundation.BelongingImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clone, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, equals, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getPersistenceHelperPlugin, hashCode, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey, toString
 
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

shipping

public Money shipping
Deprecated 


subtotal

public Money subtotal
Deprecated 

total

public Money total
Deprecated 

shoppingCartLines

public Collection shoppingCartLines
Deprecated 
The shopping cart contains a list of ShoppingCart lines

Constructor Detail

ShoppingCartImpl

public ShoppingCartImpl()
Deprecated 
Method Detail

getTotal

public Money getTotal()
Deprecated 
Get the value of total

Specified by:
getTotal in interface ShoppingCart
Returns
total.

setTotal

public void setTotal(Money total)
Deprecated 
Set the value of total

Specified by:
setTotal in interface ShoppingCart
Parameters
total - total to be added

getSubtotal

public Money getSubtotal()
Deprecated 
Get the value of subtotal

Specified by:
getSubtotal in interface ShoppingCart
Returns
subtotal.

setSubtotal

public void setSubtotal(Money subtotal)
Deprecated 
Set the value of subtotal

Specified by:
setSubtotal in interface ShoppingCart
Parameters
subtotal - subtotal to be added

getShipping

public Money getShipping()
Deprecated 
Get the value of shipping

Specified by:
getShipping in interface ShoppingCart
Returns
shipping.

setShipping

public void setShipping(Money shipping)
Deprecated 
Set the value of shipping

Specified by:
setShipping in interface ShoppingCart
Parameters
shipping - shipping to be added

getShoppingCartLineCollection

public Collection getShoppingCartLineCollection()
Deprecated 
Returns a deep copy of the entire collection

Specified by:
getShoppingCartLineCollection in interface ShoppingCart

setShoppingCartLineCollection

public void setShoppingCartLineCollection(Collection collection)
Deprecated 
Sets the entire collection

Specified by:
setShoppingCartLineCollection in interface ShoppingCart

addShoppingCartLine

public boolean addShoppingCartLine(ShoppingCartLine element)
Deprecated 
Ensures that this collection contains the specified element (optional operation).

Specified by:
addShoppingCartLine in interface ShoppingCart

addShoppingCartLineCollection

public boolean addShoppingCartLineCollection(Collection collection)
Deprecated 
Adds all of the elements in the specified collection to this collection (optional operation).

Specified by:
addShoppingCartLineCollection in interface ShoppingCart

clearShoppingCartLineCollection

public void clearShoppingCartLineCollection()
Deprecated 
Removes all of the elements from this collection (optional operation).

Specified by:
clearShoppingCartLineCollection in interface ShoppingCart

containsShoppingCartLine

public boolean containsShoppingCartLine(ShoppingCartLine element)
Deprecated 
Returns true if this collection contains the specified element.

Specified by:
containsShoppingCartLine in interface ShoppingCart

containsShoppingCartLineCollection

public boolean containsShoppingCartLineCollection(Collection collection)
Deprecated 
Returns true if this collection contains all of the elements in the specified collection.

Specified by:
containsShoppingCartLineCollection in interface ShoppingCart

equalsShoppingCartLineCollection

public boolean equalsShoppingCartLineCollection(Object object)
Deprecated 
Compares the specified object with this collection for equality.

Specified by:
equalsShoppingCartLineCollection in interface ShoppingCart

shoppingCartLineCollectionHashCode

public int shoppingCartLineCollectionHashCode()
Deprecated 
Returns the hash code value for this collection.

Specified by:
shoppingCartLineCollectionHashCode in interface ShoppingCart

isShoppingCartLineCollectionEmpty

public boolean isShoppingCartLineCollectionEmpty()
Deprecated 
Returns true if this collection contains no elements.

Specified by:
isShoppingCartLineCollectionEmpty in interface ShoppingCart

shoppingCartLineCollectionIterator

public Iterator shoppingCartLineCollectionIterator()
Deprecated 
Returns an iterator over the elements in this collection.

Specified by:
shoppingCartLineCollectionIterator in interface ShoppingCart

removeShoppingCartLine

public boolean removeShoppingCartLine(ShoppingCartLine element)
Deprecated 
Removes a single instance of the specified element from this collection, if it is present (optional operation).

Specified by:
removeShoppingCartLine in interface ShoppingCart

removeShoppingCartLineCollection

public boolean removeShoppingCartLineCollection(Collection collection)
Deprecated 
Removes all this collection's elements that are also contained in the specified collection (optional operation).

Specified by:
removeShoppingCartLineCollection in interface ShoppingCart

retainShoppingCartLineCollection

public boolean retainShoppingCartLineCollection(Collection collection)
Deprecated 
Retains only the elements in this collection that are contained in the specified collection (optional operation).

Specified by:
retainShoppingCartLineCollection in interface ShoppingCart

shoppingCartLineCollectionSize

public int shoppingCartLineCollectionSize()
Deprecated 
Returns the number of elements in this collection.

Specified by:
shoppingCartLineCollectionSize in interface ShoppingCart

value

public Belonging value()
Deprecated 
value() is a more typesafe implementation of clone()

Specified by:
value in interface Belonging
Returns
a clone of this instance

interfaceName

public String interfaceName()
Deprecated 
interfaceName() returns the unqualified name of the interface from the UML model

Specified by:
interfaceName in interface Belonging
Returns
the unqualified name of the belonging interface from the UML model

setByValue

public void setByValue(Belonging value)
Deprecated 
It is possible to call set-by-value with a superclass. If that is the case, only the fields in the superclass will be set in this instance. The remaining fields get the default values.

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.

Specified by:
setByValue in interface Belonging
Overrides:
setByValue in class BelongingImpl
Parameters
value - The Belonging to use for initialization.

compareTo

public int compareTo(Object o)
Deprecated 
Compare this belonging to another

Specified by:
compareTo in interface Comparable
Specified by:
compareTo in class BelongingImpl
Parameters
o - target object for comparision
Returns
0 objects are equal

addItemsFromShoppingCart

public void addItemsFromShoppingCart(ShoppingCart items)
                              throws InvalidArgumentException
Deprecated 
Add the ShoppingCartLines from the specified ShoppingCart to this ShoppingCart.

Specified by:
addItemsFromShoppingCart in interface ShoppingCart
Throws
InvalidArgumentException

setProductItemQuantity

public void setProductItemQuantity(ProductItem item,
                                   double quantity)
                            throws InvalidArgumentException
Deprecated 
Sets the Quantity of the ShoppingCartLine associated with this Item. A new ShoppingCartLine is created if the Item is not present. This differs from addItem in that this method explicitly sets the absolute Quantity of a ShoppingCartLine rather than incrementing the existing value .

Specified by:
setProductItemQuantity in interface ShoppingCart
Throws
InvalidArgumentException

removeProductItem

public ProductItem removeProductItem(String productIdentifier)
                              throws InvalidArgumentException
Deprecated 
Remove the ShoppingCartLine associated with the Item specified.

Specified by:
removeProductItem in interface ShoppingCart
Parameters
productIdentifier, - (See productItem.getKey( ).getIdentifier( ) )
Throws
InvalidArgumentException

removeAllProductItems

public void removeAllProductItems()
Deprecated 
Removes all ShoppingCartLines. This resets the entire ShoppingCart.

Specified by:
removeAllProductItems in interface ShoppingCart

findShoppingCartLine

public ShoppingCartLine findShoppingCartLine(String productIdentifier)
                                      throws ItemNotInShoppingCartException,
                                             InvalidArgumentException
Deprecated 
Find the ShoppingCartLine associated with the specified Item. Throws an ItemNotInShoppingCartException if the Item cannot be found.

Specified by:
findShoppingCartLine in interface ShoppingCart
Parameters
productIdentifier, - (See productItem.getKey( ).getIdentifier( ) )
Throws
ItemNotInShoppingCartException
InvalidArgumentException

getNumberOfUnits

public double getNumberOfUnits()
Deprecated 
Count the total quantity of items by summing the quantity on each line.

Specified by:
getNumberOfUnits in interface ShoppingCart

getCategoryQuantity

public double getCategoryQuantity(String categoryId)
                           throws RemoteException
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.

Specified by:
getCategoryQuantity in interface ShoppingCart
Parameters
categoryId, - a string that identifies the category
Returns
the count over all the items which belong to that category
Throws
RemoteException

createShoppingCartLine

public ShoppingCartLine createShoppingCartLine()
Deprecated 
Used internally by the ShoppingCart to create ShoppingCartLines. If ShoppingCart is used to manage a list of lines that extend ShoppingCartLine, this method should be overridden to return an instance of the appropiate sub class.

Specified by:
createShoppingCartLine in interface ShoppingCart

addProductItem

public ShoppingCartLine addProductItem(ProductItem item,
                                       double quantity)
                                throws InvalidArgumentException
Deprecated 
Add an Item to the ShoppingCart. If the Item is already in the ShoppingCart, increase its quantity.

Specified by:
addProductItem in interface ShoppingCart
Throws
InvalidArgumentException

addProductItem

public ShoppingCartLine addProductItem(ProductItem item,
                                       double quantity,
                                       Money unitPrice)
                                throws InvalidArgumentException
Deprecated 
Add an Item to the ShoppingCart. If the Item is already in the ShoppingCart, increase its quantity.

Specified by:
addProductItem in interface ShoppingCart
Throws
InvalidArgumentException

isEmpty

public boolean isEmpty()
Deprecated 
Returns true if the shopping cart has no items

Specified by:
isEmpty in interface ShoppingCart

getTotal

public Money getTotal(int totalType)
               throws InvalidArgumentException
Deprecated 
Gets the shopping cart total for the given total type

Specified by:
getTotal in interface ShoppingCart
Parameters
total - type
Throws
InvalidArgumentException

getTotalPrice

public Money getTotalPrice()
Deprecated 
Gets the overal shopping cart total

Specified by:
getTotalPrice in interface ShoppingCart

getShippingDiscountPresentations

public ArrayList getShippingDiscountPresentations()
Deprecated 
Gets the shipping discount list

Specified by:
getShippingDiscountPresentations in interface ShoppingCart

setShippingDiscountPresentations

public void setShippingDiscountPresentations(ArrayList shippingDiscountPresentations)
Deprecated 
Sets the shipping discount list

Specified by:
setShippingDiscountPresentations in interface ShoppingCart

getOrderDiscountPresentations

public ArrayList getOrderDiscountPresentations()
Deprecated 
Gets the order level discount list

Specified by:
getOrderDiscountPresentations in interface ShoppingCart

setOrderDiscountPresentations

public void setOrderDiscountPresentations(ArrayList orderDiscountPresentations)
Deprecated 
Sets the order level discount list

Specified by:
setOrderDiscountPresentations in interface ShoppingCart


Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.