Coverage Summary for Class: SQLConnection (com.acciente.oacc.sql.internal.persister)

Class Class, % Method, % Line, %
SQLConnection 100% (1/ 1) 100% (4/ 4) 100% (7/ 7)


1 /* 2  * Copyright 2009-2018, Acciente LLC 3  * 4  * Acciente LLC licenses this file to you under the 5  * Apache License, Version 2.0 (the "License"); you 6  * may not use this file except in compliance with the 7  * License. You may obtain a copy of the License at 8  * 9  * http://www.apache.org/licenses/LICENSE-2.0 10  * 11  * Unless required by applicable law or agreed to in 12  * writing, software distributed under the License is 13  * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 14  * OR CONDITIONS OF ANY KIND, either express or implied. 15  * See the License for the specific language governing 16  * permissions and limitations under the License. 17  */ 18 package com.acciente.oacc.sql.internal.persister; 19  20 import java.sql.Connection; 21 import java.sql.SQLException; 22  23 public class SQLConnection { 24  private final Connection connection; 25  26  public SQLConnection(Connection connection) { 27  this.connection = connection; 28  } 29  30  public SQLStatement prepareStatement(String sql) throws SQLException { 31  return new SQLStatement(connection.prepareStatement(sql)); 32  } 33  34  public SQLStatement prepareStatement(String sql, String[] generatedKeyColumns) throws SQLException { 35  return new SQLStatement(connection.prepareStatement(sql, generatedKeyColumns)); 36  } 37  38  public void close() throws SQLException { 39  this.connection.close(); 40  } 41 }