Package com.jeecms.cms.entity.main

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


@Repository
public class ContentTxtDaoImpl extends HibernateBaseDao<ContentTxt, Integer>
    implements ContentTxtDao {
  public ContentTxt findById(Integer id) {
    ContentTxt entity = get(id);
    return entity;
  }
View Full Code Here


    c.setSite(site);
    ContentExt ext = new ContentExt();
    ext.setTitle(title);
    ext.setAuthor(author);
    ext.setDescription(description);
    ContentTxt t = new ContentTxt();
    t.setTxt(txt);
    ContentType type = contentTypeMng.getDef();
    if (type == null) {
      throw new RuntimeException("Default ContentType not found.");
    }
    Integer typeId = type.getId();
View Full Code Here

    ContentExt ext = new ContentExt();
    ext.setId(id);
    ext.setTitle(title);
    ext.setAuthor(author);
    ext.setDescription(description);
    ContentTxt t = new ContentTxt();
    t.setId(id);
    t.setTxt(txt);
    String[] tagArr = StrUtils.splitAndTrim(tagStr, ",", null);
    contentMng.update(c, ext, t, tagArr, null, null, null, null, null,
        null, null, null, null, channelId, null, null, user, true);
    return FrontUtils.showSuccess(request, model, nextUrl);
  }
View Full Code Here

      CmsAcquisitionHistory history) {
    CmsAcquisition acqu = findById(acquId);
    Content c = new Content();
    c.setSite(acqu.getSite());
    ContentExt cext = new ContentExt();
    ContentTxt ctxt = new ContentTxt();
    cext.setTitle(title);
    ctxt.setTxt(txt);
    Content content = contentMng.save(c, cext, ctxt, null, null, null,
        null, null, null, null, null, null, acqu.getChannel().getId(),
        acqu.getType().getId(), false, acqu.getUser(), false);
    history.setTitle(title);
    history.setContent(content);
View Full Code Here

      return txt;
    }
  }

  public ContentTxt update(ContentTxt txt, Content content) {
    ContentTxt entity = dao.findById(content.getId());
    if (entity == null) {
      entity = save(txt, content);
      content.getContentTxtSet().add(entity);
      return entity;
    } else {
      if (txt.isAllBlank()) {
        content.getContentTxtSet().clear();
        return null;
      } else {
        Updater<ContentTxt> updater = new Updater<ContentTxt>(txt);
        entity = dao.updateByUpdater(updater);
        entity.blankToNull();
        return entity;
      }
    }
  }
View Full Code Here

TOP

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

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.