Primavera Integration API 6.1

com.primavera.common.value.spread
Class SpreadBucketDates

java.lang.Object
  extended by com.primavera.common.value.spread.SpreadBucketDates
All Implemented Interfaces:
Serializable, Cloneable

public class SpreadBucketDates
extends Object
implements Serializable, Cloneable

See Also:
Serialized Form

Constructor Summary
SpreadBucketDates(int weekStart)
          Create spread period dates.
 
Method Summary
 Object clone()
           
 Date getBucketEnd(Date date, int bucketType)
          Trim the given date to the bucket end time
 Date getBucketStart(Date date, int bucketType)
          Trim the given date to the bucket start time
 Date getNextBucketStart(Date date, int bucketType)
          Gets the next bucket time by a given date
 Date getPreviousBucketStart(Date date, int bucketType)
          Gets the previous bucket time by a given date
 int getWeekStart()
           
 void setFinancialPeriodDates(List<FinancialPeriodDates> finPeriods)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpreadBucketDates

public SpreadBucketDates(int weekStart)
Create spread period dates.

Parameters:
weekStart - the week start date specified in admin preferences
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

setFinancialPeriodDates

public void setFinancialPeriodDates(List<FinancialPeriodDates> finPeriods)

getWeekStart

public int getWeekStart()

getBucketStart

public Date getBucketStart(Date date,
                           int bucketType)
Trim the given date to the bucket start time

Parameters:
date - any given date
bucketType - the spread bucket type
Returns:
the bucket start time aligned with buckets

getBucketEnd

public Date getBucketEnd(Date date,
                         int bucketType)
Trim the given date to the bucket end time

Parameters:
date - any given date
bucketType - the spread bucket type
Returns:
the bucket end time aligned with buckets

getPreviousBucketStart

public Date getPreviousBucketStart(Date date,
                                   int bucketType)
Gets the previous bucket time by a given date

Parameters:
date - any given date
bucketType - the spread bucket type
Returns:
the previous bucket start time aligned with buckets

getNextBucketStart

public Date getNextBucketStart(Date date,
                               int bucketType)
Gets the next bucket time by a given date

Parameters:
date - any given date
bucketType - the spread bucket type
Returns:
the next bucket start time aligned with buckets

Primavera Integration API 6.1

Copyright © Primavera 1999-2007. All rights reserved.