Package com.jeecms.cms.entity.assist

Examples of com.jeecms.cms.entity.assist.CmsFriendlink


    return dao.countByCtgId(ctgId);
  }

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


    CmsFriendlink entity = dao.findById(id);
    return entity;
  }

  public int updateViews(Integer id) {
    CmsFriendlink link = findById(id);
    if (link != null) {
      link.setViews(link.getViews() + 1);
    }
    return link.getViews();
  }
View Full Code Here

  public void updatePriority(Integer[] ids, Integer[] priorities) {
    if (ids == null || priorities == null || ids.length <= 0
        || ids.length != priorities.length) {
      return;
    }
    CmsFriendlink link;
    for (int i = 0, len = ids.length; i < len; i++) {
      link = findById(ids[i]);
      link.setPriority(priorities[i]);
    }

  }
View Full Code Here

    }

  }

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

  private boolean vldExist(Integer id, Integer siteId, WebErrors errors) {
    if (errors.ifNull(id, "id")) {
      return true;
    }
    CmsFriendlink entity = manager.findById(id);
    if (errors.ifNotExist(entity, CmsFriendlink.class, id)) {
      return true;
    }
    if (!entity.getSite().getId().equals(siteId)) {
      errors.notInSite(CmsFriendlink.class, id);
      return true;
    }
    return false;
  }
View Full Code Here

    return ((Number) getSession().createQuery(hql).setParameter("ctgId",
        ctgId).iterate().next()).intValue();
  }

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

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

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

TOP

Related Classes of com.jeecms.cms.entity.assist.CmsFriendlink

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.