public class AvailabilityDate
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
| Constructor and Description |
|---|
AvailabilityDate()
Default constructor
|
AvailabilityDate(java.util.Calendar pDate,
long pQuantity)
Constructs an availability date with the given date and quantity
|
AvailabilityDate(java.util.Calendar pDate,
long pQuantity,
double pQuantityWithFraction)
Constructs an availability date with the given date, quantity and quantityWithFraction
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Calendar |
getAvailableDate()
Gets the date the quantity will be available
|
java.util.Date |
getDate()
Returns the date of this AvailabilityDate
|
long |
getQuantity()
Gets the quantity
|
double |
getQuantityDerivedAsFloatingPoint()
This method will return a derived quantity value which this Relationship object represents.
|
double |
getQuantityWithFraction()
Gets the quantityWithFraction
|
void |
setAvailableDate(java.util.Calendar pDate)
Set the date when the quantity will be available
|
void |
setQuantity(long pQuantity)
Sets the quantity of this availability date
|
void |
setQuantityWithFraction(double pQuantityWithFraction)
Sets the quantityWithFraction of this availability date
|
public AvailabilityDate()
public AvailabilityDate(java.util.Calendar pDate,
long pQuantity)
pDate - the datepQuantity - the quantitypublic AvailabilityDate(java.util.Calendar pDate,
long pQuantity,
double pQuantityWithFraction)
pDate - the datepQuantity - the quantitypQuantityWithFraction - the quantity (with fraction)public void setAvailableDate(java.util.Calendar pDate)
pDate - the date to setpublic java.util.Calendar getAvailableDate()
public void setQuantity(long pQuantity)
pQuantity - the quantity to setpublic long getQuantity()
public void setQuantityWithFraction(double pQuantityWithFraction)
pQuantityWithFraction - the quantityWithFraction to setpublic double getQuantityWithFraction()
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 java.util.Date getDate()