com.elasticpath.domain.order
Interface OrderSku

All Superinterfaces:
EpDomain, Persistence, java.io.Serializable, ValueObject
All Known Implementing Classes:
OrderSkuImpl

public interface OrderSku
extends ValueObject

Represents an order for a quantity of SKUs.


Method Summary
 java.math.BigDecimal getAmount()
          Get the amount for this sku (Price * Quantity).
 Money getAmountMoney(java.util.Currency currency)
          Get the amount as a Money object.
 java.util.Date getCreatedDate()
          Get the date that this order was created on.
 DigitalAsset getDigitalAsset()
          Gets the digital asset belong to this order SKU.
 java.lang.String getDisplayName()
          Get the product's display name.
 java.lang.String getDisplayNameCsr()
          Get the product's display name in the CSR language.
 java.lang.String getDisplaySkuOptions()
          Get the product's option values for display.
 Money getDollarSavingsMoney(java.util.Currency currency)
          Calculates the MoneyImpl savings if the price has a discount.
 java.lang.String getEncryptedUidPk()
          Get the encrypted uidPk string.
 java.lang.String getImage()
          Get the product's image path.
 CmUser getLastModifiedBy()
          Get the CM user who last modifed this order sku.
 java.util.Date getLastModifiedDate()
          Get the date that the order was last modified on.
 java.math.BigDecimal getListPrice()
          Get the amount for this sku.
 Money getListPriceMoney(java.util.Currency currency)
          Get the list price as a Money object.
 Product getProduct()
          Get the parent product corresponding to this SKU.
 ProductSku getProductSku()
          Get the product sku sold.
 long getProductSkuUid()
          Get the product sku uid corrsponding to this OrderSku.
 long getProductUid()
          Get the parent product uid corresponding to this OrderSku.
 int getQuantity()
          Get the quantity of this sku ordered.
 java.math.BigDecimal getSavings()
          Calculates the BigDecimal savings if any.
 java.lang.String getSkuCode()
          Get the productSku SKU.
 java.math.BigDecimal getTax()
          Get the tax amount.
 java.lang.String getTaxCode()
          Gets the tax code for this order SKU.
 java.math.BigDecimal getUnitPrice()
          Get the unit price for this sku.
 Money getUnitPriceMoney(java.util.Currency currency)
          Get the unit price as a Money object.
 int getWeight()
          Returns the shipping weight.
 boolean isUnitLessThanList(java.util.Currency currency)
          Check if the unit price is less than the list price, i.e.
 void setAmount(java.math.BigDecimal amount)
          Set the amount for this sku (Price * Quantity).
 void setCreatedDate(java.util.Date createdDate)
          Set the date that the order is created.
 void setDigitalAsset(DigitalAsset digitalAsset)
          Sets the digital asset.
 void setDisplayName(java.lang.String displayName)
          Set the product's display name.
 void setDisplayNameCsr(java.lang.String displayNameCsr)
          Set the product's display name in the CSR language.
 void setDisplaySkuOptions(java.lang.String displaySkuOptions)
          Set the product's option values for display.
 void setImage(java.lang.String image)
          Set the product's image path.
 void setLastModifiedBy(CmUser createdBy)
          Set the CM User who last modified this order sku.
 void setLastModifiedDate(java.util.Date lastModifiedDate)
          Set the date that the order was last modified on.
 void setListPrice(java.math.BigDecimal price)
          Set the amount for this sku.
 void setProduct(Product product)
          Set the parent product of this SKU.
 void setProductSku(ProductSku productSku)
          Set the product sku sold.
 void setProductSkuUid(long productSkuUid)
          Set the product sku uid.
 void setProductUid(long productUid)
          Set the parent product uid of this SKU.
 void setQuantity(int quantity)
          Set the quantity of this sku ordered.
 void setSkuCode(java.lang.String skuCode)
          Set the SKU for this productSku.
 void setTax(java.math.BigDecimal tax)
          Set the tax amount.
 void setTaxCode(java.lang.String taxCode)
          Sets the tax code for this order SKU.
 void setUnitPrice(java.math.BigDecimal price)
          Set the unit price for this sku.
 void setWeight(int weight)
          Sets the shipping weight.
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

getAmount

java.math.BigDecimal getAmount()
Get the amount for this sku (Price * Quantity).

Returns:
the amount

getAmountMoney

Money getAmountMoney(java.util.Currency currency)
Get the amount as a Money object.

Parameters:
currency - The currency of the order.
Returns:
a Money object representing the total price

getCreatedDate

java.util.Date getCreatedDate()
Get the date that this order was created on.

Returns:
the created date

getDigitalAsset

DigitalAsset getDigitalAsset()
Gets the digital asset belong to this order SKU.

Returns:
the digital asset belong to this order SKU

getDisplayName

java.lang.String getDisplayName()
Get the product's display name.

Returns:
the product's display name.

getDisplayNameCsr

java.lang.String getDisplayNameCsr()
Get the product's display name in the CSR language.

Returns:
the product's display name in the CSR language.

getDisplaySkuOptions

java.lang.String getDisplaySkuOptions()
Get the product's option values for display.

Returns:
the product's option values for display.

getDollarSavingsMoney

Money getDollarSavingsMoney(java.util.Currency currency)
Calculates the MoneyImpl savings if the price has a discount.

Parameters:
currency - The currency of the order.
Returns:
the price savings as a MoneyImpl

getEncryptedUidPk

java.lang.String getEncryptedUidPk()
Get the encrypted uidPk string.

Returns:
the encrypted uidPk string

