Package com.jeecms.cms.entity.main

Examples of com.jeecms.cms.entity.main.CmsGroup


    String hql = "from CmsGroup bean where bean.regDef=true";
    return (CmsGroup) findUnique(hql);
  }

  public CmsGroup findById(Integer id) {
    CmsGroup entity = get(id);
    return entity;
  }
View Full Code Here


    getSession().save(bean);
    return bean;
  }

  public CmsGroup deleteById(Integer id) {
    CmsGroup entity = super.get(id);
    if (entity != null) {
      getSession().delete(entity);
    }
    return entity;
  }
View Full Code Here

    return dao.getList();
  }

  @Transactional(readOnly = true)
  public CmsGroup findById(Integer id) {
    CmsGroup entity = dao.findById(id);
    return entity;
  }
View Full Code Here

    return bean;
  }

  public CmsGroup update(CmsGroup bean) {
    Updater<CmsGroup> updater = new Updater<CmsGroup>(bean);
    CmsGroup entity = dao.updateByUpdater(updater);
    return entity;
  }
View Full Code Here

    }
    return bean;
  }

  public CmsGroup deleteById(Integer id) {
    CmsGroup bean = dao.deleteById(id);
    return bean;
  }
View Full Code Here

  private String channelsEditJson(Integer groupId, Integer siteId,Integer type,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) {
    List<Channel> channelList = channelMng.getTopList(siteId, false);
    CmsGroup group = manager.findById(groupId);
    model.addAttribute("channelList", channelList);
    if(type.equals(1)){
      model.addAttribute("channelIds", group.getViewChannelIds(siteId));
    }else{
      model.addAttribute("channelIds", group.getContriChannelIds(siteId));
    }
    response.setHeader("Cache-Control", "no-cache");
    response.setContentType("text/json;charset=UTF-8");
    return "group/channels_edit";
  }
View Full Code Here

  private boolean vldExist(Integer id, WebErrors errors) {
    if (errors.ifNull(id, "id")) {
      return true;
    }
    CmsGroup entity = manager.findById(id);
    if (errors.ifNotExist(entity, CmsGroup.class, id)) {
      return true;
    }
    return false;
  }
View Full Code Here

    bean.setHasContent(model.getHasContent());
    bean.init();
    dao.save(bean);
    channelExtMng.save(ext, bean);
    channelTxtMng.save(txt, bean);
    CmsGroup g;
    if (viewGroupIds != null && viewGroupIds.length > 0) {
      for (Integer gid : viewGroupIds) {
        g = cmsGroupMng.findById(gid);
        bean.addToViewGroups(g);
      }
View Full Code Here

    for (CmsGroup g : bean.getViewGroups()) {
      g.getViewChannels().remove(bean);
    }
    bean.getViewGroups().clear();
    if (viewGroupIds != null && viewGroupIds.length > 0) {
      CmsGroup g;
      for (Integer gid : viewGroupIds) {
        g = cmsGroupMng.findById(gid);
        bean.addToViewGroups(g);
      }
    }
    // 更新投稿会员组关联
    for (CmsGroup g : bean.getContriGroups()) {
      g.getContriChannels().remove(bean);
    }
    bean.getContriGroups().clear();
    if (contriGroupIds != null && contriGroupIds.length > 0) {
      CmsGroup g;
      for (Integer gid : contriGroupIds) {
        g = cmsGroupMng.findById(gid);
        bean.addToContriGroups(g);
      }
    }
View Full Code Here

    UnifiedUser unifiedUser = unifiedUserMng.save(username, email,
        password, ip);
    CmsUser user = new CmsUser();
    user.forMember(unifiedUser);

    CmsGroup group = null;
    if (groupId != null) {
      group = cmsGroupMng.findById(groupId);
    } else {
      group = cmsGroupMng.getRegDef();
    }
View Full Code Here

TOP

Related Classes of com.jeecms.cms.entity.main.CmsGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.