ControlBean 서버 코드

1211 단어
1. 사례 1: Sql 문장 결합
    # Sql    
    StringBuffer sql = new StringBuffer();
    sql.append(" update t_rpt_Template set");
    sql.append(" FVersionStatus= ?,");
    sql.append(" FPublishedStatus= ?");
    sql.append(" where fnumber = ?");
    sql.append(" and ftemplateType = ?");
    sql.append(" and fid <> ?");
    List params = new ArrayList();
    params.add(new Integer(2));
    params.add(new Integer(2));
    params.add(templateInfo.getNumber());
    params.add(Integer.valueOf(templateInfo.getTemplateType().getValue()));
    params.add(templateInfo.getId().toString());
    DbUtil.execute(ctx, sql.toString(), params.toArray());

**2, 사례 2: Template ControllerBeanEx 확장 클래스 중**
SelectorItemCollection sic = new SelectorItemCollection();
sic.add(new SelectorItemInfo("startdate"));
sic.add(new SelectorItemInfo("lastupdatetime"));
sic.add(new SelectorItemInfo("lastupdateuser.id"));
sic.add(new SelectorItemInfo("lastupdateuser.number"));    
sic.add(new SelectorItemInfo("isgroup"));
TemplateInfo template = getTemplateInfo(ctx, pkid, sic);

--- 미완성

좋은 웹페이지 즐겨찾기