getImage

java.lang.String getImage()
Get the product's image path.

Returns:
the product's image path.

getLastModifiedBy

CmUser getLastModifiedBy()
Get the CM user who last modifed this order sku.

Returns:
the CM user Disabled: ibernate.property column="MODIFIED_BY" type="java.util.Date"

getLastModifiedDate

java.util.Date getLastModifiedDate()
Get the date that the order was last modified on.

Returns:
the last modified date

getListPrice

java.math.BigDecimal getListPrice()
Get the amount for this sku.

Returns:
the price

getListPriceMoney

Money getListPriceMoney(java.util.Currency currency)
Get the list price as a Money object.

Parameters:
currency - The currency of the order.
Returns:
a Money object representing the price

getProduct

Product getProduct()
Get the parent product corresponding to this SKU. Note: this is not proloaded and could be null if the product corresponding to the saved productUid is deleted.

Returns:
the parent Product or null if the product is unknown

getProductSku

ProductSku getProductSku()
Get the product sku sold. Note: this is not proloaded and could be null if the product sku corresponding to the saved productSkuUid is deleted.

Returns:
the product sku or null if unknown

getProductSkuUid

long getProductSkuUid()
Get the product sku uid corrsponding to this OrderSku.

Returns:
the product sku uid

getProductUid

long getProductUid()
Get the parent product uid corresponding to this OrderSku. Note that this value matches the key defined on the TPRODUCTSKU table by Product

Returns:
the parent Product uid

getQuantity

int getQuantity()
Get the quantity of this sku ordered.

Returns:
the quantity

getSavings

java.math.BigDecimal getSavings()
Calculates the BigDecimal savings if any.

Returns:
the price savings as a MoneyImpl

getSkuCode

java.lang.String getSkuCode()
Get the productSku SKU.

Returns:
the productSku system name

getTax

java.math.BigDecimal getTax()
Get the tax amount.

Returns:
the tax amount

getTaxCode

java.lang.String getTaxCode()
Gets the tax code for this order SKU.

Returns:
the tax code for this order SKU.

getUnitPrice

java.math.BigDecimal getUnitPrice()
Get the unit price for this sku.

Returns:
the price

getUnitPriceMoney

Money getUnitPriceMoney(java.util.Currency currency)
Get the unit price as a Money object.

Parameters:
currency - The currency of the order.
Returns:
a Money object representing the unit price

getWeight

int getWeight()
Returns the shipping weight.

Returns:
the shipping weight.

isUnitLessThanList

boolean isUnitLessThanList(java.util.Currency currency)
Check if the unit price is less than the list price, i.e. the price has a discount.

Parameters:
currency - The currency of the order.
Returns:
true if the price has a lower price than the list price.

setAmount

void setAmount(java.math.BigDecimal amount)
Set the amount for this sku (Price * Quantity).

Parameters:
amount - the amount

setCreatedDate

void setCreatedDate(java.util.Date createdDate)
Set the date that the order is created.

Parameters:
createdDate - the start date

setDigitalAsset

void setDigitalAsset(DigitalAsset digitalAsset)
Sets the digital asset.

Parameters:
digitalAsset - the digital asset

setDisplayName

void setDisplayName(java.lang.String displayName)
Set the product's display name.

Parameters:
displayName - the product's display name

setDisplayNameCsr

void setDisplayNameCsr(java.lang.String displayNameCsr)
Set the product's display name in the CSR language.

Parameters:
displayNameCsr - the product's display name in the CSR language.

setDisplaySkuOptions

void setDisplaySkuOptions(java.lang.String displaySkuOptions)
Set the product's option values for display.

Parameters:
displaySkuOptions - the product's option values for display

setImage

void setImage(java.lang.String image)
Set the product's image path.

Parameters:
image - the product's image path

setLastModifiedBy

void setLastModifiedBy(CmUser createdBy)
Set the CM User who last modified this order sku.

Parameters:
createdBy - the CM user

setLastModifiedDate

void setLastModifiedDate(java.util.Date lastModifiedDate)
Set the date that the order was last modified on.

Parameters:
lastModifiedDate - the date that the order was last modified

setListPrice

void setListPrice(java.math.BigDecimal price)
Set the amount for this sku.

Parameters:
price - the price

setProduct

void setProduct(Product product)
Set the parent product of this SKU.

Parameters:
product - the parent product

setProductSku

void setProductSku(ProductSku productSku)
Set the product sku sold.

Parameters:
productSku - the product sku

setProductSkuUid

void setProductSkuUid(long productSkuUid)
Set the product sku uid.

Parameters:
productSkuUid - the product sku uid

setProductUid

void setProductUid(long productUid)
Set the parent product uid of this SKU.

Parameters:
productUid - the parent productUid

setQuantity

void setQuantity(int quantity)
Set the quantity of this sku ordered.

Parameters:
quantity - the quantity

setSkuCode

void setSkuCode(java.lang.String skuCode)
Set the SKU for this productSku.

Parameters:
skuCode - the SKU

setTax

void setTax(java.math.BigDecimal tax)
Set the tax amount.

Parameters:
tax - the tax amount

setTaxCode

void setTaxCode(java.lang.String taxCode)
Sets the tax code for this order SKU.

Parameters:
taxCode - the tax code for this order SKU.

setUnitPrice

void setUnitPrice(java.math.BigDecimal price)
Set the unit price for this sku.

Parameters:
price - the price

setWeight

void setWeight(int weight)
Sets the shipping weight.

Parameters:
weight - the shipping weight to set.