Java Code Examples for net.sf.mpxj.Task#setLevelingDelay()

The following examples show how to use net.sf.mpxj.Task#setLevelingDelay() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MerlinReader.java    From mpxj with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * Read data for an individual task.
 *
 * @param row task data from database
 * @param task Task instance
 */
private void populateTask(Row row, Task task)
{
   task.setUniqueID(row.getInteger("Z_PK"));
   task.setName(row.getString("ZTITLE"));
   task.setPriority(Priority.getInstance(row.getInt("ZPRIORITY")));
   task.setMilestone(row.getBoolean("ZISMILESTONE"));
   task.setActualFinish(row.getTimestamp("ZGIVENACTUALENDDATE_"));
   task.setActualStart(row.getTimestamp("ZGIVENACTUALSTARTDATE_"));
   task.setNotes(row.getString("ZOBJECTDESCRIPTION"));
   task.setDuration(row.getDuration("ZGIVENDURATION_"));
   task.setOvertimeWork(row.getWork("ZGIVENWORKOVERTIME_"));
   task.setWork(row.getWork("ZGIVENWORK_"));
   task.setLevelingDelay(row.getDuration("ZLEVELINGDELAY_"));
   task.setActualOvertimeWork(row.getWork("ZGIVENACTUALWORKOVERTIME_"));
   task.setActualWork(row.getWork("ZGIVENACTUALWORK_"));
   task.setRemainingWork(row.getWork("ZGIVENACTUALWORK_"));
   task.setGUID(row.getUUID("ZUNIQUEID"));

   Integer calendarID = row.getInteger("ZGIVENCALENDAR");
   if (calendarID != null)
   {
      ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID);
      if (calendar != null)
      {
         task.setCalendar(calendar);
      }
   }

   populateConstraints(row, task);

   // Percent complete is calculated bottom up from assignments and actual work vs. planned work

   m_eventManager.fireTaskReadEvent(task);
}