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 OrderPosition

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

@Entity(name="checkout_OrderPosition")
public class OrderPosition
extends AbstractBasicEntity

The OrderPosition.

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

Constructor Summary
protected OrderPosition()
          Deprecated. 
  OrderPosition(ShoppingCartPosition position, ShopSettings settings, User user)
          Creates a new OrderPosition from the given ShoppingCartPosition, ShopSettings and User.
 
Method Summary
 java.lang.Long getItemId()
          Returns the id of the item.
 java.lang.Class<? extends ShopItem> getItemType()
          Returns the type of the item.
 java.lang.String getName()
          Returns the name of the item.
 java.lang.String getOrderCode()
          Returns the order code of the item.
 Price getPrice()
          Returns the Price of the OrderPosition.
 int getQuantity()
          Returns the quantity of items.
 Price getUnitPrice()
          Returns the Price of the item.
 
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

OrderPosition

@Deprecated
protected OrderPosition()
Deprecated. 

The no-argument constructor used by JAXB and JPA.


OrderPosition

public OrderPosition(ShoppingCartPosition position, ShopSettings settings, User user)
Creates a new OrderPosition from the given ShoppingCartPosition, ShopSettings and User.

Parameters:
position - the ShoppingCartPosition.
settings - the ShopSettings.
user - the User.
Throws:
java.lang.IllegalArgumentException - if the given ShoppingCartPosition, ShopSettings or User is null.
Method Detail

getQuantity

public final int getQuantity()
Returns the quantity of items.

Returns:
the quantity of items.

getItemType

public final java.lang.Class<? extends ShopItem> getItemType()
Returns the type of the item.

Returns:
the type of the item.

getItemId

public final java.lang.Long getItemId()
Returns the id of the item.

Returns:
the id of the item.

getName

public final java.lang.String getName()
Returns the name of the item.

Returns:
the name of the item.

getOrderCode

public final java.lang.String getOrderCode()
Returns the order code of the item.

Returns:
the order code of the item.

getUnitPrice

public final Price getUnitPrice()
Returns the Price of the item.

Returns:
the Price of the item.

getPrice

public final Price getPrice()
Returns the Price of the OrderPosition.

Returns:
the Price of the OrderPosition.