Package com.jeecms.cms.entity.main

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


    f.setCacheable(cacheable);
    return find(f, pageNo, pageSize);
  }

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


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

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

        pageNo = 1;
      }
    } catch (NumberFormatException e) {
      return FrontUtils.pageNotFound(request, response, model);
    }
    ContentTag tag = contentTagMng.findById(id);
    if (tag == null) {
      return FrontUtils.pageNotFound(request, response, model);
    }
    model.addAttribute("tag", tag);
    model.addAttribute(FrontUtils.PAGE_NO, pageNo);
View Full Code Here

      if (StringUtils.isBlank(nameStr)) {
        return null;
      }
      String[] names = StringUtils.split(nameStr, ',');
      Set<Integer> set = new HashSet<Integer>();
      ContentTag tag;
      for (String name : names) {
        tag = contentTagMng.findByNameForTag(name);
        if (tag != null) {
          set.add(tag.getId());
        }
      }
      if (set.size() > 0) {
        return set.toArray(new Integer[set.size()]);
      } else {
View Full Code Here

    return page;
  }

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

      return null;
    }
    List<ContentTag> list = new ArrayList<ContentTag>();
    // 用于检查重复
    Set<String> tagSet = new HashSet<String>();
    ContentTag tag;
    for (String name : tagArr) {
      // 检测重复
      for (String t : tagSet) {
        if (t.equalsIgnoreCase(name)) {
          continue;
View Full Code Here

  /**
   * @see ContentTagMng#saveTag(String)
   */
  public ContentTag saveTag(String name) {
    ContentTag tag = findByName(name);
    if (tag != null) {
      tag.setCount(tag.getCount() + 1);
    } else {
      tag = new ContentTag();
      tag.setName(name);
      tag = save(tag);
    }
    return tag;
  }
View Full Code Here

  public List<ContentTag> updateTags(List<ContentTag> tags, String[] tagArr) {
    if (tagArr == null) {
      tagArr = new String[0];
    }
    List<ContentTag> list = new ArrayList<ContentTag>();
    ContentTag bean;
    for (String t : tagArr) {
      bean = null;
      for (ContentTag tag : tags) {
        if (t.equalsIgnoreCase(tag.getName())) {
          bean = tag;
View Full Code Here

    return bean;
  }

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

    return entity;
  }

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

TOP

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

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.