public void processActivityCodes ( List < Row > types , List < Row > typeValues , List < Row > assignments ) { ActivityCodeContainer container = m_project . getActivityCodes ( ) ; Map < Integer , ActivityCode > map = new HashMap < Integer , ActivityCode > ( ) ; for ( Row row : types ) { ActivityCode code = new ActivityCode ( row . getInteger ( "actv_code_type_id" ) , row . getString ( "actv_code_type" ) ) ; container . add ( code ) ; map . put ( code . getUniqueID ( ) , code ) ; } for ( Row row : typeValues ) { ActivityCode code = map . get ( row . getInteger ( "actv_code_type_id" ) ) ; if ( code != null ) { ActivityCodeValue value = code . addValue ( row . getInteger ( "actv_code_id" ) , row . getString ( "short_name" ) , row . getString ( "actv_code_name" ) ) ; m_activityCodeMap . put ( value . getUniqueID ( ) , value ) ; } } for ( Row row : assignments ) { Integer taskID = row . getInteger ( "task_id" ) ; List < Integer > list = m_activityCodeAssignments . get ( taskID ) ; if ( list == null ) { list = new ArrayList < Integer > ( ) ; m_activityCodeAssignments . put ( taskID , list ) ; } list . add ( row . getInteger ( "actv_code_id" ) ) ; } }
Read activity code types and values .