Coverage Report - net.admin4j.jdbc.driver.sql.ConnectionWrapper40Base
 
Classes in this File Line Coverage Branch Coverage Complexity
ConnectionWrapper40Base
100%
17/17
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.sql.Array;
 17  
 import java.sql.Blob;
 18  
 import java.sql.Clob;
 19  
 import java.sql.Connection;
 20  
 import java.sql.NClob;
 21  
 import java.sql.SQLClientInfoException;
 22  
 import java.sql.SQLException;
 23  
 import java.sql.SQLXML;
 24  
 import java.sql.Struct;
 25  
 import java.util.Properties;
 26  
 
 27  
 import net.admin4j.util.annotate.PackageRestrictions;
 28  
 import net.admin4j.util.annotate.Product;
 29  
 import net.admin4j.util.annotate.ProductDependencies;
 30  
 
 31  
 /**
 32  
  * Wraps a JDBC V3.0 connection so specifics can be reported to administrators.
 33  
  * @author D. Ashmore
 34  
  * @since 1.0
 35  
  */
 36  
 @ProductDependencies( {Product.JDBC40} )
 37  
 @PackageRestrictions({"net.admin4j","java","javax"})
 38  
 public abstract class ConnectionWrapper40Base extends ConnectionWrapper30Base implements
 39  
         Connection {
 40  
 
 41  
     public ConnectionWrapper40Base(Connection conn) {
 42  18
         super(conn);
 43  18
     }
 44  
     
 45  
     public Clob createClob() throws SQLException {
 46  3
         return this.getConnection().createClob();
 47  
         
 48  
      }
 49  
 
 50  
     public NClob createNClob() throws SQLException {
 51  3
         return this.getConnection().createNClob();
 52  
     }
 53  
 
 54  
     
 55  
     public SQLXML createSQLXML() throws SQLException {
 56  3
         return this.getConnection().createSQLXML();
 57  
     }
 58  
 
 59  
     public void setClientInfo(Properties properties) throws SQLClientInfoException {
 60  3
             connection.setClientInfo(properties);
 61  
     
 62  3
     }
 63  
 
 64  
     public void setClientInfo(String name, String value)
 65  
             throws SQLClientInfoException {
 66  3
                     connection.setClientInfo(name, value);
 67  
             
 68  3
             }
 69  
 
 70  
     public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
 71  3
             return connection.createArrayOf(typeName, elements);
 72  
     }
 73  
 
 74  
     public Blob createBlob() throws SQLException {
 75  3
             return connection.createBlob();
 76  
     }
 77  
 
 78  
     public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
 79  3
             return connection.createStruct(typeName, attributes);
 80  
     }
 81  
 
 82  
     public boolean isValid(int timeout) throws SQLException {
 83  3
             return connection.isValid(timeout);
 84  
     }
 85  
 
 86  
     public boolean isWrapperFor(Class<?> iface) throws SQLException {
 87  3
             return connection.isWrapperFor(iface);
 88  
     }
 89  
 
 90  
     public <T> T unwrap(Class<T> iface) throws SQLException {
 91  3
             return connection.unwrap(iface);
 92  
     }
 93  
 
 94  
     public Properties getClientInfo() throws SQLException {
 95  3
             return connection.getClientInfo();
 96  
     }
 97  
 
 98  
     public String getClientInfo(String name) throws SQLException {
 99  3
             return connection.getClientInfo(name);
 100  
     }
 101  
 
 102  
 }