Package railo.runtime.exp

Examples of railo.runtime.exp.DatabaseException


              dc.getConnection().setTransactionIsolation(isolation);
                    transConn=dc;
          }
          else if(!transConn.equals(dc)) {
                  if(QOQ_DATASOURCE_NAME.equalsIgnoreCase(ds.getName())) return dc;
            throw new DatabaseException(
                "can't use different connections inside a transaction",null,null,dc);
          }
                else if(dc.getConnection().getAutoCommit()) {
                    dc.getConnection().setAutoCommit(false);
                }
View Full Code Here


                        if(isolation!=Connection.TRANSACTION_NONE)
                  dc.getConnection().setTransactionIsolation(isolation);
                        transConn=dc;
            }
            else*/
              throw new DatabaseException(
                "can't use transaction for datasource and orm at the same time",null,null,null);
          }
            } catch (SQLException e) {
               ExceptionHandler.printStackTrace(e);
            }
View Full Code Here

        return new DatabaseException(message,null,null,null);
    }
   
    @Override
    public PageException createDatabaseException(String message, String detail) {
        return new DatabaseException(message,detail,null,null);
    }
View Full Code Here

      try {
        transConn.getConnection().rollback();
        //transConn.setAutoCommit(true);
      }
      catch (SQLException e) {
        throw new DatabaseException(e,transConn);
      }
      //transConn=null;
    }
  }
View Full Code Here

        return new DatabaseException(message,detail,null,null);
    }
   
    @Override
    public PageException createDatabaseException(String message, SQL sql) {
        return new DatabaseException(message,null,sql,null);
    }
View Full Code Here

    if(transConn!=null) {
      try {
        transConn.getConnection().setSavepoint();
      }
      catch (SQLException e) {
        throw new DatabaseException(e,transConn);
      }
    }
  }
View Full Code Here

      try {
        transConn.getConnection().commit();
        //transConn.setAutoCommit(true);
      }
      catch (SQLException e) {
        throw new DatabaseException(e,transConn);
      }
      //transConn=null;
    }
  }
View Full Code Here

      sql.setSQLString(strSQL);
      return _execute(pc, sql, maxrows, fetchsize, timeout,stopwatch,tables,isUnion);
     
    }
      catch(ParseException e) {
        throw  new DatabaseException(e.getMessage(),null,sql,null);
      }
   
    }
View Full Code Here

                    DBUtil.setAutoCommitEL(conn,true);
                  }
           
        } 
              catch (SQLException e) {
                  DatabaseException de = new DatabaseException("there is a problem to execute sql statement on query",null,sql,null);
                  de.setDetail(e.getMessage());
                  throw de;
              }
 
        }
        finally {
View Full Code Here

    target.setSql(sql);
     
      for(int i=0;i<arrSelects.length;i++) {
        arrSelects[i].getFroms();
        Column[] froms = arrSelects[i].getFroms();
        if(froms.length>1) throw new DatabaseException("can only work with single tables yet",null,sql,null);
        executeSingle(pc,arrSelects[i],getSingleTable(pc, froms[0]),target,arrSelects.length>1?-1:maxrows,sql,
            orders.length>0);
      }
     
  // Order By 
View Full Code Here

TOP

Related Classes of railo.runtime.exp.DatabaseException

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.