시작일, 종료일 yyyy-MM-dd 형식으로 입력받아서 검색할때 그대~로 쓰시면 됩니다.
if( UtilBean.isValidDate(formattype, startdate) || UtilBean.isValidDate(formattype, enddate) ) {
          /*등록일 검색*/
         
          SimpleDateFormat sdf = new SimpleDateFormat(formattype);
          boolean isDuration = ( UtilBean.isValidDate(formattype, startdate) && UtilBean.isValidDate(enddate, formattype) );
          bWhere.append(" and ");
          if( isDuration ){
          bWhere.append(" ( ");
          }
          if( UtilBean.isValidDate(formattype, startdate) ){
            bWhere.append("A.CREATEDON >= to_date('").append(startdate).append("', '").append( formattype.toUpperCase() ).append("') ");
          }
          if( isDuration ){
            bWhere.append(" and ");
          }
          if( UtilBean.isValidDate(formattype, enddate) ){
            bWhere.append("A.CREATEDON < to_date('").append( sdf.format(new java.util.Date( sdf.parse(enddate).getTime()+( 1000 * 24 * 3600 ))) ).append("', '").append( formattype.toUpperCase() ).append("') ");
          }
          if( isDuration ){
          bWhere.append(" ) ");
          }
        }

String sWhere = bWhere.toString().replaceFirst("(?i)and", "");

/* 이건 catch 말고 답없음. */
  public static boolean isValidDate( SimpleDateFormat sdf, String date ) {
    try{
      sdf.parse(date);
    }catch(ParseException e){
      return false;
    }
    return true;
  }



Posted by 윤재현 :

JQUERY ANIMATE활용

2009. 8. 10. 14:47 from JAVASCRIPT
http://buildinternet.com/live/boxes/
알아두면 기획서 극복에 도움이 됩니다.

http://flowplayer.org/tools/demos/overlay/styling.html
UI관련 라이브러리들 모음
Posted by 윤재현 :

Quartz로 데몬돌리기

2009. 8. 10. 00:00 from JSP
우선 소스까지 떠다먹여주신 개발자분에 대한 감사와 존경의 마음을 담아 링크를 걸고
http://blog.naver.com/an5asis/60019595888

부족한 구현능력을 커버해주는 오픈소스개발자들의 산출물에 다시한번 링크를,,,
http://www.opensymphony.com/quartz/

쿼츠 최신버전인 quartz-1.6.5.zip 를 다운받아 압축을 풀면
폴더 최상위에
quartz-1.6.5.jar

lib/core 에 있는

commons-collections-3.2.jar
commons-logging-1.1.jar

파일을 각각 참조 라이브러리에 등록합니다.

억지로 읽게 하려고 의미없는 사진도 첨부합니다.

위 부분이 스케줄을 실행할 메인함수인데 간단합니다. JobDetail 생성자 부분의 세번째 인자인 QuartzReport.class 의 execute 함수를 trigger.setCronExpression의 양식에 맞게 스케쥴링 하는게 끝이죠 부가적으로 getJobDataMap().put("type", "FULL")은 파라메터맵 설정하는정도로 생각하시면 됩니다. 결론적으로 위에있는 소스중에 execute만 고쳐서 쓰세요.
Posted by 윤재현 :