Package com.dotmarketing.common.db

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


    @Override
    public boolean forceRun() {
        try {
            DotConnect dc=new DotConnect();
            dc.setSQL("select mod_date from field");
            dc.loadResult();
        }
        catch(Exception ex) {
            return true;
        }
        return false;
View Full Code Here


            con=DbConnectionFactory.getDataSource().getConnection();
            con.setAutoCommit(true);
           
            DotConnect dc=new DotConnect();
            dc.setSQL("select expire_date_var,publish_date_var from structure");
            dc.loadResult(con);
        }
        catch(Exception ex) {
            return true;
        }
        finally {
View Full Code Here

        dc.addParam(REINDEX_JOURNAL_PRIORITY_CONTENT_REINDEX);
        dc.addParam(REINDEX_ACTION_REINDEX_OBJECT);
        dc.addParam(folder.getHostId());
        String folderPath = APILocator.getIdentifierAPI().find(folder).getPath();
        dc.addParam(folderPath+"%");
        dc.loadResult();
    }

    @Override
    protected void refreshContentUnderHost(Host host) throws DotDataException {
        String sql = " INSERT INTO dist_reindex_journal(inode_to_index,ident_to_index,priority,dist_action) "+
View Full Code Here

        DotConnect dc = new DotConnect();
        dc.setSQL(sql);
        dc.addParam(REINDEX_JOURNAL_PRIORITY_CONTENT_REINDEX);
        dc.addParam(REINDEX_ACTION_REINDEX_OBJECT);
        dc.addParam(host.getIdentifier());
        dc.loadResult();

        // https://github.com/dotCMS/dotCMS/issues/2229
        sql =   " INSERT INTO dist_reindex_journal(inode_to_index,ident_to_index,priority,dist_action) "+
                " SELECT asset_id, asset_id, ?, ? " +
                " FROM permission_reference "+
View Full Code Here

                " WHERE reference_id=?";
        dc.setSQL(sql);
        dc.addParam(REINDEX_JOURNAL_PRIORITY_CONTENT_REINDEX);
        dc.addParam(REINDEX_ACTION_REINDEX_OBJECT);
        dc.addParam(host.getIdentifier());
        dc.loadResult();
    }

    @Override
    protected void setIndexationEnabled(boolean indexationEnabled) {
      Config.setProperty("DIST_INDEXATION_ENABLED", Boolean.FALSE);
View Full Code Here

    db.addParam(asset.getBundleId());
    db.addParam(asset.getAssetId());
    db.addParam(asset.getAssetType());
    db.addParam(asset.getPushDate());
    db.addParam(asset.getEnvironmentId());
    db.loadResult();
  }

  @Override
  public void deletePushedAssets(String bundleId, String environmentId)
      throws DotDataException {
View Full Code Here

      throws DotDataException {
    final DotConnect db = new DotConnect();
    db.setSQL(DELETE_ASSETS_BY_BUNDLE_ENV);
    db.addParam(bundleId);
    db.addParam(environmentId);
    db.loadResult();

  }

  @Override
  public void deletePushedAssets(String assetId)
View Full Code Here

  public void deletePushedAssets(String assetId)
      throws DotDataException {
    final DotConnect db = new DotConnect();
    db.setSQL(DELETE_ASSETS_BY_ASSET_ID);
    db.addParam(assetId);
    db.loadResult();

  }

  @Override
  public void deletePushedAssetsByEnvironment(String environmentId)
View Full Code Here

  public void deletePushedAssetsByEnvironment(String environmentId)
      throws DotDataException {
    final DotConnect db = new DotConnect();
    db.setSQL(DELETE_ASSETS_BY_ENVIRONMENT_ID);
    db.addParam(environmentId);
    db.loadResult();

  }

  @Override
  public List<PushedAsset> getPushedAssets(String bundleId, String environmentId)
View Full Code Here

  @Override
  public void deleteAllPushedAssets() throws DotDataException {
    final DotConnect db = new DotConnect();
    db.setSQL(DELETE_ALL_ASSETS);
    db.loadResult();
  }

  @Override
  public List<PushedAsset> getPushedAssets(String assetId)
      throws DotDataException {
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.