Examples of loadResults()


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

            con = DbConnectionFactory.getConnection();
            con.setAutoCommit(false);
            mutex = new ClusterMutex(con);
            mutex.lockTable();
            dc.setSQL("SELECT max(id) as max FROM dist_process");
            ArrayList<Map<String, String>> ret = dc.loadResults(con);
            if (ret != null && ret.size() > 0
                    && UtilMethods.isSet(ret.get(0).get("max"))) {

                Long max = Long.parseLong(ret.get(0).get("max"));
View Full Code Here

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

    @Override
    protected long recordsLeftToIndexForServer(Connection conn) throws DotDataException {
        DotConnect dc = new DotConnect();
        dc.setSQL("select count(*) as count from dist_reindex_journal");
        List<Map<String, String>> results = results = dc.loadResults(conn);
        String c = results.get(0).get("count");
        return Long.parseLong(c);
    }

    @Override
View Full Code Here

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

            Logger.warn(this, ex.getMessage());
        }
    }
    addWorkFlowTaskIndexes();
    dc.setSQL(workflowtask_fileasset_relations);
    List<Map<String, String>> relations = dc.loadResults();
      for(Map<String,String> relation : relations){
        String fileInode = relation.get("child");
        String workflowTaskId = relation.get("parent")
        String uuid = UUIDGenerator.generateUuid();
      dc.setSQL("insert into workflowtask_files(id,workflowtask_id,file_inode) values(?,?,?)");
View Full Code Here

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

        } catch(Exception ex) {
            Logger.warn(this, ex.getMessage());
        }
    }
    dc.setSQL(workflowtask_workflowcomment_relations);
    List<Map<String, String>> relations = dc.loadResults();
      for(Map<String,String> relation : relations){
        String workflowCommentId = relation.get("child");
        String workflowTaskId = relation.get("parent")
        dc.setSQL("UPDATE workflow_comment set workflowtask_id = ? where id = ?");
      dc.addParam(workflowTaskId);
View Full Code Here

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

            Logger.warn(this, ex.getMessage());
        }
    }
   
    dc.setSQL(workflowtask_workflowhistory_relations);
    List<Map<String, String>> relations = dc.loadResults();
      for(Map<String,String> relation : relations){
        String workflowHistoryInode = relation.get("child");
        String workflowTaskInode = relation.get("parent")
        dc.setSQL("UPDATE workflow_history set workflowtask_id = ? where id = ?");
      dc.addParam(workflowTaskInode);
View Full Code Here

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

        //Verify if we already have a contentlet version for the SYSTEM_HOST contentlet
        dc = new DotConnect();
        dc.setSQL( "select identifier from contentlet_version_info where identifier = ?" );
        dc.addParam( Host.SYSTEM_HOST );
        ArrayList<Map<String, String>> versionsResults = dc.loadResults();

        //Ok, we didn't found a version for this SYSTEM_HOST contentlet, so we need to create one
        if ( versionsResults == null || versionsResults.isEmpty() ) {

            //Getting the SYSTEM_HOST contentlet
View Full Code Here

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

        if ( versionsResults == null || versionsResults.isEmpty() ) {

            //Getting the SYSTEM_HOST contentlet
            dc = new DotConnect();
            dc.setSQL( "select inode, language_id from contentlet where title = 'System Host'" );
            ArrayList<Map<String, String>> results = dc.loadResults();

            if ( results != null && results.size() > 0 ) {

                String inode = results.get( 0 ).get( "inode" );
                String languageId = results.get( 0 ).get( "language_id" );
View Full Code Here

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

           + "parent in(select inode from structure)";
    dc.executeStatement(addStructure);
    dc.executeStatement(addFK);
   
    dc.setSQL(containerQuery);
    List<Map<String, String>> treeResults = dc.loadResults();
    for(Map<String,String> tree : treeResults){
      String stInode = tree.get("parent");
      String containerInode = tree.get("child");
      dc.setSQL("UPDATE containers set structure_inode = ? where inode = ?");
      dc.addParam(stInode);
View Full Code Here

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

   
    dc.executeStatement(addtemplate);
    dc.executeStatement(addFK);
   
    dc.setSQL(htmlQuery);
    List<Map<String, String>> treeResults = dc.loadResults();
    for(Map<String,String> tree : treeResults){
      String templateId = tree.get("parent");
      String htmlpageInode = tree.get("child");
      dc.setSQL("UPDATE htmlpage set template_id = ? where inode = ?");
      dc.addParam(templateId);
View Full Code Here

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

    @Override
    protected List<IndexJournal> viewReindexJournalData() throws DotDataException {
        DotConnect dc = new DotConnect();
        dc.setSQL("select count(*) as mycount,serverid,priority from dist_reindex_journal group by serverid,priority order by serverid, priority");
        List<IndexJournal> journalList = new ArrayList<IndexJournal>();
        List<Map<String, String>> results = dc.loadResults();
        for (Map<String, String> r : results) {
            IndexJournal index = new IndexJournal(r.get("serverid"),new Integer(r.get("mycount")),new Long(r.get("priority")));
            journalList.add(index);
        }
        return journalList;
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.