Class ResourceAssignmentSpread
java.lang.Object
com.primavera.common.value.spread.BaseSpread
com.primavera.common.value.spread.ResourceAssignmentBaseSpread
com.primavera.common.value.spread.ResourceAssignmentSpread
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<SpreadPeriod>
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 Summary
ConstructorsConstructorDescriptionResourceAssignmentSpread(BaseSpread baseSpread) ResourceAssignmentSpread(SpreadData spreadData) Constructor.ResourceAssignmentSpread(SpreadBucketType bucketType) Creates a new resource assignment instance for update. -
Method Summary
Modifier and TypeMethodDescriptionaddSpreadPeriod(Date date) Add a spread period at the specified datebooleanGets the flag indicating whether the planned units were edited in this spreadbooleanGets the flag indicating whether the remaining units were edited in this spreadvoidsetFinancialPeriods(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.voidsetStartDayOfWeek(int weekStart) Sets the start day of the week for this spread.Methods inherited from class com.primavera.common.value.spread.BaseSpread
clearFinancialValues, ensureSpreadSpansDate, ensureSpreadSpansDate, getCostFields, getSpreadBucketType, getSpreadBucketTypeEnum, getSpreadEnd, getSpreadIterator, getSpreadPeriod, getSpreadStart, getUnitFields, hasCumulativeData, iterator, size, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ResourceAssignmentSpread
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
Constructor. Create as ResourceAssignmentSpread object through which all spread data can be fetched.- Parameters:
spreadData- the actual object which holds spread data
-
ResourceAssignmentSpread
-
-
Method Details
-
addSpreadPeriod
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
-