Class ResourceAssignmentSpread

All Implemented Interfaces:
Serializable, Cloneable, Iterable<SpreadPeriod>

public class ResourceAssignmentSpread extends ResourceAssignmentBaseSpread

Resource assignment spreads contain unit and/or cost fields for a particular resource assignment that have been spread over zero to many spread periods. Resource assignment spreads are calculated live and therefore can be used without running the summarizer job service.

To edit future bucket planning data, edit the values on an associated ResourceAssignmentSpreadPeriod instance. Then call the ResourceAssignment.setResourceAssignmentSpread() method before using the ResourceAssignment.setResourceAssignmentSpread() method to update the ResourceAssignment.

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

See Also:
  • Constructor Details

    • ResourceAssignmentSpread

      public ResourceAssignmentSpread(SpreadBucketType bucketType)
      Creates a new resource assignment instance for update. If the bucket type parameter is defined as Week, you must set the start day of week. If the bucket type parameter is defined as financial period, you must set the financial period dates.
      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
    • ResourceAssignmentSpread

      public ResourceAssignmentSpread(BaseSpread baseSpread)
  • Method Details

    • addSpreadPeriod

      public ResourceAssignmentSpreadPeriod addSpreadPeriod(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
    • getSpreadData

      public SpreadData getSpreadData()