Primavera Integration API 7.0

com.primavera.common.value.spread
Class ResourceAssignmentSpread

java.lang.Object
  extended by com.primavera.common.value.spread.BaseSpread
      extended by com.primavera.common.value.spread.ResourceAssignmentBaseSpread
          extended by com.primavera.common.value.spread.ResourceAssignmentSpread
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ResourceAssignmentSpread
extends com.primavera.common.value.spread.ResourceAssignmentBaseSpread

Resource assignment spread, containing unit and/or cost fields that have been spread for a particular resource assignment over zero to many spread periods. Resource assignment spreads are calculated live, and do not require the summarizer job service in order to be used.

To edit future bucket planning data, edit the values on an associated ResourceAssignmentSpreadPeriod instance, then call ResourceAssignment.setResourceAssignmentSpread() before updating the ResourceAssignment.

See the description in BaseSpread for information on how to access the loaded spread data.

See Also:
Serialized Form

Constructor Summary
ResourceAssignmentSpread(SpreadBucketType bucketType)
          Create a new resource assignment instance for update.
ResourceAssignmentSpread(SpreadData spreadData)
          Constructor.
 
Method Summary
 ResourceAssignmentSpreadPeriod addSpreadPeriod(java.util.Date date)
          Add a spread period at the specified date
 boolean isPlannedUnitsEdited()
          Gets the flag indicating whether the planned units were edited in this spread
 boolean isRemainingUnitsEdited()
          Gets the flag indicating whether the remaining units were edited in this spread
 void setFinancialPeriods(com.primavera.common.value.spread.FinancialPeriodDates[] finPeriodDates)
          Sets the financial period dates for this spread; this method is internal and should not be called by client code.
 void setStartDayOfWeek(int weekStart)
          Sets the start day of the week for this spread.
 
Methods inherited from class com.primavera.common.value.spread.BaseSpread
clearFinancialValues, ensureSpreadSpansDate, getCostFields, getSpreadBucketType, getSpreadBucketTypeEnum, getSpreadEnd, getSpreadIterator, getSpreadPeriod, getSpreadStart, getUnitFields, hasCumulativeData, size, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceAssignmentSpread

public ResourceAssignmentSpread(SpreadBucketType bucketType)
Create a new resource assignment instance for update. If the bucket type is week, the start day of week must be set. If the bucket type is financial period, the financial period dates must be set.

Parameters:
bucketType - the bucket type in updating (Day, Week, Month, Financial Period, etc)

ResourceAssignmentSpread

public ResourceAssignmentSpread(SpreadData spreadData)
Constructor. Create as ResourceAssignmentSpread object through which all spread data can be fetched.

Parameters:
spreadData - the actual object which holds spread data
Method Detail

addSpreadPeriod

public ResourceAssignmentSpreadPeriod addSpreadPeriod(java.util.Date date)
                                               throws SpreadNonEditableException
Add a spread period at the specified date

Parameters:
date - A date within the current period
Returns:
the added spread period
Throws:
SpreadNonEditableException - if this spread is not editable

setStartDayOfWeek

public void setStartDayOfWeek(int weekStart)
Sets the start day of the week for this spread.

Parameters:
weekStart - the start day of the week: Sunday = 1, Monday = 2, etc.

setFinancialPeriods

public void setFinancialPeriods(com.primavera.common.value.spread.FinancialPeriodDates[] finPeriodDates)
Sets the financial period dates for this spread; this method is internal and should not be called by client code.

Parameters:
finPeriodDates - an array of financial period dates

isPlannedUnitsEdited

public boolean isPlannedUnitsEdited()
Gets the flag indicating whether the planned units were edited in this spread

Returns:
boolean true if the planned units were edited

isRemainingUnitsEdited

public boolean isRemainingUnitsEdited()
Gets the flag indicating whether the remaining units were edited in this spread

Returns:
boolean true if the remaining units were edited

Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.