Coverage Report - net.admin4j.jdbc.driver.sql.CallableStatementWrapper40Base
 
Classes in this File Line Coverage Branch Coverage Complexity
CallableStatementWrapper40Base
100%
103/103
N/A
1
 
 1  
 /*
 2  
  * This software is licensed under the Apache License, Version 2.0
 3  
  * (the "License") agreement; you may not use this file except in compliance with
 4  
  * the License.  You may obtain a copy of the License at
 5  
  * 
 6  
  *      http://www.apache.org/licenses/LICENSE-2.0
 7  
  * 
 8  
  * Unless required by applicable law or agreed to in writing, software
 9  
  * distributed under the License is distributed on an "AS IS" BASIS,
 10  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 11  
  * See the License for the specific language governing permissions and
 12  
  * limitations under the License.
 13  
  */
 14  
 package net.admin4j.jdbc.driver.sql;
 15  
 
 16  
 import java.io.InputStream;
 17  
 import java.io.Reader;
 18  
 import java.sql.Blob;
 19  
 import java.sql.CallableStatement;
 20  
 import java.sql.Clob;
 21  
 import java.sql.NClob;
 22  
 import java.sql.RowId;
 23  
 import java.sql.SQLException;
 24  
 import java.sql.SQLXML;
 25  
 
 26  
 import net.admin4j.util.annotate.PackageRestrictions;
 27  
 import net.admin4j.util.annotate.Product;
 28  
 import net.admin4j.util.annotate.ProductDependencies;
 29  
 
 30  
 /**
 31  
  * Wraps a JDBC V3.0 callable statement so specifics can be reported to administrators.
 32  
  * @author D. Ashmore
 33  
  * @since 1.0
 34  
  */
 35  
 @ProductDependencies( {Product.JDBC40} )
 36  
 @PackageRestrictions({"net.admin4j","java","javax"})
 37  
 public abstract class CallableStatementWrapper40Base extends CallableStatementWrapper30Base implements CallableStatement {
 38  
 
 39  
     public CallableStatementWrapper40Base(ConnectionWrapper30Base connection,
 40  
             CallableStatement statement) {
 41  60012
         super(connection, statement);
 42  60012
     }
 43  
     
 44  
     protected CallableStatement getUnderlyingCallableStatement() {
 45  429
         return (CallableStatement)this.getUnderlyingStatement();
 46  
     }
 47  
     
 48  
     public NClob getNClob(int parameterIndex) throws SQLException {
 49  3
         return this.getUnderlyingCallableStatement().getNClob(parameterIndex);
 50  
     }
 51  
 
 52  
     public NClob getNClob(String parameterName) throws SQLException {
 53  3
         return this.getUnderlyingCallableStatement().getNClob(parameterName);
 54  
     }
 55  
 
 56  
     public void setNClob(String parameterName, NClob value) throws SQLException {
 57  3
         this.getUnderlyingCallableStatement().setNClob(parameterName, value);
 58  
 
 59  3
     }
 60  
     
 61  
     public SQLXML getSQLXML(int parameterIndex) throws SQLException {
 62  3
         return this.getUnderlyingCallableStatement().getSQLXML(parameterIndex);
 63  
     }
 64  
 
 65  
     public SQLXML getSQLXML(String parameterName) throws SQLException {
 66  3
         return this.getUnderlyingCallableStatement().getSQLXML(parameterName);
 67  
     }
 68  
     
 69  
     public void setSQLXML(String parameterName, SQLXML xmlObject)
 70  
         throws SQLException {
 71  3
         this.getUnderlyingCallableStatement().setSQLXML(parameterName, xmlObject);
 72  
     
 73  3
     }
 74  
 
 75  
     public RowId getRowId(int parameterIndex) throws SQLException {
 76  3
         return this.getUnderlyingCallableStatement().getRowId(parameterIndex);
 77  
     }
 78  
 
 79  
     public RowId getRowId(String parameterName) throws SQLException {
 80  3
         return this.getUnderlyingCallableStatement().getRowId(parameterName);
 81  
     }
 82  
     
 83  
     public void setRowId(String parameterName, RowId x) throws SQLException {
 84  3
         this.getUnderlyingCallableStatement().setRowId(parameterName, x);
 85  
 
 86  3
     }
 87  
     
 88  
     public void setNString(String parameterName, String value)
 89  
         throws SQLException {
 90  3
         this.getUnderlyingCallableStatement().setNString(parameterName, value);
 91  
     
 92  3
     }
 93  
 
 94  
     public void setNCharacterStream(String parameterName, Reader value,
 95  
             long length) throws SQLException {
 96  3
         this.getUnderlyingCallableStatement().setNCharacterStream(parameterName, value, length);
 97  
 
 98  3
     }
 99  
     
 100  
     public void setClob(String parameterName, Reader reader, long length)
 101  
         throws SQLException {
 102  3
         this.getUnderlyingCallableStatement().setClob(parameterName, reader, length);
 103  
     
 104  3
     }
 105  
 
 106  
     public void setBlob(String parameterName, InputStream inputStream,
 107  
             long length) throws SQLException {
 108  3
         this.getUnderlyingCallableStatement().setBlob(parameterName, inputStream, length);
 109  
 
 110  3
     }
 111  
 
 112  
     public void setNClob(String parameterName, Reader reader, long length)
 113  
         throws SQLException {
 114  3
         this.getUnderlyingCallableStatement().setNClob(parameterName, reader, length);
 115  
     
 116  3
     }
 117  
 
 118  
     public String getNString(int parameterIndex) throws SQLException {
 119  3
         return this.getUnderlyingCallableStatement().getNString(parameterIndex);
 120  
     }
 121  
 
 122  
     public String getNString(String parameterName) throws SQLException {
 123  3
         return this.getUnderlyingCallableStatement().getNString(parameterName);
 124  
     }
 125  
 
 126  
     public Reader getNCharacterStream(int parameterIndex) throws SQLException {
 127  3
         return this.getUnderlyingCallableStatement().getNCharacterStream(parameterIndex);
 128  
     }
 129  
 
 130  
     public Reader getNCharacterStream(String parameterName) throws SQLException {
 131  3
         return this.getUnderlyingCallableStatement().getNCharacterStream(parameterName);
 132  
     }
 133  
 
 134  
     public Reader getCharacterStream(int parameterIndex) throws SQLException {
 135  3
         return this.getUnderlyingCallableStatement().getCharacterStream(parameterIndex);
 136  
     }
 137  
 
 138  
     public Reader getCharacterStream(String parameterName) throws SQLException {
 139  3
         return this.getUnderlyingCallableStatement().getCharacterStream(parameterName);
 140  
     }
 141  
 
 142  
     public void setBlob(String parameterName, Blob x) throws SQLException {
 143  3
         this.getUnderlyingCallableStatement().setBlob(parameterName, x);
 144  
 
 145  3
     }
 146  
 
 147  
     public void setClob(String parameterName, Clob x) throws SQLException {
 148  3
         this.getUnderlyingCallableStatement().setClob(parameterName, x);
 149  
 
 150  3
     }
 151  
 
 152  
     public void setAsciiStream(String parameterName, InputStream x, long length)
 153  
         throws SQLException {
 154  3
         this.getUnderlyingCallableStatement().setAsciiStream(parameterName, x, length);
 155  
     
 156  3
     }
 157  
 
 158  
     public void setBinaryStream(String parameterName, InputStream x, long length)
 159  
         throws SQLException {
 160  3
         this.getUnderlyingCallableStatement().setBinaryStream(parameterName, x, length);
 161  
     
 162  3
     }
 163  
 
 164  
     public void setCharacterStream(String parameterName, Reader reader,
 165  
             long length) throws SQLException {
 166  3
         this.getUnderlyingCallableStatement().setCharacterStream(parameterName, reader, length);
 167  
 
 168  3
     }
 169  
 
 170  
     public void setAsciiStream(String parameterName, InputStream x)
 171  
         throws SQLException {
 172  3
         this.getUnderlyingCallableStatement().setAsciiStream(parameterName, x);
 173  
     
 174  3
     }
 175  
     
 176  
     public void setAsciiStream(String parameterName, InputStream x, int length)
 177  
         throws SQLException {
 178  3
         this.getUnderlyingCallableStatement().setAsciiStream(parameterName, x, length);
 179  
     
 180  3
     }
 181  
     
 182  
     public void setBinaryStream(String parameterName, InputStream x)
 183  
         throws SQLException {
 184  3
         this.getUnderlyingCallableStatement().setBinaryStream(parameterName, x);
 185  
     
 186  3
     }
 187  
     
 188  
     public void setBinaryStream(String parameterName, InputStream x, int length)
 189  
         throws SQLException {
 190  3
         this.getUnderlyingCallableStatement().setBinaryStream(parameterName, x, length);
 191  
     
 192  3
     }
 193  
 
 194  
     public void setCharacterStream(String parameterName, Reader reader)
 195  
         throws SQLException {
 196  3
         this.getUnderlyingCallableStatement().setCharacterStream(parameterName, reader);
 197  
     
 198  3
     }
 199  
     
 200  
     public void setCharacterStream(String parameterName, Reader reader,
 201  
         int length) throws SQLException {
 202  3
         this.getUnderlyingCallableStatement().setCharacterStream(parameterName, reader, length);
 203  
     
 204  3
     }
 205  
 
 206  
     public void setNCharacterStream(String parameterName, Reader value)
 207  
         throws SQLException {
 208  3
         this.getUnderlyingCallableStatement().setNCharacterStream(parameterName, value);
 209  
     
 210  3
     }
 211  
     
 212  
     public void setNClob(String parameterName, Reader reader)
 213  
         throws SQLException {
 214  3
         this.getUnderlyingCallableStatement().setNClob(parameterName, reader);
 215  
     
 216  3
     }
 217  
 
 218  
     public void setClob(String parameterName, Reader reader)
 219  
         throws SQLException {
 220  3
         this.getUnderlyingCallableStatement().setClob(parameterName, reader);
 221  
     
 222  3
     }
 223  
 
 224  
     public void setBlob(String parameterName, InputStream inputStream)
 225  
         throws SQLException {
 226  3
         this.getUnderlyingCallableStatement().setBlob(parameterName, inputStream);
 227  
     
 228  3
     }
 229  
 
 230  
     /* (non-Javadoc)
 231  
      * @see java.sql.PreparedStatement#setRowId(int, java.sql.RowId)
 232  
      */
 233  
     public void setRowId(int parameterIndex, RowId x) throws SQLException {
 234  3
         this.getUnderlyingCallableStatement().setRowId(parameterIndex, x);
 235  
         
 236  3
     }
 237  
 
 238  
     /* (non-Javadoc)
 239  
      * @see java.sql.PreparedStatement#setNString(int, java.lang.String)
 240  
      */
 241  
     public void setNString(int parameterIndex, String value)
 242  
             throws SQLException {
 243  3
         this.getUnderlyingCallableStatement().setNString(parameterIndex, value);
 244  
         
 245  3
     }
 246  
 
 247  
     /* (non-Javadoc)
 248  
      * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader, long)
 249  
      */
 250  
     public void setNCharacterStream(int parameterIndex, Reader value,
 251  
             long length) throws SQLException {
 252  3
         this.getUnderlyingCallableStatement().setNCharacterStream(parameterIndex, value, length);
 253  
         
 254  3
     }
 255  
 
 256  
     /* (non-Javadoc)
 257  
      * @see java.sql.PreparedStatement#setNClob(int, java.sql.NClob)
 258  
      */
 259  
     public void setNClob(int parameterIndex, NClob value) throws SQLException {
 260  3
         this.getUnderlyingCallableStatement().setNClob(parameterIndex, value);
 261  
         
 262  3
     }
 263  
 
 264  
     /* (non-Javadoc)
 265  
      * @see java.sql.PreparedStatement#setClob(int, java.io.Reader, long)
 266  
      */
 267  
     public void setClob(int parameterIndex, Reader reader, long length)
 268  
             throws SQLException {
 269  3
         this.getUnderlyingCallableStatement().setClob(parameterIndex, reader, length);
 270  
         
 271  3
     }
 272  
 
 273  
     /* (non-Javadoc)
 274  
      * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream, long)
 275  
      */
 276  
     public void setBlob(int parameterIndex, InputStream inputStream, long length)
 277  
             throws SQLException {
 278  3
         this.getUnderlyingCallableStatement().setBlob(parameterIndex, inputStream, length);
 279  
         
 280  3
     }
 281  
 
 282  
     /* (non-Javadoc)
 283  
      * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader, long)
 284  
      */
 285  
     public void setNClob(int parameterIndex, Reader reader, long length)
 286  
             throws SQLException {
 287  3
         this.getUnderlyingCallableStatement().setNClob(parameterIndex, reader, length);
 288  
         
 289  3
     }
 290  
 
 291  
     /* (non-Javadoc)
 292  
      * @see java.sql.PreparedStatement#setSQLXML(int, java.sql.SQLXML)
 293  
      */
 294  
     public void setSQLXML(int parameterIndex, SQLXML xmlObject)
 295  
             throws SQLException {
 296  3
         this.getUnderlyingCallableStatement().setSQLXML(parameterIndex, xmlObject);
 297  
         
 298  3
     }
 299  
 
 300  
     /* (non-Javadoc)
 301  
      * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, long)
 302  
      */
 303  
     public void setAsciiStream(int parameterIndex, InputStream x, long length)
 304  
             throws SQLException {
 305  3
         this.getUnderlyingCallableStatement().setAsciiStream(parameterIndex, x, length);
 306  
         
 307  3
     }
 308  
 
 309  
     /* (non-Javadoc)
 310  
      * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, long)
 311  
      */
 312  
     public void setBinaryStream(int parameterIndex, InputStream x, long length)
 313  
             throws SQLException {
 314  3
         this.getUnderlyingCallableStatement().setBinaryStream(parameterIndex, x, length);
 315  
         
 316  3
     }
 317  
 
 318  
     /* (non-Javadoc)
 319  
      * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, long)
 320  
      */
 321  
     public void setCharacterStream(int parameterIndex, Reader reader,
 322  
             long length) throws SQLException {
 323  3
         this.getUnderlyingCallableStatement().setCharacterStream(parameterIndex, reader, length);
 324  
         
 325  3
     }
 326  
 
 327  
     /* (non-Javadoc)
 328  
      * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream)
 329  
      */
 330  
     public void setAsciiStream(int parameterIndex, InputStream x)
 331  
             throws SQLException {
 332  3
         this.getUnderlyingCallableStatement().setAsciiStream(parameterIndex, x);
 333  
         
 334  3
     }
 335  
 
 336  
     /* (non-Javadoc)
 337  
      * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream)
 338  
      */
 339  
     public void setBinaryStream(int parameterIndex, InputStream x)
 340  
             throws SQLException {
 341  3
         this.getUnderlyingCallableStatement().setBinaryStream(parameterIndex, x);
 342  
         
 343  3
     }
 344  
 
 345  
     /* (non-Javadoc)
 346  
      * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader)
 347  
      */
 348  
     public void setCharacterStream(int parameterIndex, Reader reader)
 349  
             throws SQLException {
 350  3
         this.getUnderlyingCallableStatement().setCharacterStream(parameterIndex, reader);
 351  
         
 352  3
     }
 353  
 
 354  
     /* (non-Javadoc)
 355  
      * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader)
 356  
      */
 357  
     public void setNCharacterStream(int parameterIndex, Reader value)
 358  
             throws SQLException {
 359  3
         this.getUnderlyingCallableStatement().setNCharacterStream(parameterIndex, value);
 360  
         
 361  3
     }
 362  
 
 363  
     /* (non-Javadoc)
 364  
      * @see java.sql.PreparedStatement#setClob(int, java.io.Reader)
 365  
      */
 366  
     public void setClob(int parameterIndex, Reader reader) throws SQLException {
 367  3
         this.getUnderlyingCallableStatement().setClob(parameterIndex, reader);
 368  
         
 369  3
     }
 370  
 
 371  
     /* (non-Javadoc)
 372  
      * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream)
 373  
      */
 374  
     public void setBlob(int parameterIndex, InputStream inputStream)
 375  
             throws SQLException {
 376  3
         this.getUnderlyingCallableStatement().setBlob(parameterIndex, inputStream);
 377  
         
 378  3
     }
 379  
 
 380  
     /* (non-Javadoc)
 381  
      * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader)
 382  
      */
 383  
     public void setNClob(int parameterIndex, Reader reader) throws SQLException {
 384  3
         this.getUnderlyingCallableStatement().setNClob(parameterIndex, reader);
 385  
         
 386  3
     }
 387  
 
 388  
     /* (non-Javadoc)
 389  
      * @see java.sql.Statement#isClosed()
 390  
      */
 391  
     public boolean isClosed() throws SQLException {
 392  3
         return this.getUnderlyingCallableStatement().isClosed();
 393  
     }
 394  
 
 395  
     /* (non-Javadoc)
 396  
      * @see java.sql.Statement#setPoolable(boolean)
 397  
      */
 398  
     public void setPoolable(boolean poolable) throws SQLException {
 399  3
         this.getUnderlyingCallableStatement().setPoolable(poolable);
 400  
         
 401  3
     }
 402  
 
 403  
     /* (non-Javadoc)
 404  
      * @see java.sql.Statement#isPoolable()
 405  
      */
 406  
     public boolean isPoolable() throws SQLException {
 407  3
         return this.getUnderlyingCallableStatement().isPoolable();
 408  
     }
 409  
 
 410  
     /* (non-Javadoc)
 411  
      * @see java.sql.Wrapper#unwrap(java.lang.Class)
 412  
      */
 413  
     public <T> T unwrap(Class<T> iface) throws SQLException {
 414  3
         return this.getUnderlyingCallableStatement().unwrap(iface);
 415  
     }
 416  
 
 417  
     /* (non-Javadoc)
 418  
      * @see java.sql.Wrapper#isWrapperFor(java.lang.Class)
 419  
      */
 420  
     public boolean isWrapperFor(Class<?> iface) throws SQLException {
 421  3
         return this.getUnderlyingCallableStatement().isWrapperFor(iface);
 422  
     }
 423  
 
 424  
 
 425  
 }