code: private void processConstraints(Row row, Task task)
     {
        ConstraintType constraintType = ConstraintType.AS_SOON_AS_POSSIBLE;
        Date constraintDate = null;
  
        switch (row.getInt("CONSTRAINU"))
        {
           case 0:
           {
              if (row.getInt("PLACEMENT") == 0)
              {
                 constraintType = ConstraintType.AS_SOON_AS_POSSIBLE;
              }
              else
              {
                 constraintType = ConstraintType.AS_LATE_AS_POSSIBLE;
              }
              break;
           }
  
           case 1:
           {
              constraintType = ConstraintType.MUST_START_ON;
              constraintDate = row.getDate("START_CONSTRAINT_DATE");
              break;
           }
  
           case 2:
           {
              constraintType = ConstraintType.START_NO_LATER_THAN;
              constraintDate = row.getDate("START_CONSTRAINT_DATE");
              break;
           }
  
           case 3:
           {
              constraintType = ConstraintType.START_NO_EARLIER_THAN;
              constraintDate = row.getDate("START_CONSTRAINT_DATE");
              break;
           }
  
           case 4:
           {
              constraintType = ConstraintType.MUST_FINISH_ON;
              constraintDate = row.getDate("END_CONSTRAINT_DATE");
              break;
           }
  
           case 5:
           {
              constraintType = ConstraintType.FINISH_NO_LATER_THAN;
              constraintDate = row.getDate("END_CONSTRAINT_DATE");
              break;
           }
  
           case 6:
           {
              constraintType = ConstraintType.FINISH_NO_EARLIER_THAN;
              constraintDate = row.getDate("END_CONSTRAINT_DATE");
              break;
           }
  
           case 8:
           {
              task.setDeadline(row.getDate("END_CONSTRAINT_DATE"));
              break;
           }
        }
  
        task.setConstraintType(constraintType);
        task.setConstraintDate(constraintDate);
     }
docs: Determines the constraints relating to a task.
  
  @param row row data
  @param task Task instance