Package com.dotmarketing.db

Examples of com.dotmarketing.db.HibernateUtil.load()


      try {
        dh.setQuery(
            "from inode in class com.dotmarketing.portlets.mailinglists.model.MailingList where type='mailing_list' and title = ? and user_id=? and public_list = " + com.dotmarketing.db.DbConnectionFactory.getDBTrue());
        dh.setParam(title);
        dh.setParam(WebKeys.MAILING_LIST_SYSTEM);
        MailingList ml =  (MailingList) dh.load();

        if(!InodeUtils.isSet(ml.getInode())){
          ml = new MailingList();
          ml.setUserId(WebKeys.MAILING_LIST_SYSTEM);
          ml.setTitle(title);
View Full Code Here


    WorkflowTask task = cache.getTask(contentlet);
    if (task == null) {
      final HibernateUtil hu = new HibernateUtil(WorkflowTask.class);
      hu.setQuery("from workflow_task in class com.dotmarketing.portlets.workflows.model.WorkflowTask where webasset = ?");
      hu.setParam(contentlet.getIdentifier());
      task = (WorkflowTask) hu.load();
      if (task != null) {
        cache.addTask(contentlet, task);
      }
    }
    return task;
View Full Code Here

  public WorkflowComment findWorkFlowCommentById(String id) throws DotDataException {
    final HibernateUtil hu = new HibernateUtil(WorkflowComment.class);
    hu.setQuery("from workflow_comment in class com.dotmarketing.portlets.workflows.model.WorkflowComment where id = ?");
    hu.setParam(id);
    return (WorkflowComment) hu.load();
  }

  @SuppressWarnings("unchecked")
  public List<WorkflowComment> findWorkFlowComments(WorkflowTask task) throws DotDataException {
    final HibernateUtil hu = new HibernateUtil(WorkflowComment.class);
View Full Code Here

  public WorkflowHistory findWorkFlowHistoryById(String id) throws DotDataException {
    final HibernateUtil hu = new HibernateUtil(WorkflowHistory.class);
    hu.setQuery("from workflow_history in class com.dotmarketing.portlets.workflows.model.WorkflowHistory where id = ?");
    hu.setParam(id);
    return (WorkflowHistory) hu.load();
  }

  public WorkflowTask findWorkFlowTaskById(String id) throws DotDataException {
    final HibernateUtil hu = new HibernateUtil(WorkflowTask.class);
    hu.setQuery("from workflow_task in class com.dotmarketing.portlets.workflows.model.WorkflowTask where id = ?");
View Full Code Here

  public WorkflowTask findWorkFlowTaskById(String id) throws DotDataException {
    final HibernateUtil hu = new HibernateUtil(WorkflowTask.class);
    hu.setQuery("from workflow_task in class com.dotmarketing.portlets.workflows.model.WorkflowTask where id = ?");
    hu.setParam(id);
    return (WorkflowTask) hu.load();
  }

  @SuppressWarnings("unchecked")
  public List<IFileAsset> findWorkflowTaskFiles(WorkflowTask task) throws DotDataException {
    final HibernateUtil hu = new HibernateUtil(File.class);
View Full Code Here

    l = lc.get(layoutId);
    if(l == null || !InodeUtils.isSet(l.getId())){
      HibernateUtil hu = new HibernateUtil(Layout.class);
      hu.setQuery("from com.dotmarketing.business.Layout where id = ?");
      hu.setParam(layoutId);
      l = (Layout)hu.load();
   
      if(l != null && InodeUtils.isSet(l.getId())){
        populatePortlets(l);
        lc.add(layoutId, l);
      }
View Full Code Here

    Layout l = null;

    HibernateUtil hu = new HibernateUtil(Layout.class);
    hu.setQuery("from com.dotmarketing.business.Layout where id = ?");
    hu.setParam(layoutId);
    l = (Layout)hu.load();
 
    return l;
  }
  /* (non-Javadoc)
   * @see com.dotmarketing.business.LayoutFactory#removeLayout(com.dotmarketing.business.Layout)
View Full Code Here

  protected Layout findLayoutByName(String name) throws DotDataException {

    HibernateUtil hu = new HibernateUtil(Layout.class);
    hu.setQuery("from com.dotmarketing.business.Layout where layout_name = ?");
    hu.setParam(name);
    return (Layout)hu.load();
 
  }
 
}
View Full Code Here

  }*/

  public static final Recipient getRecipient(String id) {
    HibernateUtil dh = new HibernateUtil(Recipient.class);
    try {
      return (Recipient) dh.load(id);
    } catch (DotHibernateException e) {
      Logger.error(RecipientFactory.class, e.getMessage(),e);
    }
    return null;
  }
View Full Code Here

  }*/
  public static final Click getClick(String id) {
    HibernateUtil dh = new HibernateUtil(Click.class);
    Click click ;
    try {
      click = (Click) dh.load(id);
    } catch (DotHibernateException e) {
      Logger.error(ClickFactory.class, "Unable to get object", e);
      throw new DotRuntimeException(e.getMessage(), e);
    }
    return click;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.