Package com.dotmarketing.db

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


      Logger.debug(InodeFactory.class, "inode:  " + p.getInode() + "\n");

      dh.setParam(p.getInode());
      dh.setParam(relationType);

      return dh.load();
    } catch (Exception e) {
      Logger.error(InodeFactory.class, "getChildrenClass failed:" + e, e);
      throw new DotRuntimeException(e.toString());
    }
View Full Code Here


    try {
      HibernateUtil dh = new HibernateUtil(c);
      String type = ((Inode) c.newInstance()).getType();
      dh.setQuery("from inode in class " + c.getName() + " where inode.type='"+type+"' and " + condition);
      Logger.debug(InodeFactory.class, "getInodeOfClassByCondition query: " + dh.getQuery());
      return dh.load();
    } catch (Exception e) {
      Logger.warn(InodeFactory.class, "getInodeOfClassByCondition(Class c, String condition) failed:" + e, e);

      // throw new DotRuntimeException(e.toString());
    }
View Full Code Here

      Logger.debug(InodeFactory.class, "inode:  " + p.getInode() + "\n");

      dh.setParam(p.getInode());
      dh.setParam(relationType);

      return dh.load();
    } catch (Exception e) {
      Logger.error(InodeFactory.class, "getChildrenClass failed:" + e, e);
      throw new DotRuntimeException(e.toString());
    }
  }
View Full Code Here

        dh.setParam(tagId);
        dh.setParam(inode);

        TagInode tagInode;
        try {
          tagInode = (TagInode) dh.load();
        }
        catch (Exception ex) {
          tagInode = new TagInode();
        }
        return tagInode;
View Full Code Here

    }
    Trackback tb = null ;
    try {
      HibernateUtil dh = new HibernateUtil();
      dh.setClass(Trackback.class);
      tb =(Trackback) dh.load(id);
    } catch (DotHibernateException e) {
      Logger.error(TrackbackFactory.class, "getTrackBack failed:" + e, e);
    }
    return tb;
  }
View Full Code Here

    if(plugin != null){
      return plugin;
    }
    HibernateUtil hu = new HibernateUtil(Plugin.class);
    try {
      plugin = (Plugin)hu.load(id);
      if(plugin != null && UtilMethods.isSet(plugin.getId())){
        cache.removePlugin(plugin.getId());
        cache.add(plugin);
      }
      return plugin;
View Full Code Here

    }
    HibernateUtil hu = new HibernateUtil(PluginProperty.class);
    hu.setQuery("from PluginProperty where plugin_id = ? and propkey = ?");
    hu.setParam(pluginId);
    hu.setParam(key);
    pluginProp = (PluginProperty)hu.load();
    if(pluginProp != null && UtilMethods.isSet(pluginProp.getPluginId())){
      cache.addProperty(pluginProp);
    }
    return pluginProp;
  }
View Full Code Here

      dh.setQuery(query);
      dh.setParam(parent);
      dh.setParam(child);
      if(relationType != null) dh.setParam(relationType);

      return (Tree) dh.load();
    } catch (Exception e) {
      Logger.warn(TreeFactory.class, "getTree failed:" + e, e);
    }

    return new Tree();
View Full Code Here

      HibernateUtil dh = new HibernateUtil(Tree.class);
      dh.setQuery("from tree in class com.dotmarketing.beans.Tree where child = ? and relation_type = ?");
      dh.setParam(child);
      dh.setParam(relationType);

      return (Tree) dh.load();
    } catch (Exception e) {
      Logger.warn(TreeFactory.class, "getTree failed:" + e, e);
    }

    return new Tree();
View Full Code Here

      HibernateUtil dh = new HibernateUtil(Tree.class);
      dh.setQuery("from tree in class com.dotmarketing.beans.Tree where parent = ? and relation_type = ?");
      dh.setParam(parent.getInode());
      dh.setParam(relationType);

      return (Tree) dh.load();
    } catch (Exception e) {
      Logger.warn(TreeFactory.class, "getTree failed:" + e, e);
    }

    return new Tree();
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.