© 2005 BEA Systems, Inc.

com.beasys.commerce.axiom.units
Interface UnitPrice

All Superinterfaces:
Belonging, BusinessSmartComponent, Cloneable, Comparable, Serializable
All Known Implementing Classes:
UnitPriceImpl

public interface UnitPrice
extends Belonging

Combines a unit and a price to provide a mechanism for recording pricing and pricing strategies. It also provides features for converting prices between units. Attribute: price The price component of the UnitPrice.

Attribute: unit The unit component of the UnitPrice.

See Also:
UnitPriceHome, UnitPriceImpl

Method Summary
 UnitPrice convert(Unit newUnit)
          Return a new UnitPrice that maintains the Price/Unit ratio with the newly specified unit.
 void convertInPlace(Unit newUnit)
          Translate the UnitPrice into the new Units maintaining the Price/Unit ratio.
 Price getPrice()
          Get the value of price
 Unit getUnit()
          Get the value of unit
 void setPrice(Price price)
          Set the value of price
 void setUnit(Unit unit)
          Set the value of unit
 
Methods inherited from interface com.beasys.commerce.foundation.Belonging
clone, equals, interfaceName, setByValue, value
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

convert

public UnitPrice convert(Unit newUnit)
                  throws InvalidUnitException
Return a new UnitPrice that maintains the Price/Unit ratio with the newly specified unit.

Throws:
InvalidUnitException

convertInPlace

public void convertInPlace(Unit newUnit)
                    throws InvalidUnitException
Translate the UnitPrice into the new Units maintaining the Price/Unit ratio.

Throws:
InvalidUnitException

getPrice

public Price getPrice()
Get the value of price

Returns:
price.

getUnit

public Unit getUnit()
Get the value of unit

Returns:
unit.

setPrice

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

Parameters:
price - price to be added

setUnit

public void setUnit(Unit unit)
Set the value of unit

Parameters:
unit - unit to be added

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved