JAVA2013. 6. 25. 11:09

핵심 : for 문에서 countryList 루프를 돌때

         countryVO.setCarriers 하면 countryList에 추가하여 countryList.get(0).getCarriers() 값이 추가된다

       주소값을 전달해서 그런거 같다

 

예제)
        List<CountryVO> countryList = DAO.getCountry(ID);        

List<String> countryCodeList = new ArrayList<String>();
if ( countryList != null ) {

       for ( CountryVO countryVO : countryList ) 
       {
            if ( countryVO.getCarrierCount() > 0 ) { 
              countryVO.setCarriers(this.DAO.getCountryCarriersNew(CountryVO.getCountryCode(), CountryVO.getID()));
                }
        }
 }

Posted by 선한열심