Examples of loadObjectResults()


Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

    }
    if(query.getLimit() > 0){
      dc.setStartRow(query.getLimit());
    }
    String blank= "";
    List<Map<String, Object>> dbrows = dc.loadObjectResults();
    for (Map<String, Object> row : dbrows) {
      Map<String, Serializable> m = new HashMap<String, Serializable>();
       PermissionableProxy permDummy= new PermissionableProxy();
       permDummy.setPermissionByIdentifier(isPermissionsByIdentifier);
       permDummy.setInode(row.get("inode").toString());
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

       
        String inodesToDelete = "select inode from file_asset where "+condition;
        DotConnect dc = new DotConnect();
        dc.setSQL(inodesToDelete);
        dc.addParam(assetsOlderThan);
        for(Map<String,Object> inodeMap : dc.loadObjectResults()) {
            String inode=inodeMap.get("inode").toString();
            java.io.File fileFolderPath = new java.io.File(
                    APILocator.getFileAPI().getRealAssetPath() +
                    java.io.File.separator + inode.substring(0, 1) +
                    java.io.File.separator + inode.substring(1, 2));
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

        DotConnect dc = new DotConnect();
            String minIdateSQL = "select idate from inode order by idate";
           
            dc.setSQL(minIdateSQL);
            dc.setMaxRows(1);
          List<Map<String, Object>> map =  dc.loadObjectResults();
          Date d = (Date) map.get(0).get("idate");
          if(d !=null)
            runDate.setTime(d);
        }
        catch(Exception e){
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

        dc.addParam(endDate);
        dc.addParam(host.getIdentifier());
        dc.addParam(likepattern);
       
        try {
            for (Map<String,Object> row : dc.loadObjectResults())
                ret.add((String)row.get("pident"));
        } catch (DotDataException e) {
            Logger.error(HTMLPageFactoryImpl.class,e.getMessage(),e);
        }
       
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

      DotConnect db = new DotConnect();
        db.setSQL("select * from tree where parent = ? or child = ? order by tree_order asc");
        db.addParam(con.getIdentifier());
        db.addParam(con.getIdentifier());

        for(Map<String, Object> relatedEntry : db.loadObjectResults()) {

            String childId = relatedEntry.get("child").toString();
            String parentId = relatedEntry.get("parent").toString();
            String relType=relatedEntry.get("relation_type").toString();
            String order = relatedEntry.get("tree_order").toString();
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

                    String sql = " select distinct id from "+table+" join identifier on (id=identifier) " +
                             " left outer join " + vitable +
                             " on("+table+".identifier="+vitable+".identifier) " +
                             " where working_inode is null";
                    dc.setSQL(sql);
                    List<Map<String, Object>> results = dc.loadObjectResults();
                    for(Map<String, Object> rr : results) {
                        String id=rr.get("id").toString();
                        sql="select inode from "+table+" where identifier=? order by mod_date desc";
                        dc.setSQL(sql);
                        dc.addParam(id);
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

                    for(Map<String, Object> rr : results) {
                        String id=rr.get("id").toString();
                        sql="select inode from "+table+" where identifier=? order by mod_date desc";
                        dc.setSQL(sql);
                        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);
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

                       "   left outer join contentlet_version_info " +
                       "   on (contentlet.identifier=contentlet_version_info.identifier " +
                       "   and contentlet.language_id=contentlet_version_info.lang) " +
                       " where working_inode is null";
                dc.setSQL(sql);
                List<Map<String, Object>> results = dc.loadObjectResults();
                for(Map<String, Object> rr : results) {
                    String id=rr.get("id").toString();
                    Integer langId=Integer.parseInt(rr.get("language_id").toString());
                    sql="select inode from contentlet where identifier=? and language_id=? order by mod_date desc";
                    dc.setSQL(sql);
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

                    Integer langId=Integer.parseInt(rr.get("language_id").toString());
                    sql="select inode from contentlet where identifier=? and language_id=? order by mod_date desc";
                    dc.setSQL(sql);
                    dc.addParam(id);
                    dc.addParam(langId);
                    List<Map<String, Object>> versions = dc.loadObjectResults();
                    String inode=versions.get(0).get("inode").toString();
                    APILocator.getVersionableAPI().setWorking(
                       APILocator.getContentletAPI().find(inode, APILocator.getUserAPI().getSystemUser(), false)
                    );
                    total++;
View Full Code Here

Examples of com.dotmarketing.common.db.DotConnect.loadObjectResults()

                dc.setSQL("SET TRANSACTION ISOLATION LEVEL READ COMMITTED;");
                dc.loadResult();

                dc.setSQL("load_records_to_index @server_id='"+serverId+"', @records_to_fetch=50");
                dc.setForceQuery(true);
                results = dc.loadObjectResults(con);
            } else if(DbConnectionFactory.isH2()) {
                dc.setSQL("call load_records_to_index(?,?)");
                dc.addParam(serverId);
                dc.addParam(50);
                results = dc.loadObjectResults();
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.