|
Primavera Integration API 8.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(Date bucketStartDate)
Adds a new bucket into the spread data. |
void |
clearFinancialValues()
Clear all the cost/financial values |
Date |
getBucketEndDate(int bucketIndex)
Find the bucket end time of a specified bucket. |
int |
getBucketIndex(Date date)
Find the bucket index of the bucket that the specified date falls in. |
Date |
getBucketStart(Date date,
SpreadBucketType bucketType)
Trims the given date to the bucket start time |
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. |
String[] |
getCostFields()
Get the cost fields in this spread data. |
double |
getDouble(String fieldName,
int bucketIndex)
Get the spreaded value (either cumulative or period only) for this period. |
Date |
getNextBucketStart(Date date,
SpreadBucketType bucketType)
Gets the next bucket time by a given date |
Date |
getPreviousBucketStart(Date date,
SpreadBucketType bucketType)
Gets the previous bucket time by a given date |
Date |
getSpreadEnd()
Find the end time of this batch of spread data. |
Date |
getSpreadStart()
Find the start time of this batch of spread data. |
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(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 |
---|
String[] getUnitFields()
String[] getCostFields()
void clearFinancialValues()
Date getSpreadStart()
Date getSpreadEnd()
SpreadBucketType getBucketType()
int size()
int addBucket(Date bucketStartDate)
bucketStartDate
- the bucket start date. If it is not a bucket start,
a bucket that contains this date will be added.
Date getBucketStartDate(int bucketIndex)
bucketIndex
- the bucket index of this batch of buckets
Date getBucketEndDate(int bucketIndex)
bucketIndex
- the bucket index of this batch of buckets
int getBucketIndex(Date date)
date
- the date that shall fall in a bucket start and end time
double getDouble(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(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()
Date getBucketStart(Date date, SpreadBucketType bucketType)
date
- any given datebucketType
- the spread bucket size
Date getPreviousBucketStart(Date date, SpreadBucketType bucketType)
date
- any given datebucketType
- the spread bucket size
Date getNextBucketStart(Date date, SpreadBucketType bucketType)
date
- any given datebucketType
- the spread bucket size
|
Primavera Integration API 8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |