1 16 17 package org.springframework.jdbc; 18 19 import java.sql.SQLException ; 20 21 import org.springframework.dao.InvalidDataAccessResourceUsageException; 22 23 35 public class InvalidResultSetAccessException extends InvalidDataAccessResourceUsageException { 36 37 private String sql; 38 39 40 46 public InvalidResultSetAccessException(String task, String sql, SQLException ex) { 47 super(task + "; invalid ResultSet access for SQL [" + sql + "]", ex); 48 this.sql = sql; 49 } 50 51 55 public InvalidResultSetAccessException(SQLException ex) { 56 super(ex.getMessage(), ex); 57 } 58 59 60 63 public SQLException getSQLException() { 64 return (SQLException ) getCause(); 65 } 66 67 71 public String getSql() { 72 return sql; 73 } 74 75 } 76 | Popular Tags |