Revision 45506 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/JDBCUtils.java
JDBCUtils.java | ||
---|---|---|
197 | 197 |
} |
198 | 198 |
} |
199 | 199 |
|
200 |
public static int[] executeBatch(PreparedStatement st, String sql) throws SQLException { |
|
201 |
if( LOGGER.isDebugEnabled() ) { |
|
202 |
LOGGER.debug("["+getConnId(st)+"] executeBatch(pst) SQL= "+ getSQLInfo(st,sql)); |
|
203 |
} |
|
204 |
try { |
|
205 |
return st.executeBatch(); |
|
206 |
} catch(Exception ex) { |
|
207 |
LOGGER.debug("execute batch SQL: " + getSQLInfo(st,sql), ex); |
|
208 |
throw ex; |
|
209 |
} |
|
210 |
} |
|
211 |
|
|
212 |
public static void addBatch(PreparedStatement st, String sql) throws SQLException { |
|
213 |
if( LOGGER.isDebugEnabled() ) { |
|
214 |
LOGGER.debug("["+getConnId(st)+"] addBatch(pst) SQL= "+ getSQLInfo(st,sql)); |
|
215 |
} |
|
216 |
try { |
|
217 |
st.addBatch(); |
|
218 |
} catch(Exception ex) { |
|
219 |
LOGGER.debug("add batch SQL: " + getSQLInfo(st,sql), ex); |
|
220 |
throw ex; |
|
221 |
} |
|
222 |
} |
|
223 |
|
|
200 | 224 |
public static void closeQuietly(Statement st) { |
201 | 225 |
if( LOGGER.isDebugEnabled() ) { |
202 | 226 |
LOGGER.debug("["+getConnId(st)+"] Close statement"); |
Also available in: Unified diff