|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SpreadData
This interface defines the access methods that a spread data holder should implement.
Method Summary | |
---|---|
int |
addBucket(java.util.Date bucketStartDate)
Adds a new bucket into the spread data. |
void |
clearFinancialValues()
Clear all the cost/financial values |
java.util.Date |
getBucketEndDate(int bucketIndex)
Find the bucket end time of a specified bucket. |
int |
getBucketIndex(java.util.Date date)
Find the bucket index of the bucket that the specified date falls in. |
java.util.Date |
getBucketStart(java.util.Date date,
SpreadBucketType bucketType)
Trims the given date to the bucket start time |
java.util.Date |
getBucketStartDate(int bucketIndex)
Find the bucket start time of a specified bucket. |
SpreadBucketType |
getBucketType()
Get the bucket type of this batch of spread data. |
java.lang.String[] |
getCostFields()
Get the cost fields in this spread data. |
double |
getDouble(java.lang.String fieldName,
int bucketIndex)
Get the spreaded value (either cumulative or period only) for this period. |
java.util.Date |
getNextBucketStart(java.util.Date date,
SpreadBucketType bucketType)
Gets the next bucket time by a given date |
java.util.Date |
getPreviousBucketStart(java.util.Date date,
SpreadBucketType bucketType)
Gets the previous bucket time by a given date |
java.util.Date |
getSpreadEnd()
Find the end time of this batch of spread data. |
java.util.Date |
getSpreadStart()
Find the start time of this batch of spread data. |
java.lang.String[] |
getUnitFields()
Get the unit fields in this spread data. |
boolean |
isCumulativeData()
Whether this batch of spread data holds cumulative data or period data only. |
void |
setDouble(java.lang.String fieldName,
int bucketIndex,
double value)
Set the spreaded value (period only) for this period. |
int |
size()
Get the number of buckets the spread data holds. |
Method Detail |
---|
java.lang.String[] getUnitFields()
java.lang.String[] getCostFields()
void clearFinancialValues()
java.util.Date getSpreadStart()
java.util.Date getSpreadEnd()
SpreadBucketType getBucketType()
int size()
int addBucket(java.util.Date bucketStartDate)
bucketStartDate
- the bucket start date. If it is not a bucket start,
a bucket that contains this date will be added.
java.util.Date getBucketStartDate(int bucketIndex)
bucketIndex
- the bucket index of this batch of buckets
java.util.Date getBucketEndDate(int bucketIndex)
bucketIndex
- the bucket index of this batch of buckets
int getBucketIndex(java.util.Date date)
date
- the date that shall fall in a bucket start and end time
double getDouble(java.lang.String fieldName, int bucketIndex) throws SpreadFieldNotFoundException
fieldName
- the spread field namebucketIndex
- the bucket index of this batch of buckets
SpreadFieldNotFoundException
- if the spread field is not validvoid setDouble(java.lang.String fieldName, int bucketIndex, double value) throws SpreadFieldNotFoundException
fieldName
- the spread field namebucketIndex
- the bucket index of this batch of bucketsvalue
- the period only spreaded value
SpreadFieldNotFoundException
- if the spread field is not validboolean isCumulativeData()
java.util.Date getBucketStart(java.util.Date date, SpreadBucketType bucketType)
date
- any given datebucketType
- the spread bucket size
java.util.Date getPreviousBucketStart(java.util.Date date, SpreadBucketType bucketType)
date
- any given datebucketType
- the spread bucket size
java.util.Date getNextBucketStart(java.util.Date date, SpreadBucketType bucketType)
date
- any given datebucketType
- the spread bucket size
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |