public class HandlingInstructionInfo
extends java.lang.Object
implements java.io.Serializable
Objects of this type are generated by CommerceItemShippingInfoTools when creating CommerceItemShippingInfo objects for the CommerceItemShippingInfoContainer.
These objects are used to split and merge the handling instructions along with their associated commerce item.
CommerceItemShippingInfoTools
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
Constructor and Description |
---|
HandlingInstructionInfo()
Creates a new
HandlingInstructionInfo instance. |
HandlingInstructionInfo(HandlingInstruction pHandlingInstruction)
Creates a new
HandlingInstructionInfo instance. |
Modifier and Type | Method and Description |
---|---|
HandlingInstruction |
getHandlingInstruction()
Return the HandlingInstruction property.
|
long |
getQuantity()
Return the Quantity property.
|
double |
getQuantityDerivedAsFloatingPoint()
This method will return a derived quantity value which this HandlingInstructionInfo object represents.
|
double |
getQuantityWithFraction()
Returns the fractional number of quantity which this HandlingInstruction
object represents.
|
boolean |
isFractional()
This returns
true if fractional quantity is set (i.e. |
void |
setHandlingInstruction(HandlingInstruction pHandlingInstruction)
Set the HandlingInstruction property.
|
void |
setQuantity(long pQuantity)
Set the Quantity property.
|
void |
setQuantityWithFraction(double pQuantityWithFraction)
Sets the fractional number of quantity which this HandlingInstruction object
represents.
|
java.lang.String |
toString()
Method that renders the general order information in a readable string format
|
public HandlingInstructionInfo()
HandlingInstructionInfo
instance.public HandlingInstructionInfo(HandlingInstruction pHandlingInstruction)
HandlingInstructionInfo
instance.public void setHandlingInstruction(HandlingInstruction pHandlingInstruction)
HandlingInstruction
- a HandlingInstruction
valuepublic HandlingInstruction getHandlingInstruction()
CommerceItem
valuepublic void setQuantity(long pQuantity)
pQuantity
- a long
valuepublic long getQuantity()
long
valuepublic void setQuantityWithFraction(double pQuantityWithFraction)
pQuantityWithFraction
- the new value for the quantity with fraction.public double getQuantityWithFraction()
double
public double getQuantityDerivedAsFloatingPoint()
It will decide upon the correct quantity value to return, returning the first non null
value from the properties, quantityWithFraction
, quantity
, in that order.
The method should be used where there is a need to know the quantity of an item
but it is unknown to the caller as to which property (quantityWithFraction
or
quantity
holds the value.
public boolean isFractional()
true
if fractional quantity is set (i.e. it has the
fractional value which is greater than zero) for the item for which this relationship
represents, otherwise false
is returned.boolean
value.public java.lang.String toString()
toString
in class java.lang.Object