private List<Row> createTimeEntryRowList(String shiftData) throws ParseException
   {
      List<Row> list = new ArrayList<Row>();
      String[] shifts = shiftData.split(",|:");
      int index = 1;
      while (index < shifts.length)
      {
         index += 2;
         int entryCount = Integer.parseInt(shifts[index]);
         index++;

         for (int entryIndex = 0; entryIndex < entryCount; entryIndex++)
         {
            Integer exceptionTypeID = Integer.valueOf(shifts[index + 0]);
            Date startTime = DatatypeConverter.parseBasicTime(shifts[index + 1]);
            Date endTime = DatatypeConverter.parseBasicTime(shifts[index + 2]);

            Map<String, Object> map = new HashMap<String, Object>();
            map.put("START_TIME", startTime);
            map.put("END_TIME", endTime);
            map.put("EXCEPTIOP", exceptionTypeID);

            list.add(new MapRow(map));

            index += 3;
         }
      }

      return list;
   }
private List < Row > createTimeEntryRowList ( String shiftData ) throws ParseException { List < Row > list = new ArrayList < Row > ( ) ; String [ ] shifts = shiftData . split ( ",|:" ) ; int index = 1 ; while ( index < shifts . length ) { index += 2 ; int entryCount = Integer . parseInt ( shifts [ index ] ) ; index ++ ; for ( int entryIndex = 0 ; entryIndex < entryCount ; entryIndex ++ ) { Integer exceptionTypeID = Integer . valueOf ( shifts [ index + 0 ] ) ; Date startTime = DatatypeConverter . parseBasicTime ( shifts [ index + 1 ] ) ; Date endTime = DatatypeConverter . parseBasicTime ( shifts [ index + 2 ] ) ; Map < String , Object > map = new HashMap < String , Object > ( ) ; map . put ( "START_TIME" , startTime ) ; map . put ( "END_TIME" , endTime ) ; map . put ( "EXCEPTIOP" , exceptionTypeID ) ; list . add ( new MapRow ( map ) ) ; index += 3 ; } } return list ; }
Extract a list of time entries.

@param shiftData string representation of time entries
@return list of time entry rows