© 2002 BEA Systems, Inc.


com.beasys.commerce.ebusiness.order
Class OrderImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.EntityImpl
        |
        +--com.beasys.commerce.ebusiness.order.OrderImpl

public class OrderImpl
extends EntityImpl

This is a class that will implement the business process of order fulfillment.

 Primary Key = com.beasys.commerce.ebusiness.order.OrderPk
 

See Also:
Order, OrderHome, OrderValue, Serialized Form

Field Summary
 java.sql.Date createdDate
           Containment: By Value Multiplicity: 1:1
 SmartEntityReference customer
          Order has a reference to the Customer that committed it Containment: By Reference Multiplicity: 1:1
 java.lang.String identifier
           Containment: By Value Multiplicity: 1:1 PRIMARY KEY FIELD
 SmartCollectionReference orderLines
           Containment: By Value Multiplicity: 0:N Interface: java.util.Collection
 java.lang.String orderStatus
           Containment: By Value Multiplicity: 1:1
 SmartEntityReference paymentTransaction
           Containment: By Reference Multiplicity: 1:1
 Money price
           Containment: By Value Multiplicity: 1:1
 Money shipping
           Containment: By Value Multiplicity: 1:1
 com.beasys.commerce.axiom.contact.Address shippingAddress
           Containment: By Value Multiplicity: 1:1
 java.lang.String shippingMethod
           Containment: By Value Multiplicity: 1:1
 java.lang.String specialInstructions
           Containment: By Value Multiplicity: 1:1
 java.lang.String splittingPreference
           Containment: By Value Multiplicity: 1:1
 double subtotal
          The subtotal for the order
 
Fields inherited from class com.beasys.commerce.foundation.EntityImpl
__classIdentifier, __containingEntity, __mapKey, __sequenceNumber, _ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty, _smartBMP
 
Constructor Summary
OrderImpl()
           
 
Method Summary
 boolean addOrderLines(OrderLine element)
          Ensures that this collection contains the specified element (optional operation).
 boolean addOrderLinesCollection(java.util.Collection collection)
          Adds all of the elements in the specified collection to this collection (optional operation).
