public class AvailableToPromise
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
AvailableToPromise()
Default constructor
|
AvailableToPromise(AvailabilityDate[] pAvailabilityDates)
Construct an AvailabilityDates with the given availability dates information
|
Modifier and Type | Method and Description |
---|---|
void |
addAvailabilityDate(AvailabilityDate pAvailabilityDate)
Adds an availability date.
|
void |
addAvailabilityDate(java.util.Calendar pDate,
long pQuantity)
Adds an availability date
|
AvailabilityDate |
getAvailabilityDate(java.util.Calendar pDate)
Gets the availability information for the given date.
|
AvailabilityDate[] |
getAvailabilityDates()
gets the availability date information
|
AvailabilityDate |
getNextAvailabilityDate(java.util.Calendar pDate)
Gets the nearest availability information for the given date (going forward only).
|
long |
getQuantityByDate(java.util.Calendar pStartDate,
java.util.Calendar pEndDate)
Gets the availability quantity within the given dates (inclusive).
|
double |
getQuantityWithFractionByDate(java.util.Calendar pStartDate,
java.util.Calendar pEndDate)
Gets the availability quantity within the given dates (inclusive).
|
void |
setAvailabilityDates(AvailabilityDate[] pAvailabilityDates)
Sets the availability date information
|
public AvailableToPromise()
public AvailableToPromise(AvailabilityDate[] pAvailabilityDates)
pAvailabilityDates
- the availability dates to usepublic void setAvailabilityDates(AvailabilityDate[] pAvailabilityDates)
pAvailabilityDates
- the availability date information to setpublic AvailabilityDate[] getAvailabilityDates()
public void addAvailabilityDate(AvailabilityDate pAvailabilityDate)
pAvailabilityDate
- the date to addpublic void addAvailabilityDate(java.util.Calendar pDate, long pQuantity)
pDate
- the date when the quantity will be availablepQuantity
- the quantitypublic long getQuantityByDate(java.util.Calendar pStartDate, java.util.Calendar pEndDate)
pStartDate
- Start date, null indicates no starting restrictionpEndDate
- End date, null indicates no ending restrictionpublic double getQuantityWithFractionByDate(java.util.Calendar pStartDate, java.util.Calendar pEndDate)
pStartDate
- Start date, null indicates no starting restrictionpEndDate
- End date, null indicates no ending restrictionpublic AvailabilityDate getNextAvailabilityDate(java.util.Calendar pDate)
pDate
- The date to get the next availability information for. Null will get the earliest datepublic AvailabilityDate getAvailabilityDate(java.util.Calendar pDate)
pDate
- The date to return information for