/**
  * <br>
  * Created on: 2013-11-12 下午03:28:17
  *
  * @param vcNote
  * @param pidIsNull
  * @return
  */
 private TbResourceRote getRoteByNote(String vcNote, boolean pidIsNull) {
   String hql = "from TbResourceRote where vcNote =:vcNote and tbResourceRote ";
   hql += (pidIsNull ? " is null" : " is not null");
   Map<String, Object> paramMap = new HashMap<String, Object>();
   paramMap.put("vcNote", vcNote);
   return resourceRoteDao.get(hql, paramMap);
 }
  /**
   * <br>
   * Created on: 2013-11-12 下午03:53:46
   *
   * @return
   */
  public List<ViewTreeResourceRote> getAllTreeNodes() {
    String hql = "from TbResourceRote";
    List<TbResourceRote> list = resourceRoteDao.find(hql, null);
    List<ViewTreeResourceRote> vList = new ArrayList<ViewTreeResourceRote>();
    if (!DataTools.isEmpty(list))
      for (TbResourceRote t : list) {
        ViewTreeResourceRote vm = new ViewTreeResourceRote();
        BeanUtils.copyProperties(t, vm);
        vm.setId(t.getNmResourceRoteid());
        TbResourceRote st = t.getTbResourceRote();
        if (!DataTools.isEmpty(st)) vm.setIntPRRId(st.getNmResourceRoteid());

        setAttributes(t, vm);
        vList.add(vm);
      }

    return vList;
  }
 /**
  * <br>
  * Created on: 2013-11-12 上午11:59:27
  *
  * @param rote
  */
 public void addResourceRote(TbResourceRote rote) {
   resourceRoteDao.saveOrUpdate(rote);
 }