Exemplo n.º 1
0
  public List<AppReg> findAppConfigs(
      String appCode, String appName, String hostName, int offset, int rowCnt) throws Exception {
    HashMap<String, Object> paramMap = new HashMap<String, Object>();
    if (appCode != null) {
      paramMap.put("appCode", "%" + appCode + "%");
    }
    if (appName != null) {
      paramMap.put("appName", "%" + appName + "%");
    }
    if (hostName != null) {
      paramMap.put("hostName", "%" + hostName + "%");
    }

    // log.info(">>>>>>>pageNum: "+pageNum);
    // log.info(">>>>>>>rowcntPerPage: "+rowcntPerPage);
    PageBounds pageBounds = new PageBounds(offset, rowCnt);
    return appRegDao.find(paramMap, pageBounds);
  }
Exemplo n.º 2
0
 public AppReg findAppById(Long id) {
   return (AppReg) appRegDao.findByPK(id);
 }
Exemplo n.º 3
0
 public void delAppConfig(Long id) {
   appRegDao.deleteByPK(id);
 }
Exemplo n.º 4
0
 public void deleteAll() {
   appRegDao.deleteAll();
 }
Exemplo n.º 5
0
 public AppReg findByCodeOrByName(String appCode, String appName) {
   Map<String, Object> map = new HashMap<String, Object>();
   map.put("appCode", appCode);
   map.put("appName", appName);
   return appRegDao.findByCodeOrByName(map);
 }
Exemplo n.º 6
0
 public void updateAppConfig(AppReg appConfig) throws Exception {
   appRegDao.update(appConfig);
 }
Exemplo n.º 7
0
 public void addAppConfig(AppReg appReg) throws Exception {
   appReg.setState(BasicService.APP_REG_STATE_IDLE); // 默认为休闲,即未运行
   appReg.setCreateTime(DateTimeUtil.currentTime());
   appRegDao.save(appReg);
 }