Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.ebusiness.shoppingcart
Class ShoppingCartImpl

    java.lang.Object
      com.beasys.commerce.foundation.BelongingImpl
          com.beasys.commerce.ebusiness.shoppingcart.ShoppingCartImpl

All Implemented Interfaces
  ShoppingCart, Belonging, BusinessSmartComponent, RelationalReference, Serializable, Cloneable, Comparable

Deprecated See BEA Commerce product offering

    @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 See BEA Commerce product offering
`Collection` | `shoppingCartLines` Deprecated See BEA Commerce product offering
`Money` | `subtotal` Deprecated See BEA Commerce product offering
`Money` | `total` Deprecated See BEA Commerce product offering

Fields inherited from class com.beasys.commerce.foundation.BelongingImpl
`__classIdentifier, __containingBelonging, __containingEntity, __mapKey, __sequenceNumber, _isDirty`

Constructor Summary
`ShoppingCartImpl()` Deprecated See BEA Commerce product offering

Method Summary
`void` | `addItemsFromShoppingCart(ShoppingCart items)` Deprecated See BEA Commerce product offering
`ShoppingCartLine` | `addProductItem(ProductItem item, double quantity)` Deprecated See BEA Commerce product offering
`ShoppingCartLine` | `addProductItem(ProductItem item, double quantity, Money unitPrice)` Deprecated See BEA Commerce product offering
`boolean` | `addShoppingCartLine(ShoppingCartLine element)` Deprecated See BEA Commerce product offering
`boolean` | `addShoppingCartLineCollection(Collection collection)` Deprecated See BEA Commerce product offering
`void` | `clearShoppingCartLineCollection()` Deprecated See BEA Commerce product offering
`int` | `compareTo(Object o)` Deprecated See BEA Commerce product offering
`boolean` | `containsShoppingCartLine(ShoppingCartLine element)` Deprecated See BEA Commerce product offering
`boolean` | `containsShoppingCartLineCollection(Collection collection)` Deprecated See BEA Commerce product offering
`ShoppingCartLine` | `createShoppingCartLine()` Deprecated See BEA Commerce product offering
`boolean` | `equalsShoppingCartLineCollection(Object object)` Deprecated See BEA Commerce product offering
`ShoppingCartLine` | `findShoppingCartLine(String productIdentifier)` Deprecated See BEA Commerce product offering
`double` | `getCategoryQuantity(String categoryId)` Deprecated See BEA Commerce product offering
`double` | `getNumberOfUnits()` Deprecated See BEA Commerce product offering
`ArrayList` | `getOrderDiscountPresentations()` Deprecated See BEA Commerce product offering
`Money` | `getShipping()` Deprecated See BEA Commerce product offering
`ArrayList` | `getShippingDiscountPresentations()` Deprecated See BEA Commerce product offering
`Collection` | `getShoppingCartLineCollection()` Deprecated See BEA Commerce product offering
`Money` | `getSubtotal()` Deprecated See BEA Commerce product offering
`Money` | `getTotal()` Deprecated See BEA Commerce product offering
`Money` | `getTotal(int totalType)` Deprecated See BEA Commerce product offering
`Money` | `getTotalPrice()` Deprecated See BEA Commerce product offering
`String` | `interfaceName()` Deprecated See BEA Commerce product offering
`boolean` | `isEmpty()` Deprecated See BEA Commerce product offering
`boolean` | `isShoppingCartLineCollectionEmpty()` Deprecated See BEA Commerce product offering
`void` | `removeAllProductItems()` Deprecated See BEA Commerce product offering
`ProductItem` | `removeProductItem(String productIdentifier)` Deprecated See BEA Commerce product offering
`boolean` | `removeShoppingCartLine(ShoppingCartLine element)` Deprecated See BEA Commerce product offering
`boolean` | `removeShoppingCartLineCollection(Collection collection)` Deprecated See BEA Commerce product offering
`boolean` | `retainShoppingCartLineCollection(Collection collection)` Deprecated See BEA Commerce product offering
`void` | `setByValue(Belonging value)` Deprecated See BEA Commerce product offering
`void` | `setOrderDiscountPresentations(ArrayList orderDiscountPresentations)` Deprecated See BEA Commerce product offering
`void` | `setProductItemQuantity(ProductItem item, double quantity)` Deprecated See BEA Commerce product offering
`void` | `setShipping(Money shipping)` Deprecated See BEA Commerce product offering
`void` | `setShippingDiscountPresentations(ArrayList shippingDiscountPresentations)` Deprecated See BEA Commerce product offering
`void` | `setShoppingCartLineCollection(Collection collection)` Deprecated See BEA Commerce product offering
`void` | `setSubtotal(Money subtotal)` Deprecated See BEA Commerce product offering
`void` | `setTotal(Money total)` Deprecated See BEA Commerce product offering
`int` | `shoppingCartLineCollectionHashCode()` Deprecated See BEA Commerce product offering
`Iterator` | `shoppingCartLineCollectionIterator()` Deprecated See BEA Commerce product offering
`int` | `shoppingCartLineCollectionSize()` Deprecated See BEA Commerce product offering
`Belonging` | `value()` Deprecated See BEA Commerce product offering

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 See BEA Commerce product offering
  - Containment: By Value
  - Multiplicity: 1:1

### subtotal

    public Money subtotal

  Deprecated See BEA Commerce product offering

### total

    public Money total

  Deprecated See BEA Commerce product offering

### shoppingCartLines

    public Collection shoppingCartLines

  Deprecated See BEA Commerce product offering
  The shopping cart contains a list of ShoppingCart lines
  - Containment: By Value
  - Multiplicity: 0:N
  - Interface: java.util.Collection

Constructor Detail

### ShoppingCartImpl

    public ShoppingCartImpl()

  Deprecated See BEA Commerce product offering

