Package com.db.commute

Examples of com.db.commute.CommuteVO


 
  // 해당 날짜의 정보만 있는 List를 받아 모든 날짜의 정보를 포함한 List로 변환
  // 고정된 달력 폼에 용이한 출력을 위함. 값이 없는 날짜엔 빈 vo를 포함
  public List<CommuteVO> convertList(int sabun, int endday, List<CommuteVO> list){
    List<CommuteVO> temp = new ArrayList<CommuteVO>();
    CommuteVO cvo = new CommuteVO();
    cvo.setSabun(sabun);   
    for(int i=0; i<endday; i++){
      temp.add(cvo);
    }   
    for(int i=0; i<list.size(); i++){
      cvo = list.get(i);
      SimpleDateFormat sdf = new SimpleDateFormat("dd");     
      String srd = sdf.format(cvo.getRegdate());
      int ind = Integer.parseInt(srd);     
      temp.set(ind-1, cvo);
    }
    return temp;
  }
View Full Code Here


    return temp;
  }
  public List<CommuteVO> convertList(int sabun, Date startd, List<CommuteVO> list){
    SimpleDateFormat sdf = new SimpleDateFormat("dd");     
    List<CommuteVO> temp = new ArrayList<CommuteVO>();   
    CommuteVO cvo = new CommuteVO();
    Calendar cal = Calendar.getInstance();
    String strDay = sdf.format(startd);
    int stday = Integer.parseInt(strDay);
    cvo.setSabun(sabun);
    for(int i=0; i<7; i++){
      temp.add(cvo);
    }   
    for(int i=0; i<list.size(); i++){
      cvo = list.get(i);
      cal.setTime(cvo.getRegdate());     
      int ind = cal.get(Calendar.DAY_OF_WEEK);           
      //System.out.println(ind+"|"+i);
      temp.set(ind-1, cvo);
    }
    return temp;   
View Full Code Here

TOP

Related Classes of com.db.commute.CommuteVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.