Examples of loadObjectResults()


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

      DotConnect dc = new DotConnect();
        dc.setSQL( "select 1 from user_tables where table_name = 'PUBLISHING_BUNDLE'" );
        StringBuilder query = new StringBuilder();

        try {
      List<Map<String, Object>> res = dc.loadObjectResults();
      if(res.isEmpty()) {
        query.append("create table publishing_bundle(id varchar2(36) NOT NULL  primary key,name varchar2(255) NOT NULL,publish_date TIMESTAMP,expire_date TIMESTAMP,owner varchar2(100));\n");
        query.append("create table publishing_bundle_environment(id varchar2(36) NOT NULL primary key,bundle_id varchar2(36) NOT NULL,environment_id varchar2(36) NOT NULL);\n");
        query.append("alter table publishing_bundle_environment add constraint FK_bundle_id foreign key (bundle_id) references publishing_bundle(id);\n");
        query.append("alter table publishing_bundle_environment add constraint FK_environment_id foreign key (environment_id) references publishing_environment(id);\n");
View Full Code Here

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

    DotConnect dc = new DotConnect();
    dc.setSQL(SELECT_ASSETS_BY_BUNDLE_ENV);
    dc.addParam(bundleId);
    dc.addParam(environmentId);

    List<Map<String, Object>> res = dc.loadObjectResults();

    for(Map<String, Object> row : res){
      PushedAsset asset = PublisherUtil.getPushedAssetByMap(row);
      assets.add(asset);
    }
View Full Code Here

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

    DotConnect dc = new DotConnect();
    dc.setSQL(SELECT_ASSETS_BY_ASSET_ID);
    dc.addParam(assetId);

    List<Map<String, Object>> res = dc.loadObjectResults();

    for(Map<String, Object> row : res){
      PushedAsset asset = PublisherUtil.getPushedAssetByMap(row);
      assets.add(asset);
    }
View Full Code Here

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

    DotConnect dc = new DotConnect();
    dc.setSQL(SELECT_ASSETS_BY_ENV_ID);
    dc.addParam(environmentId);

    List<Map<String, Object>> res = dc.loadObjectResults();

    for(Map<String, Object> row : res){
      PushedAsset asset = PublisherUtil.getPushedAssetByMap(row);
      assets.add(asset);
    }
View Full Code Here

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

  @Override
  public List<Environment> getEnvironments() throws DotDataException {
    List<Environment> environments = new ArrayList<Environment>();
    DotConnect dc = new DotConnect();
    dc.setSQL(SELECT_ALL_ENVIRONMENTS);
    List<Map<String, Object>> res = dc.loadObjectResults();

    for(Map<String, Object> row : res){
      Environment environment = PublisherUtil.getEnvironmentByMap(row);
      environments.add(environment);
    }
View Full Code Here

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

  @Override
  public List<Environment> getEnvironmentsWithServers() throws DotDataException {
    List<Environment> environments = new ArrayList<Environment>();
    DotConnect dc = new DotConnect();
    dc.setSQL(SELECT_ENVIRONMENTS_WITH_SERVERS);
    List<Map<String, Object>> res = dc.loadObjectResults();

    for(Map<String, Object> row : res){
      Environment environment = PublisherUtil.getEnvironmentByMap(row);
      environments.add(environment);
    }
View Full Code Here

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

  @Override
  public Environment getEnvironmentById(String id) throws DotDataException {
    DotConnect dc = new DotConnect();
    dc.setSQL(SELECT_ENVIRONMENT_BY_ID);
    dc.addParam(id);
    List<Map<String, Object>> res = dc.loadObjectResults();
    Environment e = null;

    if(res!=null && !res.isEmpty()) {
      Map<String, Object> row = res.get(0);
      e = PublisherUtil.getEnvironmentByMap(row);
View Full Code Here

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

        dc.setSQL( SELECT_UNSEND_BUNDLES );
        dc.addParam( userId );
        dc.setMaxRows( limit );
        dc.setStartRow( offset );

        List<Map<String, Object>> res = dc.loadObjectResults();

        for ( Map<String, Object> row : res ) {
            Bundle bundle = PublisherUtil.getBundleByMap( row );
            bundles.add( bundle );
        }
View Full Code Here

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

public class AssetUtil {
    public static void assertDeleted(String inode, String identifier, String type) throws Exception {
        DotConnect dc=new DotConnect();
        dc.setSQL("select * from identifier where id=?");
        dc.addParam(identifier);
        assertEquals(0, dc.loadObjectResults().size());
       
        dc.setSQL("select * from inode where inode=?");
        dc.addParam(inode);
        assertEquals(0, dc.loadObjectResults().size());
       
View Full Code Here

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

        dc.addParam(identifier);
        assertEquals(0, dc.loadObjectResults().size());
       
        dc.setSQL("select * from inode where inode=?");
        dc.addParam(inode);
        assertEquals(0, dc.loadObjectResults().size());
       
        String vinfo=UtilMethods.getVersionInfoTableName(type);
        dc.setSQL("select * from "+vinfo+" where identifier=? or working_inode=? or live_inode=?");
        dc.addParam(identifier);
        dc.addParam(inode);
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.