Method Detail

### getTotal

    public Money getTotal()

  Deprecated See BEA Commerce product offering

  Get the value of total

  Specified by:
    `getTotal` in interface `ShoppingCart`
  Returns
    total.

### setTotal

    public void setTotal(Money total)

  Deprecated See BEA Commerce product offering

  Set the value of total

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

### getSubtotal

    public Money getSubtotal()

  Deprecated See BEA Commerce product offering

  Get the value of subtotal

  Specified by:
    `getSubtotal` in interface `ShoppingCart`
  Returns
    subtotal.

### setSubtotal

    public void setSubtotal(Money subtotal)

  Deprecated See BEA Commerce product offering

  Set the value of subtotal

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

### getShipping

    public Money getShipping()

  Deprecated See BEA Commerce product offering

  Get the value of shipping

  Specified by:
    `getShipping` in interface `ShoppingCart`
  Returns
    shipping.

### setShipping

    public void setShipping(Money shipping)

  Deprecated See BEA Commerce product offering

  Set the value of shipping

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

### getShoppingCartLineCollection

    public Collection getShoppingCartLineCollection()

  Deprecated See BEA Commerce product offering

  Returns a deep copy of the entire collection

  Specified by:
    `getShoppingCartLineCollection` in interface `ShoppingCart`

### setShoppingCartLineCollection

    public void setShoppingCartLineCollection(Collection collection)

  Deprecated See BEA Commerce product offering

  Sets the entire collection

  Specified by:
    `setShoppingCartLineCollection` in interface `ShoppingCart`

### addShoppingCartLine

    public boolean addShoppingCartLine(ShoppingCartLine element)

  Deprecated See BEA Commerce product offering

  Ensures that this collection contains the specified element (optional operation).

  Specified by:
    `addShoppingCartLine` in interface `ShoppingCart`

### addShoppingCartLineCollection

    public boolean addShoppingCartLineCollection(Collection collection)

  Deprecated See BEA Commerce product offering

  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 See BEA Commerce product offering

  Removes all of the elements from this collection (optional operation).

  Specified by:
    `clearShoppingCartLineCollection` in interface `ShoppingCart`

### containsShoppingCartLine

    public boolean containsShoppingCartLine(ShoppingCartLine element)

  Deprecated See BEA Commerce product offering

  Returns true if this collection contains the specified element.

  Specified by:
    `containsShoppingCartLine` in interface `ShoppingCart`

### containsShoppingCartLineCollection

    public boolean containsShoppingCartLineCollection(Collection collection)

  Deprecated See BEA Commerce product offering

  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 See BEA Commerce product offering

  Compares the specified object with this collection for equality.

  Specified by:
    `equalsShoppingCartLineCollection` in interface `ShoppingCart`

### shoppingCartLineCollectionHashCode

    public int shoppingCartLineCollectionHashCode()

  Deprecated See BEA Commerce product offering

  Returns the hash code value for this collection.

  Specified by:
    `shoppingCartLineCollectionHashCode` in interface `ShoppingCart`

### isShoppingCartLineCollectionEmpty

    public boolean isShoppingCartLineCollectionEmpty()

  Deprecated See BEA Commerce product offering

  Returns true if this collection contains no elements.

  Specified by:
    `isShoppingCartLineCollectionEmpty` in interface `ShoppingCart`

### shoppingCartLineCollectionIterator

    public Iterator shoppingCartLineCollectionIterator()

  Deprecated See BEA Commerce product offering

  Returns an iterator over the elements in this collection.

  Specified by:
    `shoppingCartLineCollectionIterator` in interface `ShoppingCart`

### removeShoppingCartLine

    public boolean removeShoppingCartLine(ShoppingCartLine element)

  Deprecated See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  Returns the number of elements in this collection.

  Specified by:
    `shoppingCartLineCollectionSize` in interface `ShoppingCart`

### value

    public Belonging value()

  Deprecated See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  Removes all ShoppingCartLines. This resets the entire ShoppingCart.

  Specified by:
    `removeAllProductItems` in interface `ShoppingCart`

### findShoppingCartLine

    public ShoppingCartLine findShoppingCartLine(String productIdentifier)
                                          throws ItemNotInShoppingCartException,
                                                 InvalidArgumentException

  Deprecated See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  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 See BEA Commerce product offering

  Returns true if the shopping cart has no items

  Specified by:
    `isEmpty` in interface `ShoppingCart`

### getTotal

    public Money getTotal(int totalType)
                   throws InvalidArgumentException

  Deprecated See BEA Commerce product offering

  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 See BEA Commerce product offering

  Gets the overal shopping cart total

  Specified by:
    `getTotalPrice` in interface `ShoppingCart`

### getShippingDiscountPresentations

    public ArrayList getShippingDiscountPresentations()

  Deprecated See BEA Commerce product offering

  Gets the shipping discount list

  Specified by:
    `getShippingDiscountPresentations` in interface `ShoppingCart`

### setShippingDiscountPresentations

    public void setShippingDiscountPresentations(ArrayList shippingDiscountPresentations)

  Deprecated See BEA Commerce product offering

  Sets the shipping discount list

  Specified by:
    `setShippingDiscountPresentations` in interface `ShoppingCart`

### getOrderDiscountPresentations

    public ArrayList getOrderDiscountPresentations()

  Deprecated See BEA Commerce product offering

  Gets the order level discount list

  Specified by:
    `getOrderDiscountPresentations` in interface `ShoppingCart`

### setOrderDiscountPresentations

    public void setOrderDiscountPresentations(ArrayList orderDiscountPresentations)

  Deprecated See BEA Commerce product offering

  Sets the order level discount list

  Specified by:
    `setOrderDiscountPresentations` in interface `ShoppingCart`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved