code: public Map<Integer, Row> createWorkPatternMap(List<Row> rows)
     {
        Map<Integer, Row> map = new HashMap<Integer, Row>();
        for (Row row : rows)
        {
           map.put(row.getInteger("WORK_PATTERNID"), row);
        }
        return map;
     }
docs: Creates a map of work pattern rows indexed by the primary key.
  
  @param rows work pattern rows
  @return work pattern map