DummyStatement.java 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. package me.km.databank;
  2. import java.sql.Connection;
  3. import java.sql.ResultSet;
  4. import java.sql.SQLException;
  5. import java.sql.SQLWarning;
  6. import java.sql.Statement;
  7. public class DummyStatement implements Statement
  8. {
  9. @Override
  10. public ResultSet executeQuery(String sql) throws SQLException
  11. {
  12. throw new SQLException("Dummy Handler");
  13. }
  14. @Override
  15. public int executeUpdate(String sql) throws SQLException
  16. {
  17. throw new SQLException("Dummy Handler");
  18. }
  19. @Override
  20. public void close() throws SQLException
  21. {
  22. throw new SQLException("Dummy Handler");
  23. }
  24. @Override
  25. public int getMaxFieldSize() throws SQLException
  26. {
  27. throw new SQLException("Dummy Handler");
  28. }
  29. @Override
  30. public void setMaxFieldSize(int max) throws SQLException
  31. {
  32. throw new SQLException("Dummy Handler");
  33. }
  34. @Override
  35. public int getMaxRows() throws SQLException
  36. {
  37. throw new SQLException("Dummy Handler");
  38. }
  39. @Override
  40. public void setMaxRows(int max) throws SQLException
  41. {
  42. throw new SQLException("Dummy Handler");
  43. }
  44. @Override
  45. public void setEscapeProcessing(boolean enable) throws SQLException
  46. {
  47. throw new SQLException("Dummy Handler");
  48. }
  49. @Override
  50. public int getQueryTimeout() throws SQLException
  51. {
  52. throw new SQLException("Dummy Handler");
  53. }
  54. @Override
  55. public void setQueryTimeout(int seconds) throws SQLException
  56. {
  57. throw new SQLException("Dummy Handler");
  58. }
  59. @Override
  60. public void cancel() throws SQLException
  61. {
  62. throw new SQLException("Dummy Handler");
  63. }
  64. @Override
  65. public SQLWarning getWarnings() throws SQLException
  66. {
  67. throw new SQLException("Dummy Handler");
  68. }
  69. @Override
  70. public void clearWarnings() throws SQLException
  71. {
  72. throw new SQLException("Dummy Handler");
  73. }
  74. @Override
  75. public void setCursorName(String name) throws SQLException
  76. {
  77. throw new SQLException("Dummy Handler");
  78. }
  79. @Override
  80. public boolean execute(String sql) throws SQLException
  81. {
  82. throw new SQLException("Dummy Handler");
  83. }
  84. @Override
  85. public ResultSet getResultSet() throws SQLException
  86. {
  87. throw new SQLException("Dummy Handler");
  88. }
  89. @Override
  90. public int getUpdateCount() throws SQLException
  91. {
  92. throw new SQLException("Dummy Handler");
  93. }
  94. @Override
  95. public boolean getMoreResults() throws SQLException
  96. {
  97. throw new SQLException("Dummy Handler");
  98. }
  99. @Override
  100. public void setFetchDirection(int direction) throws SQLException
  101. {
  102. throw new SQLException("Dummy Handler");
  103. }
  104. @Override
  105. public int getFetchDirection() throws SQLException
  106. {
  107. throw new SQLException("Dummy Handler");
  108. }
  109. @Override
  110. public void setFetchSize(int rows) throws SQLException
  111. {
  112. throw new SQLException("Dummy Handler");
  113. }
  114. @Override
  115. public int getFetchSize() throws SQLException
  116. {
  117. throw new SQLException("Dummy Handler");
  118. }
  119. @Override
  120. public int getResultSetConcurrency() throws SQLException
  121. {
  122. throw new SQLException("Dummy Handler");
  123. }
  124. @Override
  125. public int getResultSetType() throws SQLException
  126. {
  127. throw new SQLException("Dummy Handler");
  128. }
  129. @Override
  130. public void addBatch(String sql) throws SQLException
  131. {
  132. throw new SQLException("Dummy Handler");
  133. }
  134. @Override
  135. public void clearBatch() throws SQLException
  136. {
  137. throw new SQLException("Dummy Handler");
  138. }
  139. @Override
  140. public int[] executeBatch() throws SQLException
  141. {
  142. throw new SQLException("Dummy Handler");
  143. }
  144. @Override
  145. public Connection getConnection() throws SQLException
  146. {
  147. throw new SQLException("Dummy Handler");
  148. }
  149. @Override
  150. public boolean getMoreResults(int current) throws SQLException
  151. {
  152. throw new SQLException("Dummy Handler");
  153. }
  154. @Override
  155. public ResultSet getGeneratedKeys() throws SQLException
  156. {
  157. throw new SQLException("Dummy Handler");
  158. }
  159. @Override
  160. public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
  161. {
  162. throw new SQLException("Dummy Handler");
  163. }
  164. @Override
  165. public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
  166. {
  167. throw new SQLException("Dummy Handler");
  168. }
  169. @Override
  170. public int executeUpdate(String sql, String[] columnNames) throws SQLException
  171. {
  172. throw new SQLException("Dummy Handler");
  173. }
  174. @Override
  175. public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
  176. {
  177. throw new SQLException("Dummy Handler");
  178. }
  179. @Override
  180. public boolean execute(String sql, int[] columnIndexes) throws SQLException
  181. {
  182. throw new SQLException("Dummy Handler");
  183. }
  184. @Override
  185. public boolean execute(String sql, String[] columnNames) throws SQLException
  186. {
  187. throw new SQLException("Dummy Handler");
  188. }
  189. @Override
  190. public int getResultSetHoldability() throws SQLException
  191. {
  192. throw new SQLException("Dummy Handler");
  193. }
  194. @Override
  195. public boolean isClosed() throws SQLException
  196. {
  197. throw new SQLException("Dummy Handler");
  198. }
  199. @Override
  200. public void setPoolable(boolean poolable) throws SQLException
  201. {
  202. }
  203. @Override
  204. public boolean isPoolable() throws SQLException
  205. {
  206. throw new SQLException("Dummy Handler");
  207. }
  208. @Override
  209. public void closeOnCompletion() throws SQLException
  210. {
  211. throw new SQLException("Dummy Handler");
  212. }
  213. @Override
  214. public boolean isCloseOnCompletion() throws SQLException
  215. {
  216. throw new SQLException("Dummy Handler");
  217. }
  218. @Override
  219. public <T> T unwrap(Class<T> iface) throws SQLException
  220. {
  221. throw new SQLException("Dummy Handler");
  222. }
  223. @Override
  224. public boolean isWrapperFor(Class<?> iface) throws SQLException
  225. {
  226. throw new SQLException("Dummy Handler");
  227. }
  228. }