private void initRealPreparedStatement() throws SQLException { Connection con = null; try { con = this.dalConnection.getCurrentConnection(); } catch (DALRunTimeException e) { throw new DALRunTimeException(e.getMessage() + " for sql: " + this.sql); } switch (this.createMethodByCon) { case CREATE_METHOD_BY_CON_S: ps = con.prepareStatement(sql); break; case CREATE_METHOD_BY_CON_S_I: ps = con.prepareStatement(sql, autoGeneratedKeys); break; case CREATE_METHOD_BY_CON_S_$I: ps = con.prepareStatement(sql, columnIndexes); break; case CREATE_METHOD_BY_CON_S_$S: ps = con.prepareStatement(sql, columnNames); break; case CREATE_METHOD_BY_CON_S_I_I: ps = con.prepareStatement(sql, resultSetType, resultSetConcurrency); break; case CREATE_METHOD_BY_CON_S_I_I_I: ps = con.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability); break; } if (ps == null) { throw new DALRunTimeException( "can not create PreparedStatement for dsKey " + DALCurrentStatus.getDsKey()); } }