protected  void bscInitializeAttributes(OrderPk orderPk)
           
 void clearOrderLinesCollection()
          Removes all of the elements from this collection (optional operation).
 boolean containsOrderLines(OrderLine element)
          Returns true if this collection contains the specified element.
 boolean containsOrderLinesCollection(java.util.Collection collection)
          Returns true if this collection contains all of the elements in the specified collection.
 void ejbActivate()
           
 OrderPk ejbCreate(OrderPk orderPk)
           
 java.util.Collection ejbFindByCustomer(java.lang.String customerIdentifier)
          Returns a list of Orders in the system that are associated with the specified Customer identifier.
 java.util.Collection ejbFindByDate(java.sql.Date from, java.sql.Date to)
          Returns a list of Orders in the system that fall within the given date range.
 OrderPk ejbFindByPrimaryKey(OrderPk pk)
           
 java.util.Collection ejbFindByStatus(java.lang.String findStatus)
          Returns an enumeration of all the Orders in the system with the specified status.
 void ejbLoad()
           
 void ejbPassivate()
           
 void ejbPostCreate(OrderPk orderPk)
           
 void ejbRemove()
           
 void ejbStore()
           
 boolean equalsOrderLinesCollection(java.lang.Object object)
          Compares the specified object with this collection for equality.
 java.sql.Date getCreatedDate()
          Get the value of createdDate
 Customer getCustomer()
          Get the remote object reference of customer
 SmartEntityReference getCustomerReference()
          Get the SmartEntityReference for customer
 java.lang.String getIdentifier()
           
 OrderValue getOrderByValue()
          Get all of Order's attributes.
 java.util.Collection getOrderLinesCollection()
          Returns a deep copy of the entire collection
 SmartCollectionReference getOrderLinesCollectionReference()
          Get the SmartCollectionReference for orderLines
 java.lang.String getOrderStatus()
          Get the value of orderStatus
 PaymentTransaction getPaymentTransaction()
          Get the remote object reference of paymentTransaction
 SmartEntityReference getPaymentTransactionReference()
          Get the SmartEntityReference for paymentTransaction
 Money getPrice()
          Get the value of price
 Money getShipping()
          Get the value of shipping
 com.beasys.commerce.axiom.contact.Address getShippingAddress()
          Get the value of shippingAddress
 java.lang.String getShippingMethod()
          Get the value of shippingMethod
 java.lang.String getSpecialInstructions()
          Get the value of specialInstructions
 java.lang.String getSplittingPreference()
          Get the value of splittingPreference
 double getSubtotal()
          Get the value of subtotal
 Money getTotal(int totalType)
          Gets the shopping cart total for the given total type
 boolean isOrderLinesCollectionEmpty()
          Returns true if this collection contains no elements.
 int orderLinesCollectionHashCode()
          Returns the hash code value for this collection.
 java.util.Iterator orderLinesCollectionIterator()
          Returns an iterator over the elements in this collection.
 int orderLinesCollectionSize()
          Returns the number of elements in this collection.
 boolean removeOrderLines(OrderLine element)
          Removes a single instance of the specified element from this collection, if it is present (optional operation).
 boolean removeOrderLinesCollection(java.util.Collection collection)
          Removes all this collection's elements that are also contained in the specified collection (optional operation).
 boolean retainOrderLinesCollection(java.util.Collection collection)
          Retains only the elements in this collection that are contained in the specified collection (optional operation).
 void setCreatedDate(java.sql.Date createdDate)
          Set the value of createdDate
 void setCustomer(Customer customer)
          Set the remote object reference of customer
 void setCustomerReference(SmartEntityReference smartEntityReference)
          Set the SmartEntityReference for customer
 void setEntityContext(javax.ejb.EntityContext ctx)
           
 void setIdentifier(java.lang.String value)
           
 void setOrderByValue(OrderValue value)
          Set all of Order's attributes to the passed in value.
 void setOrderLinesCollection(java.util.Collection collection)
          Sets the entire collection
 void setOrderLinesCollectionReference(SmartCollectionReference smartCollectionReference)
          Set the SmartCollectionReference for orderLines
 void setOrderStatus(java.lang.String orderStatus)
          Set the value of orderStatus
 void setPaymentTransaction(PaymentTransaction paymentTransaction)
          Set the remote object reference of paymentTransaction
 void setPaymentTransactionReference(SmartEntityReference smartEntityReference)
          Set the SmartEntityReference for paymentTransaction
 void setPrice(Money price)
          Set the value of price
 void setShipping(Money shipping)
          Set the value of shipping
 void setShippingAddress(com.beasys.commerce.axiom.contact.Address shippingAddress)
          Set the value of shippingAddress
 void setShippingMethod(java.lang.String shippingMethod)
          Set the value of shippingMethod
 void setSpecialInstructions(java.lang.String specialInstructions)
          Set the value of specialInstructions
 void setSplittingPreference(java.lang.String splittingPreference)
          Set the value of splittingPreference
 void setSubtotal(double subtotal)
          Sets the value of subtotal
 void unsetEntityContext()
           
 
Methods inherited from class com.beasys.commerce.foundation.EntityImpl
bscInitializeAttributes, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, ejbCreate, ejbFindAll, ejbFindByPrimaryKey, ejbPostCreate, enumerateRelationalBinding, enumerateRelationalBinding, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getEntityContext, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSmartBMP, initSmartBMP, isModified, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identifier

public java.lang.String identifier

createdDate

public java.sql.Date createdDate

shippingMethod

public java.lang.String shippingMethod

customer

public SmartEntityReference customer
Order has a reference to the Customer that committed it

shippingAddress

public com.beasys.commerce.axiom.contact.Address shippingAddress

shipping

public Money shipping

paymentTransaction

public SmartEntityReference paymentTransaction

orderStatus

public java.lang.String orderStatus

