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); }
public AppReg findAppById(Long id) { return (AppReg) appRegDao.findByPK(id); }
public void delAppConfig(Long id) { appRegDao.deleteByPK(id); }
public void deleteAll() { appRegDao.deleteAll(); }
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); }
public void updateAppConfig(AppReg appConfig) throws Exception { appRegDao.update(appConfig); }
public void addAppConfig(AppReg appReg) throws Exception { appReg.setState(BasicService.APP_REG_STATE_IDLE); // 默认为休闲,即未运行 appReg.setCreateTime(DateTimeUtil.currentTime()); appRegDao.save(appReg); }