Package com.dotmarketing.db

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


        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


      dh.setQuery("from multi_tree in class com.dotmarketing.beans.MultiTree where parent1 = ? and parent2 = ? and child = ?");
      dh.setParam(parent1.getInode());
      dh.setParam(parent2.getInode());
      dh.setParam(child.getInode());

      return (MultiTree) dh.load();
    } catch (Exception e) {
            Logger.warn(MultiTreeFactory.class, "getMultiTree failed:" + e, e);
    }
    return new MultiTree();
  }
View Full Code Here

        HibernateUtil dh = new HibernateUtil(Tag.class);

      dh.setQuery("from tag in class com.dotmarketing.tag.model.Tag where tag_id = ?");
        dh.setParam(tagId);

        Tag tag = (Tag) dh.load();

        return tag;
  }

  /**
 
View Full Code Here

      dh.setQuery("from tag in class com.dotmarketing.tag.model.Tag where tag_id = ? and host_id = ?");
        dh.setParam(tagId);
        dh.setParam(hostId);

        Tag tag = (Tag) dh.load();

        return tag;
  }

  /**
 
View Full Code Here

        HibernateUtil dh = new HibernateUtil(Tag.class);

      dh.setQuery("from tag in class com.dotmarketing.tag.model.Tag where tag_id = ?");
        dh.setParam(tagId);

        Tag tag = (Tag) dh.load();

        return tag;
  }
  /**
   * Gets a Tag by a tagId and a hostId.
View Full Code Here

      dh.setQuery("from tag in class com.dotmarketing.tag.model.Tag where tag_id = ? and host_id = ?");
        dh.setParam(tagId);
        dh.setParam(hostId);

        Tag tag = (Tag) dh.load();

        return tag;
  }

  /**
 
View Full Code Here

                        dc.addParam(id);
                        List<Map<String, Object>> versions = dc.loadObjectResults();
                        String inode=versions.get(0).get("inode").toString();
                       
                        HibernateUtil hu=new HibernateUtil(UtilMethods.getVersionableClass(table));
                        Versionable workingVersion=(Versionable) hu.load(inode);
                        APILocator.getVersionableAPI().setWorking(workingVersion);
                       
                        total++;
                    }
                }
View Full Code Here

      // dh.setQuery("from inode in class " + c.getName() + " where ? in
      // inode.parents.elements");
      dh.setParam(inode.getInode());

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

      // dh.setQuery("from inode in class " + c.getName() + " where ? in
      // inode.parents.elements");
      dh.setParam(inode.getInode());

      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(inode);
      dh.setParam(relationType);

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

      return dh.load();
    } catch (Exception e) {
      Logger.error(InodeFactory.class, "getChildrenClass failed:" + e, e);
      throw new DotRuntimeException(e.toString());
    }
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.