splittingPreference

public java.lang.String splittingPreference

orderLines

public SmartCollectionReference orderLines

price

public Money price

specialInstructions

public java.lang.String specialInstructions

subtotal

public double subtotal
The subtotal for the order
Constructor Detail

OrderImpl

public OrderImpl()
Method Detail

getOrderByValue

public OrderValue getOrderByValue()
                           throws java.rmi.RemoteException
Get all of Order's attributes.

Returns:
OrderValue the Order value object

setOrderByValue

public void setOrderByValue(OrderValue value)
                     throws java.rmi.RemoteException
Set all of Order's attributes to the passed in value. Note: Primary key attributes are not set.

Parameters:
OrderValue - the Order value object

ejbCreate

public OrderPk ejbCreate(OrderPk orderPk)
                  throws javax.ejb.CreateException

bscInitializeAttributes

protected void bscInitializeAttributes(OrderPk orderPk)
                                throws javax.ejb.CreateException

ejbPostCreate

public void ejbPostCreate(OrderPk orderPk)
                   throws javax.ejb.CreateException

ejbLoad

public void ejbLoad()
             throws javax.ejb.EJBException

Overrides:
ejbLoad in class EntityImpl

ejbStore

public void ejbStore()
              throws javax.ejb.EJBException

Overrides:
ejbStore in class EntityImpl

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException

Overrides:
ejbRemove in class EntityImpl

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException

Overrides:
ejbActivate in class EntityImpl

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException

Overrides:
ejbPassivate in class EntityImpl

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
                      throws javax.ejb.EJBException

Overrides:
setEntityContext in class EntityImpl

unsetEntityContext

public void unsetEntityContext()
                        throws javax.ejb.EJBException

Overrides:
unsetEntityContext in class EntityImpl

ejbFindByPrimaryKey

public OrderPk ejbFindByPrimaryKey(OrderPk pk)
                            throws javax.ejb.FinderException

getCreatedDate

public java.sql.Date getCreatedDate()
Get the value of createdDate

Returns:
createdDate.

setCreatedDate

public void setCreatedDate(java.sql.Date createdDate)
Set the value of createdDate

Parameters:
createdDate - createdDate to be added

getShippingMethod

public java.lang.String getShippingMethod()
Get the value of shippingMethod

Returns:
shippingMethod.

setShippingMethod

public void setShippingMethod(java.lang.String shippingMethod)
Set the value of shippingMethod

Parameters:
shippingMethod - shippingMethod to be added

getIdentifier

public java.lang.String getIdentifier()

setIdentifier

public void setIdentifier(java.lang.String value)

getCustomerReference

public SmartEntityReference getCustomerReference()
Get the SmartEntityReference for customer

setCustomerReference

public void setCustomerReference(SmartEntityReference smartEntityReference)
Set the SmartEntityReference for customer

getCustomer

public Customer getCustomer()
Get the remote object reference of customer

Returns:
customer.

setCustomer

public void setCustomer(Customer customer)
Set the remote object reference of customer

Parameters:
customer - customer to be added

getShippingAddress

public com.beasys.commerce.axiom.contact.Address getShippingAddress()
Get the value of shippingAddress

Returns:
shippingAddress.

setShippingAddress

public void setShippingAddress(com.beasys.commerce.axiom.contact.Address shippingAddress)
Set the value of shippingAddress

Parameters:
shippingAddress - shippingAddress to be added

getShipping

public Money getShipping()
Get the value of shipping

Returns:
shipping.

setShipping

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

Parameters:
shipping - shipping to be added

getPaymentTransactionReference

public SmartEntityReference getPaymentTransactionReference()
Get the SmartEntityReference for paymentTransaction

setPaymentTransactionReference

public void setPaymentTransactionReference(SmartEntityReference smartEntityReference)
Set the SmartEntityReference for paymentTransaction

getPaymentTransaction

public PaymentTransaction getPaymentTransaction()
Get the remote object reference of paymentTransaction

Returns:
paymentTransaction.

