Esempio n. 1
0
  public void setEscapeProcessing(boolean enable) throws SQLException {
    Profiler profiler = _profilerPoint.start();

    try {
      _preparedStatement.setEscapeProcessing(enable);
    } finally {
      profiler.finish();
    }
  }
 /**
  * 初始化真正的PreparedStatement,对当前对象的操作全部都设置到真正的PreparedStatement
  *
  * @throws SQLException
  */
 private void prepare() throws SQLException {
   DALFactory dalFactory = DALFactory.getDefault();
   List<Object> values = dalParameters.getValues();
   Map<String, Object> context = new HashMap<String, Object>();
   SQLStruct sqlStruct = dalFactory.getSqlAnalyzer().parse(sql, context);
   SQLInfo sqlInfo = null;
   if (sqlStruct.isCanParse()) {
     sqlInfo =
         dalFactory
             .getSqlAnalyzer()
             .analyse(sql, sqlStruct, values.toArray(new Object[values.size()]), context);
   }
   this.parsePartition(sqlStruct, sqlInfo);
   this.initRealPreparedStatement();
   if (this.maxFieldSize != 0) {
     ps.setMaxFieldSize(maxFieldSize);
   }
   if (this.maxRows != 0) {
     ps.setMaxRows(maxRows);
   }
   if (!this.escapeProcessing) {
     ps.setEscapeProcessing(escapeProcessing);
   }
   if (this.queryTimeout != 0) {
     ps.setQueryTimeout(queryTimeout);
   }
   if (this.cursorName != null) {
     ps.setCursorName(cursorName);
   }
   if (this.fetchDirection != 0) {
     ps.setFetchDirection(fetchDirection);
   }
   if (this.fetchSize != 0) {
     ps.setFetchSize(fetchSize);
   }
   if (!this.poolable) {
     ps.setPoolable(poolable);
   }
   this.dalParameters.initRealPreparedStatement(ps);
 }
 public void setEscapeProcessing(boolean enable) throws SQLException {
   this.escapeProcessing = enable;
   if (ps != null) {
     ps.setEscapeProcessing(enable);
   }
 }
 public void setEscapeProcessing(boolean enable) throws SQLException {
   statement.setEscapeProcessing(enable);
 }
 public void setEscapeProcessing(boolean enable) throws SQLException {
   delegate.setEscapeProcessing(enable);
 }
 @Override
 public void setEscapeProcessing(boolean enable) throws SQLException {
   stmt.setEscapeProcessing(enable);
 }