Package railo.runtime.type.scope.storage.db

Examples of railo.runtime.type.scope.storage.db.SQLExecutor


 
  protected static Struct _loadData(PageContext pc, String datasourceName,String strType,int type, Log log, boolean mxStyle) throws PageException  {
    ConfigImpl config = (ConfigImpl)pc.getConfig();
    DatasourceConnectionPool pool = config.getDatasourceConnectionPool();
    DatasourceConnection dc=pool.getDatasourceConnection(pc,((PageContextImpl)pc).getDataSource(datasourceName),null,null);
    SQLExecutor executor=SQLExecutionFactory.getInstance(dc);
   
   
    Query query;
   
    try {
      if(!dc.getDatasource().isStorage())
        throw new ApplicationException("storage usage for this datasource is disabled, you can enable this in the railo administrator.");
      query = executor.select(pc.getConfig(),pc.getCFID(),pc.getApplicationContext().getName(), dc, type,log, true);
    }
    catch (SQLException se) {
      throw Caster.toPageException(se);
    }
      finally {
View Full Code Here


      PageContext pc = ThreadLocalPageContext.get();// FUTURE change method interface
      DataSource ds;
      if(pc!=null) ds=((PageContextImpl)pc).getDataSource(datasourceName);
      else ds=config.getDataSource(datasourceName);
      dc=pool.getDatasourceConnection(null,ds,null,null);
      SQLExecutor executor=SQLExecutionFactory.getInstance(dc);
      executor.update(config, cfid,appName, dc, getType(), sct,getTimeSpan(),log);
    }
    catch (Throwable t) {
      ScopeContext.error(log, t);
    }
    finally {
View Full Code Here

      PageContext pc = ThreadLocalPageContext.get();// FUTURE change method interface
      DataSource ds;
      if(pc!=null) ds=((PageContextImpl)pc).getDataSource(datasourceName);
      else ds=config.getDataSource(datasourceName);
      dc=pool.getDatasourceConnection(null,ds,null,null);
      SQLExecutor executor=SQLExecutionFactory.getInstance(dc);
      executor.delete(config, cfid,appName, dc, getType(),log);
    }
    catch (Throwable t) {
      ScopeContext.error(log, t);
    }
    finally {
View Full Code Here

   
    DatasourceConnectionPool pool = cwi.getDatasourceConnectionPool();
    try {
      dc=pool.getDatasourceConnection(null,dataSource,null,null);
      Log log=((ConfigImpl)config).getScopeLogger();
      SQLExecutor executor=SQLExecutionFactory.getInstance(dc);
      executor.clean(config, dc, type, engine,this, listener, log);
    }
      finally {
        if(dc!=null) pool.releaseDatasourceConnection(dc);
      }
  }
View Full Code Here

TOP

Related Classes of railo.runtime.type.scope.storage.db.SQLExecutor

Copyright © 2018 www.massapicom. 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.