setPaymentTransaction

public void setPaymentTransaction(PaymentTransaction paymentTransaction)
Set the remote object reference of paymentTransaction

Parameters:
paymentTransaction - paymentTransaction to be added

getOrderStatus

public java.lang.String getOrderStatus()
Get the value of orderStatus

Returns:
orderStatus.

setOrderStatus

public void setOrderStatus(java.lang.String orderStatus)
Set the value of orderStatus

Parameters:
orderStatus - orderStatus to be added

getSplittingPreference

public java.lang.String getSplittingPreference()
Get the value of splittingPreference

Returns:
splittingPreference.

setSplittingPreference

public void setSplittingPreference(java.lang.String splittingPreference)
Set the value of splittingPreference

Parameters:
splittingPreference - splittingPreference to be added

getOrderLinesCollectionReference

public SmartCollectionReference getOrderLinesCollectionReference()
Get the SmartCollectionReference for orderLines

setOrderLinesCollectionReference

public void setOrderLinesCollectionReference(SmartCollectionReference smartCollectionReference)
Set the SmartCollectionReference for orderLines

getOrderLinesCollection

public java.util.Collection getOrderLinesCollection()
Returns a deep copy of the entire collection

setOrderLinesCollection

public void setOrderLinesCollection(java.util.Collection collection)
Sets the entire collection

addOrderLines

public boolean addOrderLines(OrderLine element)
Ensures that this collection contains the specified element (optional operation).

addOrderLinesCollection

public boolean addOrderLinesCollection(java.util.Collection collection)
Adds all of the elements in the specified collection to this collection (optional operation).

clearOrderLinesCollection

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

containsOrderLines

public boolean containsOrderLines(OrderLine element)
Returns true if this collection contains the specified element.

containsOrderLinesCollection

public boolean containsOrderLinesCollection(java.util.Collection collection)
Returns true if this collection contains all of the elements in the specified collection.

equalsOrderLinesCollection

public boolean equalsOrderLinesCollection(java.lang.Object object)
Compares the specified object with this collection for equality.

orderLinesCollectionHashCode

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

isOrderLinesCollectionEmpty

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

orderLinesCollectionIterator

public java.util.Iterator orderLinesCollectionIterator()
Returns an iterator over the elements in this collection.

removeOrderLines

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

removeOrderLinesCollection

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

retainOrderLinesCollection

public boolean retainOrderLinesCollection(java.util.Collection collection)
Retains only the elements in this collection that are contained in the specified collection (optional operation).

getPrice

public Money getPrice()
Get the value of price

Returns:
price.

setPrice

public void setPrice(Money price)
Set the value of price

Parameters:
price - price to be added

setSubtotal

public void setSubtotal(double subtotal)
Sets the value of subtotal

Parameters:
subtotal - for the order.

getSubtotal

public double getSubtotal()
Get the value of subtotal

Returns:
the subtotal for the order

getSpecialInstructions

public java.lang.String getSpecialInstructions()
Get the value of specialInstructions

Returns:
specialInstructions.

setSpecialInstructions

public void setSpecialInstructions(java.lang.String specialInstructions)
Set the value of specialInstructions

Parameters:
specialInstructions - specialInstructions to be added

orderLinesCollectionSize

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

ejbFindByStatus

public java.util.Collection ejbFindByStatus(java.lang.String findStatus)
                                     throws javax.ejb.FinderException
Returns an enumeration of all the Orders in the system with the specified status.

ejbFindByCustomer

public java.util.Collection ejbFindByCustomer(java.lang.String customerIdentifier)
                                       throws javax.ejb.FinderException
Returns a list of Orders in the system that are associated with the specified Customer identifier.

ejbFindByDate

public java.util.Collection ejbFindByDate(java.sql.Date from,
                                          java.sql.Date to)
                                   throws javax.ejb.FinderException
Returns a list of Orders in the system that fall within the given date range.

getTotal

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

Parameters:
total - type
Throws:
InvalidArgumentException -  

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved