public Param getParam(String code) { Param param = paramDao.getParamByCode(code); if (param == null) { return null; } return param; }
public List<Param> getParamsByParentCode(String code) { Param parent = paramDao.getParamByCode(code); if (parent == null) { return null; } return paramDao.getChildrenByDecode(parent.getDecode()); }
public List<Param> getTreeParam(String code) { Param param = paramDao.getParamByCode(code); if (!ParamConstants.TREE_PARAM_MODE.equals(param.getModality())) { throw new BusinessException("不是树型参数!"); } return paramDao.getChildrenByDecode(param.getDecode()); }
public String getSimpleParamValue(String code) { Param param = paramDao.getParamByCode(code); if (!ParamConstants.SIMPLE_PARAM_MODE.equals(param.getModality())) { throw new BusinessException("不是简单参数!"); } return param.getValue(); }
public List<Param> getComboParam(String code) { Param param = paramDao.getParamByCode(code); if (param == null) { return null; } if (!ParamConstants.COMBO_PARAM_MODE.equals(param.getModality())) { throw new BusinessException(code + "不是下拉型参数!"); } return paramDao.getChildrenByDecode(param.getDecode()); }
public Param getParam(String code) { return paramDao.getParamByCode(code); }