Package com.dotmarketing.common.db

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


        } catch ( final Exception e ) {
            Logger.error( this.getClass(), e.getMessage(), e );
        }

        return (List<LogMapperRow>) this.convertListToObjects( db.loadObjectResults(), LogMapperRow.class );
    }

    public void updateLogMapper ( LogMapperRow r ) throws DotDataException {
       
        final DotConnect db = new DotConnect();
View Full Code Here


    @Test
    public void findContentlets() throws Exception {
        DotConnect dc=new DotConnect();
        dc.setSQL("select inode from contentlet");
        List<String> inodes=new ArrayList<String>();
        for(Map<String,Object> r : dc.loadObjectResults()) {
            inodes.add((String)r.get("inode"));
        }
       
        List<Contentlet> contentlets = instance.findContentlets(inodes);
       
View Full Code Here

            return new ArrayList<Contentlet>();

        DotConnect dc = new DotConnect();
        dc.setSQL("SELECT inode FROM contentlet WHERE identifier=? order by mod_date desc");
        dc.addObject(identifier.getId());
        List<Map<String,Object>> list=dc.loadObjectResults();
        ArrayList<String> inodes=new ArrayList<String>(list.size());
        for(Map<String,Object> r : list)
            inodes.add(r.get("inode").toString());
        return findContentlets(inodes);
  }
View Full Code Here

        DotConnect dc = new DotConnect();
        dc.setSQL("select inode,category_name,category_key,sort_order,active,keywords,category_velocity_var_name "+
                  " from category join tree on (category.inode = tree.child) where tree.parent = ? "+
                  " order by sort_order, category_name");
        dc.addParam(parent.getCategoryId());
        children = readCatFromDotConnect(dc.loadObjectResults());
     
      try {
        catCache.putChildren(parent, children);
      } catch (DotCacheException e) {
        throw new DotDataException(e.getMessage(), e);
View Full Code Here

        dc.addParam(startDate);
        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

        dc.addParam(startDate);
        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

        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

        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

    @Override
    public List<SiteSearchAudit> findRecentAudits(String jobId, int offset, int limit) throws DotDataException {
        DotConnect dc=new DotConnect();
        dc.setSQL(auditSQL.findrecent);
        auditSQL.setRecentParams(dc, jobId, limit, offset);
        List<Map<String,Object>> results = dc.loadObjectResults();
        List<SiteSearchAudit> recents=new ArrayList<SiteSearchAudit>();
        for (Map<String, Object> map : results) {
            SiteSearchAudit audit=new SiteSearchAudit();
            audit.setAllHosts(DbConnectionFactory.isDBTrue(map.get("all_hosts").toString()));
            audit.setIncremental(DbConnectionFactory.isDBTrue(map.get("incremental").toString()));
View Full Code Here

      //At first try to search in Table Identifier.
      dotConnect.setSQL("SELECT asset_type FROM identifier WHERE id = ?");
      dotConnect.addParam(identifier);

      Connection connection = DbConnectionFactory.getConnection();
      results = dotConnect.loadObjectResults(connection);

      if(!results.isEmpty()){
        assetType = results.get(0).get("asset_type").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.