pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.shop.checkout
Class Order

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.component.shop.checkout.Order
All Implemented Interfaces:
java.io.Serializable

@Entity(name="checkout_Order")
public class Order
extends AbstractBasicEntity

The Order.

Version:
$Revision: 1979 $
Author:
Christian Schatt
See Also:
Serialized Form

Nested Class Summary
static class Order.OrderBuilder
          The OrderBuilder.
 
Constructor Summary
protected Order()
          Deprecated. 
 
Method Summary
 Address getBillingAddress()
          Returns the billing address.
 Customer getCustomer()
          Returns the Customer.
 Address getDeliveryAddress()
          Returns the delivery address.
 DispatchData getDispatchData()
          Returns the DispatchData.
static java.lang.Long getIdFromSession(Bundle bundle, java.util.Locale locale, ServiceSession session)
          Returns the order id attribute for the given Bundle and Locale from the given ServiceSession.
 OrderContents getOrderContents()
          Returns the OrderContents.
 OrderDetails getOrderDetails()
          Returns the OrderDetails.
 OrderMetaData getOrderMetaData()
          Returns the OrderMetaData.
 PaymentData getPaymentData()
          Returns the PaymentData.
 TotalPrice getTotalPrice()
          Returns the TotalPrice.
static void putIdIntoSession(Order order, ServiceSession session)
          Sets the given Order's id as an attribute of the given ServiceSession.
static void removeIdFromSession(Bundle bundle, java.util.Locale locale, ServiceSession session)
          Removes the order id attribute for the given Bundle and Locale from the given ServiceSession.
 net.sf.json.JSONObject toJSON()
          Returns a JSON-representation of the Order.
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Order

@Deprecated
protected Order()
Deprecated. 

The no-argument constructor used by JAXB and JPA.

Method Detail

getCustomer

public final Customer getCustomer()
Returns the Customer.

Returns:
the Customer.

getDeliveryAddress

public final Address getDeliveryAddress()
Returns the delivery address.

Returns:
the delivery address.

getBillingAddress

public final Address getBillingAddress()
Returns the billing address.

Returns:
the billing address.

getDispatchData

public final DispatchData getDispatchData()
Returns the DispatchData.

Returns:
the DispatchData.

getPaymentData

public final PaymentData getPaymentData()
Returns the PaymentData.

Returns:
the PaymentData.

getOrderDetails

public final OrderDetails getOrderDetails()
Returns the OrderDetails.

Returns:
the OrderDetails.

getOrderContents

public final OrderContents getOrderContents()
Returns the OrderContents.

Returns:
the OrderContents.

getTotalPrice

public final TotalPrice getTotalPrice()
Returns the TotalPrice.

Returns:
the TotalPrice.

getOrderMetaData

public final OrderMetaData getOrderMetaData()
Returns the OrderMetaData.

Returns:
the OrderMetaData.

toJSON

public final net.sf.json.JSONObject toJSON()
Returns a JSON-representation of the Order.

Returns:
the JSON-representation.

putIdIntoSession

public static final void putIdIntoSession(Order order, ServiceSession session)
Sets the given Order's id as an attribute of the given ServiceSession.

Parameters:
order - the Order.
session - the ServiceSession.

getIdFromSession

public static final java.lang.Long getIdFromSession(Bundle bundle,
                                                    java.util.Locale locale, ServiceSession session)
Returns the order id attribute for the given Bundle and Locale from the given ServiceSession.

Parameters:
bundle - the Bundle.
locale - the Locale.
session - the ServiceSession.
Returns:
the order id.

removeIdFromSession

public static final void removeIdFromSession(Bundle bundle,
                                             java.util.Locale locale, ServiceSession session)
Removes the order id attribute for the given Bundle and Locale from the given ServiceSession.

Parameters:
bundle - the Bundle.
locale - the Locale.
session - the ServiceSession.