You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by th...@apache.org on 2020/01/08 06:02:47 UTC
svn commit: r37517 [47/50] - in /dev/commons/dbutils/1.8-RC2: ./ binaries/
site/ site/apidocs/ site/apidocs/jquery/ site/apidocs/jquery/external/
site/apidocs/jquery/external/jquery/ site/apidocs/jquery/images/
site/apidocs/jquery/jszip-utils/ site/api...
Added: dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BasicRowProcessor.java.html
==============================================================================
--- dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BasicRowProcessor.java.html (added)
+++ dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BasicRowProcessor.java.html Wed Jan 8 06:02:46 2020
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>BasicRowProcessor.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons DbUtils</a> > <a href="index.source.html" class="el_package">org.apache.commons.dbutils</a> > <span class="el
_source">BasicRowProcessor.java</span></div><h1>BasicRowProcessor.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.dbutils;
+
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * Basic implementation of the {@code RowProcessor} interface.
+ *
+ * <p>
+ * This class is thread-safe.
+ * </p>
+ *
+ * @see RowProcessor
+ */
+public class BasicRowProcessor implements RowProcessor {
+
+ /**
+ * The default BeanProcessor instance to use if not supplied in the
+ * constructor.
+ */
+<span class="fc" id="L43"> private static final BeanProcessor defaultConvert = new BeanProcessor();</span>
+
+ /**
+ * The Singleton instance of this class.
+ */
+<span class="fc" id="L48"> private static final BasicRowProcessor instance = new BasicRowProcessor();</span>
+
+ protected static Map<String, Object> createCaseInsensitiveHashMap(final int cols) {
+<span class="fc" id="L51"> return new CaseInsensitiveHashMap(cols);</span>
+ }
+
+ /**
+ * Returns the Singleton instance of this class.
+ *
+ * @return The single instance of this class.
+ * @deprecated Create instances with the constructors instead. This will
+ * be removed after DbUtils 1.1.
+ */
+ @Deprecated
+ public static BasicRowProcessor instance() {
+<span class="nc" id="L63"> return instance;</span>
+ }
+
+ /**
+ * Use this to process beans.
+ */
+ private final BeanProcessor convert;
+
+ /**
+ * BasicRowProcessor constructor. Bean processing defaults to a
+ * BeanProcessor instance.
+ */
+ public BasicRowProcessor() {
+<span class="fc" id="L76"> this(defaultConvert);</span>
+<span class="fc" id="L77"> }</span>
+
+ /**
+ * BasicRowProcessor constructor.
+ * @param convert The BeanProcessor to use when converting columns to
+ * bean properties.
+ * @since DbUtils 1.1
+ */
+ public BasicRowProcessor(final BeanProcessor convert) {
+<span class="fc" id="L86"> super();</span>
+<span class="fc" id="L87"> this.convert = convert;</span>
+<span class="fc" id="L88"> }</span>
+
+ /**
+ * Convert a {@code ResultSet} row into an {@code Object[]}.
+ * This implementation copies column values into the array in the same
+ * order they're returned from the {@code ResultSet}. Array elements
+ * will be set to {@code null} if the column was SQL NULL.
+ *
+ * @see org.apache.commons.dbutils.RowProcessor#toArray(java.sql.ResultSet)
+ * @param rs ResultSet that supplies the array data
+ * @throws SQLException if a database access error occurs
+ * @return the newly created array
+ */
+ @Override
+ public Object[] toArray(final ResultSet rs) throws SQLException {
+<span class="fc" id="L103"> final ResultSetMetaData meta = rs.getMetaData();</span>
+<span class="fc" id="L104"> final int cols = meta.getColumnCount();</span>
+<span class="fc" id="L105"> final Object[] result = new Object[cols];</span>
+
+<span class="fc bfc" id="L107" title="All 2 branches covered."> for (int i = 0; i < cols; i++) {</span>
+<span class="fc" id="L108"> result[i] = rs.getObject(i + 1);</span>
+ }
+
+<span class="fc" id="L111"> return result;</span>
+ }
+
+ /**
+ * Convert a {@code ResultSet} row into a JavaBean. This
+ * implementation delegates to a BeanProcessor instance.
+ * @see org.apache.commons.dbutils.RowProcessor#toBean(java.sql.ResultSet, java.lang.Class)
+ * @see org.apache.commons.dbutils.BeanProcessor#toBean(java.sql.ResultSet, java.lang.Class)
+ * @param <T> The type of bean to create
+ * @param rs ResultSet that supplies the bean data
+ * @param type Class from which to create the bean instance
+ * @throws SQLException if a database access error occurs
+ * @return the newly created bean
+ */
+ @Override
+ public <T> T toBean(final ResultSet rs, final Class<? extends T> type) throws SQLException {
+<span class="fc" id="L127"> return this.convert.toBean(rs, type);</span>
+ }
+
+ /**
+ * Convert a {@code ResultSet} into a {@code List} of JavaBeans.
+ * This implementation delegates to a BeanProcessor instance.
+ * @see org.apache.commons.dbutils.RowProcessor#toBeanList(java.sql.ResultSet, java.lang.Class)
+ * @see org.apache.commons.dbutils.BeanProcessor#toBeanList(java.sql.ResultSet, java.lang.Class)
+ * @param <T> The type of bean to create
+ * @param rs ResultSet that supplies the bean data
+ * @param type Class from which to create the bean instance
+ * @throws SQLException if a database access error occurs
+ * @return A {@code List} of beans with the given type in the order
+ * they were returned by the {@code ResultSet}.
+ */
+ @Override
+ public <T> List<T> toBeanList(final ResultSet rs, final Class<? extends T> type) throws SQLException {
+<span class="fc" id="L144"> return this.convert.toBeanList(rs, type);</span>
+ }
+
+ /**
+ * Convert a {@code ResultSet} row into a {@code Map}.
+ *
+ * <p>
+ * This implementation returns a {@code Map} with case insensitive column names as keys. Calls to
+ * {@code map.get("COL")} and {@code map.get("col")} return the same value. Furthermore this implementation
+ * will return an ordered map, that preserves the ordering of the columns in the ResultSet, so that iterating over
+ * the entry set of the returned map will return the first column of the ResultSet, then the second and so forth.
+ * </p>
+ *
+ * @param rs ResultSet that supplies the map data
+ * @return the newly created Map
+ * @throws SQLException if a database access error occurs
+ * @see org.apache.commons.dbutils.RowProcessor#toMap(java.sql.ResultSet)
+ */
+ @Override
+ public Map<String, Object> toMap(final ResultSet rs) throws SQLException {
+<span class="fc" id="L164"> final ResultSetMetaData rsmd = rs.getMetaData();</span>
+<span class="fc" id="L165"> final int cols = rsmd.getColumnCount();</span>
+<span class="fc" id="L166"> final Map<String, Object> result = createCaseInsensitiveHashMap(cols);</span>
+
+<span class="fc bfc" id="L168" title="All 2 branches covered."> for (int i = 1; i <= cols; i++) {</span>
+<span class="fc" id="L169"> String columnName = rsmd.getColumnLabel(i);</span>
+<span class="pc bpc" id="L170" title="3 of 4 branches missed."> if (null == columnName || 0 == columnName.length()) {</span>
+<span class="fc" id="L171"> columnName = rsmd.getColumnName(i);</span>
+ }
+<span class="fc" id="L173"> result.put(columnName, rs.getObject(i));</span>
+ }
+
+<span class="fc" id="L176"> return result;</span>
+ }
+
+
+ /**
+ * A Map that converts all keys to lowercase Strings for case insensitive
+ * lookups. This is needed for the toMap() implementation because
+ * databases don't consistently handle the casing of column names.
+ *
+ * <p>The keys are stored as they are given [BUG #DBUTILS-34], so we maintain
+ * an internal mapping from lowercase keys to the real keys in order to
+ * achieve the case insensitive lookup.
+ *
+ * <p>Note: This implementation does not allow {@code null}
+ * for key, whereas {@link LinkedHashMap} does, because of the code:
+ * <pre>
+ * key.toString().toLowerCase()
+ * </pre>
+ */
+ private static final class CaseInsensitiveHashMap extends LinkedHashMap<String, Object> {
+
+ private CaseInsensitiveHashMap(final int initialCapacity) {
+<span class="fc" id="L198"> super(initialCapacity);</span>
+<span class="fc" id="L199"> }</span>
+
+ /**
+ * The internal mapping from lowercase keys to the real keys.
+ *
+ * <p>
+ * Any query operation using the key
+ * ({@link #get(Object)}, {@link #containsKey(Object)})
+ * is done in three steps:
+ * <ul>
+ * <li>convert the parameter key to lower case</li>
+ * <li>get the actual key that corresponds to the lower case key</li>
+ * <li>query the map with the actual key</li>
+ * </ul>
+ * </p>
+ */
+<span class="fc" id="L215"> private final Map<String, String> lowerCaseMap = new HashMap<>();</span>
+
+ /**
+ * Required for serialization support.
+ *
+ * @see java.io.Serializable
+ */
+ private static final long serialVersionUID = -2848100435296897392L;
+
+ /** {@inheritDoc} */
+ @Override
+ public boolean containsKey(final Object key) {
+<span class="nc" id="L227"> final Object realKey = lowerCaseMap.get(key.toString().toLowerCase(Locale.ENGLISH));</span>
+<span class="nc" id="L228"> return super.containsKey(realKey);</span>
+ // Possible optimisation here:
+ // Since the lowerCaseMap contains a mapping for all the keys,
+ // we could just do this:
+ // return lowerCaseMap.containsKey(key.toString().toLowerCase());
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public Object get(final Object key) {
+<span class="fc" id="L238"> final Object realKey = lowerCaseMap.get(key.toString().toLowerCase(Locale.ENGLISH));</span>
+<span class="fc" id="L239"> return super.get(realKey);</span>
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public Object put(final String key, final Object value) {
+ /*
+ * In order to keep the map and lowerCaseMap synchronized,
+ * we have to remove the old mapping before putting the
+ * new one. Indeed, oldKey and key are not necessaliry equals.
+ * (That's why we call super.remove(oldKey) and not just
+ * super.put(key, value))
+ */
+<span class="fc" id="L252"> final Object oldKey = lowerCaseMap.put(key.toLowerCase(Locale.ENGLISH), key);</span>
+<span class="fc" id="L253"> final Object oldValue = super.remove(oldKey);</span>
+<span class="fc" id="L254"> super.put(key, value);</span>
+<span class="fc" id="L255"> return oldValue;</span>
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void putAll(final Map<? extends String, ?> m) {
+<span class="nc bnc" id="L261" title="All 2 branches missed."> for (final Map.Entry<? extends String, ?> entry : m.entrySet()) {</span>
+<span class="nc" id="L262"> final String key = entry.getKey();</span>
+<span class="nc" id="L263"> final Object value = entry.getValue();</span>
+<span class="nc" id="L264"> this.put(key, value);</span>
+<span class="nc" id="L265"> }</span>
+<span class="nc" id="L266"> }</span>
+
+ /** {@inheritDoc} */
+ @Override
+ public Object remove(final Object key) {
+<span class="nc" id="L271"> final Object realKey = lowerCaseMap.remove(key.toString().toLowerCase(Locale.ENGLISH));</span>
+<span class="nc" id="L272"> return super.remove(realKey);</span>
+ }
+ }
+
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.5.201910111838</span></div></body></html>
\ No newline at end of file
Added: dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BeanProcessor.html
==============================================================================
--- dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BeanProcessor.html (added)
+++ dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BeanProcessor.html Wed Jan 8 06:02:46 2020
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>BeanProcessor</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons DbUtils</a> > <a href="index.html" class="el_package">org.apache.commons.dbutils</a> > <span class="el_class">BeanProcessor</span></div><h1>BeanProcessor</h1><table class="coverage" cellspacing="0" id="coveragetab
le"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">134 of 587</td><td class="ctr2">77%</td><td class="bar">10 of 62</td><td class="ctr2">83%</td><td class="ctr1">10</td><td class="ctr
2">47</td><td class="ctr1">27</td><td class="ctr2">135</td><td class="ctr1">0</td><td class="ctr2">16</td></tr></tfoot><tbody><tr><td id="a2"><a href="BeanProcessor.java.html#L294" class="el_method">callSetter(Object, PropertyDescriptor, Object)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="70" height="10" title="82" alt="82"/><img src="../jacoco-resources/greenbar.gif" width="49" height="10" title="58" alt="58"/></td><td class="ctr2" id="c13">41%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="25" height="10" title="3" alt="3"/><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="7" alt="7"/></td><td class="ctr2" id="e6">70%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g1">6</td><td class="ctr1" id="h0">13</td><td class="ctr2" id="i0">25</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a8"><a href="BeanProcessor.java.html#L410" class="el_method">newInsta
nce(Class)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="16" height="10" title="19" alt="19"/><img src="../jacoco-resources/greenbar.gif" width="6" height="10" title="8" alt="8"/></td><td class="ctr2" id="c15">29%</td><td class="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g9">1</td><td class="ctr1" id="h2">3</td><td class="ctr2" id="i9">4</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a12"><a href="BeanProcessor.java.html#L428" class="el_method">propertyDescriptors(Class)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="12" height="10" title="14" alt="14"/><img src="../jacoco-resources/greenbar.gif" width="7" height="10" title="9" alt="9"/></td><td class="ctr2" id="c14">39%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h3">3</t
d><td class="ctr2" id="i7">7</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a7"><a href="BeanProcessor.java.html#L362" class="el_method">matchesPrimitive(Class, Class)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="6" height="10" title="8" alt="8"/><img src="../jacoco-resources/greenbar.gif" width="13" height="10" title="16" alt="16"/></td><td class="ctr2" id="c11">66%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="17" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="2" alt="2"/></td><td class="ctr2" id="e7">50%</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g5">3</td><td class="ctr1" id="h1">5</td><td class="ctr2" id="i4">10</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="BeanProcessor.java.html#L114" class="el_method">BeanProcessor(Map)</a></td><td class="bar" id="b4"><im
g src="../jacoco-resources/redbar.gif" width="4" height="10" title="5" alt="5"/><img src="../jacoco-resources/greenbar.gif" width="6" height="10" title="8" alt="8"/></td><td class="ctr2" id="c12">61%</td><td class="bar" id="d5"><img src="../jacoco-resources/redbar.gif" width="8" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="8" height="10" title="1" alt="1"/></td><td class="ctr2" id="e8">50%</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g8">2</td><td class="ctr1" id="h4">1</td><td class="ctr2" id="i8">5</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a10"><a href="BeanProcessor.java.html#L259" class="el_method">populateBean(ResultSet, Object, PropertyDescriptor[], int[])</a></td><td class="bar" id="b5"><img src="../jacoco-resources/redbar.gif" width="3" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="38" height="10" title="45" alt="45"/></td><td class="ctr2" id="c9">91%<
/td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="17" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="68" height="10" title="8" alt="8"/></td><td class="ctr2" id="e5">80%</td><td class="ctr1" id="f2">2</td><td class="ctr2" id="g2">6</td><td class="ctr1" id="h5">1</td><td class="ctr2" id="i3">12</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a5"><a href="BeanProcessor.java.html#L346" class="el_method">isCompatibleType(Object, Class)</a></td><td class="bar" id="b6"><img src="../jacoco-resources/redbar.gif" width="1" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="14" alt="14"/></td><td class="ctr2" id="c10">87%</td><td class="bar" id="d4"><img src="../jacoco-resources/redbar.gif" width="8" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="42" height="10" title="5" alt="5"/></td><td class="ctr2" id="e4"
>83%</td><td class="ctr1" id="f4">1</td><td class="ctr2" id="g4">4</td><td class="ctr1" id="h6">1</td><td class="ctr2" id="i11">3</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a13"><a href="BeanProcessor.java.html#L68" class="el_method">static {...}</a></td><td class="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="78" height="10" title="92" alt="92"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d7"><img src="../jacoco-resources/greenbar.gif" width="34" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g6">3</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i2">18</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a6"><a href="BeanProcessor.java.html#L460" class="el_method">mapColumnsToProperties(ResultSetMetaData, PropertyDescriptor[])</a></td><td class="bar" id="b8"><img src="../jacoco-resources/greenbar.gi
f" width="71" height="10" title="83" alt="83"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d3"><img src="../jacoco-resources/redbar.gif" width="8" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="111" height="10" title="13" alt="13"/></td><td class="ctr2" id="e3">92%</td><td class="ctr1" id="f5">1</td><td class="ctr2" id="g0">8</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i1">21</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a15"><a href="BeanProcessor.java.html#L193" class="el_method">toBeanList(ResultSet, Class)</a></td><td class="bar" id="b9"><img src="../jacoco-resources/greenbar.gif" width="30" height="10" title="35" alt="35"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d8"><img src="../jacoco-resources/greenbar.gif" width="34" height="10" title="4" alt="4"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f9">0</td><td class="ctr2" id="g7">3</td><td class="c
tr1" id="h9">0</td><td class="ctr2" id="i5">9</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a11"><a href="BeanProcessor.java.html#L523" class="el_method">processColumn(ResultSet, int, Class)</a></td><td class="bar" id="b10"><img src="../jacoco-resources/greenbar.gif" width="29" height="10" title="34" alt="34"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d6"><img src="../jacoco-resources/greenbar.gif" width="68" height="10" title="8" alt="8"/></td><td class="ctr2" id="e2">100%</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g3">5</td><td class="ctr1" id="h10">0</td><td class="ctr2" id="i6">9</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a9"><a href="BeanProcessor.java.html#L237" class="el_method">populateBean(ResultSet, Object)</a></td><td class="bar" id="b11"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="20" alt="20"/></td><td class="ctr2" id="c4">100%</td>
<td class="bar" id="d11"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" id="f11">0</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i10">4</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">1</td></tr><tr><td id="a3"><a href="BeanProcessor.java.html#L224" class="el_method">createBean(ResultSet, Class, PropertyDescriptor[], int[])</a></td><td class="bar" id="b12"><img src="../jacoco-resources/greenbar.gif" width="9" height="10" title="11" alt="11"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d12"/><td class="ctr2" id="e12">n/a</td><td class="ctr1" id="f12">0</td><td class="ctr2" id="g12">1</td><td class="ctr1" id="h12">0</td><td class="ctr2" id="i12">2</td><td class="ctr1" id="j12">0</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a14"><a href="BeanProcessor.java.html#L155" class="el_method">toBean(ResultSet, Class)</a></td><td class="bar" id="b13"><img src="../jacoco-resources/greenbar.gif" width="7" height=
"10" title="9" alt="9"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d13"/><td class="ctr2" id="e13">n/a</td><td class="ctr1" id="f13">0</td><td class="ctr2" id="g13">1</td><td class="ctr1" id="h13">0</td><td class="ctr2" id="i13">2</td><td class="ctr1" id="j13">0</td><td class="ctr2" id="k13">1</td></tr><tr><td id="a0"><a href="BeanProcessor.java.html#L104" class="el_method">BeanProcessor()</a></td><td class="bar" id="b14"><img src="../jacoco-resources/greenbar.gif" width="5" height="10" title="6" alt="6"/></td><td class="ctr2" id="c7">100%</td><td class="bar" id="d14"/><td class="ctr2" id="e14">n/a</td><td class="ctr1" id="f14">0</td><td class="ctr2" id="g14">1</td><td class="ctr1" id="h14">0</td><td class="ctr2" id="i14">2</td><td class="ctr1" id="j14">0</td><td class="ctr2" id="k14">1</td></tr><tr><td id="a4"><a href="BeanProcessor.java.html#L394" class="el_method">getWriteMethod(Object, PropertyDescriptor, Object)</a></td><td class="bar" id="b15"><img src="../jaco
co-resources/greenbar.gif" width="4" height="10" title="5" alt="5"/></td><td class="ctr2" id="c8">100%</td><td class="bar" id="d15"/><td class="ctr2" id="e15">n/a</td><td class="ctr1" id="f15">0</td><td class="ctr2" id="g15">1</td><td class="ctr1" id="h15">0</td><td class="ctr2" id="i15">2</td><td class="ctr1" id="j15">0</td><td class="ctr2" id="k15">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.5.201910111838</span></div></body></html>
\ No newline at end of file
Added: dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BeanProcessor.java.html
==============================================================================
--- dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BeanProcessor.java.html (added)
+++ dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/BeanProcessor.java.html Wed Jan 8 06:02:46 2020
@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>BeanProcessor.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons DbUtils</a> > <a href="index.source.html" class="el_package">org.apache.commons.dbutils</a> > <span class="el_sou
rce">BeanProcessor.java</span></div><h1>BeanProcessor.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.dbutils;
+
+import org.apache.commons.dbutils.annotations.Column;
+
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.ServiceLoader;
+
+/**
+ * <p>
+ * {@code BeanProcessor} matches column names to bean property names
+ * and converts {@code ResultSet} columns into objects for those bean
+ * properties. Subclasses should override the methods in the processing chain
+ * to customize behavior.
+ * </p>
+ *
+ * <p>
+ * This class is thread-safe.
+ * </p>
+ *
+ * @see BasicRowProcessor
+ *
+ * @since DbUtils 1.1
+ */
+public class BeanProcessor {
+
+ /**
+ * Special array value used by {@code mapColumnsToProperties} that
+ * indicates there is no bean property that matches a column from a
+ * {@code ResultSet}.
+ */
+ protected static final int PROPERTY_NOT_FOUND = -1;
+
+ /**
+ * Set a bean's primitive properties to these defaults when SQL NULL
+ * is returned. These are the same as the defaults that ResultSet get*
+ * methods return in the event of a NULL column.
+ */
+<span class="fc" id="L68"> private static final Map<Class<?>, Object> primitiveDefaults = new HashMap<>();</span>
+
+<span class="fc" id="L70"> private static final List<ColumnHandler> columnHandlers = new ArrayList<>();</span>
+
+<span class="fc" id="L72"> private static final List<PropertyHandler> propertyHandlers = new ArrayList<>();</span>
+
+ /**
+ * ResultSet column to bean property name overrides.
+ */
+ private final Map<String, String> columnToPropertyOverrides;
+
+ static {
+<span class="fc" id="L80"> primitiveDefaults.put(Integer.TYPE, Integer.valueOf(0));</span>
+<span class="fc" id="L81"> primitiveDefaults.put(Short.TYPE, Short.valueOf((short) 0));</span>
+<span class="fc" id="L82"> primitiveDefaults.put(Byte.TYPE, Byte.valueOf((byte) 0));</span>
+<span class="fc" id="L83"> primitiveDefaults.put(Float.TYPE, Float.valueOf(0f));</span>
+<span class="fc" id="L84"> primitiveDefaults.put(Double.TYPE, Double.valueOf(0d));</span>
+<span class="fc" id="L85"> primitiveDefaults.put(Long.TYPE, Long.valueOf(0L));</span>
+<span class="fc" id="L86"> primitiveDefaults.put(Boolean.TYPE, Boolean.FALSE);</span>
+<span class="fc" id="L87"> primitiveDefaults.put(Character.TYPE, Character.valueOf((char) 0));</span>
+
+ // Use a ServiceLoader to find implementations
+<span class="fc bfc" id="L90" title="All 2 branches covered."> for (final ColumnHandler handler : ServiceLoader.load(ColumnHandler.class)) {</span>
+<span class="fc" id="L91"> columnHandlers.add(handler);</span>
+<span class="fc" id="L92"> }</span>
+
+ // Use a ServiceLoader to find implementations
+<span class="fc bfc" id="L95" title="All 2 branches covered."> for (final PropertyHandler handler : ServiceLoader.load(PropertyHandler.class)) {</span>
+<span class="fc" id="L96"> propertyHandlers.add(handler);</span>
+<span class="fc" id="L97"> }</span>
+<span class="fc" id="L98"> }</span>
+
+ /**
+ * Constructor for BeanProcessor.
+ */
+ public BeanProcessor() {
+<span class="fc" id="L104"> this(new HashMap<String, String>());</span>
+<span class="fc" id="L105"> }</span>
+
+ /**
+ * Constructor for BeanProcessor configured with column to property name overrides.
+ *
+ * @param columnToPropertyOverrides ResultSet column to bean property name overrides
+ * @since 1.5
+ */
+ public BeanProcessor(final Map<String, String> columnToPropertyOverrides) {
+<span class="fc" id="L114"> super();</span>
+<span class="pc bpc" id="L115" title="1 of 2 branches missed."> if (columnToPropertyOverrides == null) {</span>
+<span class="nc" id="L116"> throw new IllegalArgumentException("columnToPropertyOverrides map cannot be null");</span>
+ }
+<span class="fc" id="L118"> this.columnToPropertyOverrides = columnToPropertyOverrides;</span>
+<span class="fc" id="L119"> }</span>
+
+ /**
+ * Convert a {@code ResultSet} row into a JavaBean. This
+ * implementation uses reflection and {@code BeanInfo} classes to
+ * match column names to bean property names. Properties are matched to
+ * columns based on several factors:
+ * &lt;br/&gt;
+ * &lt;ol&gt;
+ * &lt;li&gt;
+ * The class has a writable property with the same name as a column.
+ * The name comparison is case insensitive.
+ * &lt;/li&gt;
+ *
+ * &lt;li&gt;
+ * The column type can be converted to the property's set method
+ * parameter type with a ResultSet.get* method. If the conversion fails
+ * (ie. the property was an int and the column was a Timestamp) an
+ * SQLException is thrown.
+ * &lt;/li&gt;
+ * &lt;/ol&gt;
+ *
+ * &lt;p&gt;
+ * Primitive bean properties are set to their defaults when SQL NULL is
+ * returned from the {@code ResultSet}. Numeric fields are set to 0
+ * and booleans are set to false. Object bean properties are set to
+ * {@code null} when SQL NULL is returned. This is the same behavior
+ * as the {@code ResultSet} get* methods.
+ * &lt;/p&gt;
+ * @param <T> The type of bean to create
+ * @param rs ResultSet that supplies the bean data
+ * @param type Class from which to create the bean instance
+ * @throws SQLException if a database access error occurs
+ * @return the newly created bean
+ */
+ public <T> T toBean(final ResultSet rs, final Class<? extends T> type) throws SQLException {
+<span class="fc" id="L155"> final T bean = this.newInstance(type);</span>
+<span class="fc" id="L156"> return this.populateBean(rs, bean);</span>
+ }
+
+ /**
+ * Convert a {@code ResultSet} into a {@code List} of JavaBeans.
+ * This implementation uses reflection and {@code BeanInfo} classes to
+ * match column names to bean property names. Properties are matched to
+ * columns based on several factors:
+ * &lt;br/&gt;
+ * &lt;ol&gt;
+ * &lt;li&gt;
+ * The class has a writable property with the same name as a column.
+ * The name comparison is case insensitive.
+ * &lt;/li&gt;
+ *
+ * &lt;li&gt;
+ * The column type can be converted to the property's set method
+ * parameter type with a ResultSet.get* method. If the conversion fails
+ * (ie. the property was an int and the column was a Timestamp) an
+ * SQLException is thrown.
+ * &lt;/li&gt;
+ * &lt;/ol&gt;
+ *
+ * <p>
+ * Primitive bean properties are set to their defaults when SQL NULL is
+ * returned from the {@code ResultSet}. Numeric fields are set to 0
+ * and booleans are set to false. Object bean properties are set to
+ * {@code null} when SQL NULL is returned. This is the same behavior
+ * as the {@code ResultSet} get* methods.
+ * &lt;/p&gt;
+ * @param <T> The type of bean to create
+ * @param rs ResultSet that supplies the bean data
+ * @param type Class from which to create the bean instance
+ * @throws SQLException if a database access error occurs
+ * @return the newly created List of beans
+ */
+ public <T> List<T> toBeanList(final ResultSet rs, final Class<? extends T> type) throws SQLException {
+<span class="fc" id="L193"> final List<T> results = new ArrayList<>();</span>
+
+<span class="fc bfc" id="L195" title="All 2 branches covered."> if (!rs.next()) {</span>
+<span class="fc" id="L196"> return results;</span>
+ }
+
+<span class="fc" id="L199"> final PropertyDescriptor[] props = this.propertyDescriptors(type);</span>
+<span class="fc" id="L200"> final ResultSetMetaData rsmd = rs.getMetaData();</span>
+<span class="fc" id="L201"> final int[] columnToProperty = this.mapColumnsToProperties(rsmd, props);</span>
+
+ do {
+<span class="fc" id="L204"> results.add(this.createBean(rs, type, props, columnToProperty));</span>
+<span class="fc bfc" id="L205" title="All 2 branches covered."> } while (rs.next());</span>
+
+<span class="fc" id="L207"> return results;</span>
+ }
+
+ /**
+ * Creates a new object and initializes its fields from the ResultSet.
+ * @param <T> The type of bean to create
+ * @param rs The result set.
+ * @param type The bean type (the return type of the object).
+ * @param props The property descriptors.
+ * @param columnToProperty The column indices in the result set.
+ * @return An initialized object.
+ * @throws SQLException if a database error occurs.
+ */
+ private <T> T createBean(final ResultSet rs, final Class<T> type,
+ final PropertyDescriptor[] props, final int[] columnToProperty)
+ throws SQLException {
+
+<span class="fc" id="L224"> final T bean = this.newInstance(type);</span>
+<span class="fc" id="L225"> return populateBean(rs, bean, props, columnToProperty);</span>
+ }
+
+ /**
+ * Initializes the fields of the provided bean from the ResultSet.
+ * @param <T> The type of bean
+ * @param rs The result set.
+ * @param bean The bean to be populated.
+ * @return An initialized object.
+ * @throws SQLException if a database error occurs.
+ */
+ public <T> T populateBean(final ResultSet rs, final T bean) throws SQLException {
+<span class="fc" id="L237"> final PropertyDescriptor[] props = this.propertyDescriptors(bean.getClass());</span>
+<span class="fc" id="L238"> final ResultSetMetaData rsmd = rs.getMetaData();</span>
+<span class="fc" id="L239"> final int[] columnToProperty = this.mapColumnsToProperties(rsmd, props);</span>
+
+<span class="fc" id="L241"> return populateBean(rs, bean, props, columnToProperty);</span>
+ }
+
+ /**
+ * This method populates a bean from the ResultSet based upon the underlying meta-data.
+ *
+ * @param <T> The type of bean
+ * @param rs The result set.
+ * @param bean The bean to be populated.
+ * @param props The property descriptors.
+ * @param columnToProperty The column indices in the result set.
+ * @return An initialized object.
+ * @throws SQLException if a database error occurs.
+ */
+ private <T> T populateBean(final ResultSet rs, final T bean,
+ final PropertyDescriptor[] props, final int[] columnToProperty)
+ throws SQLException {
+
+<span class="fc bfc" id="L259" title="All 2 branches covered."> for (int i = 1; i < columnToProperty.length; i++) {</span>
+
+<span class="fc bfc" id="L261" title="All 2 branches covered."> if (columnToProperty[i] == PROPERTY_NOT_FOUND) {</span>
+<span class="fc" id="L262"> continue;</span>
+ }
+
+<span class="fc" id="L265"> final PropertyDescriptor prop = props[columnToProperty[i]];</span>
+<span class="fc" id="L266"> final Class<?> propType = prop.getPropertyType();</span>
+
+<span class="fc" id="L268"> Object value = null;</span>
+<span class="pc bpc" id="L269" title="1 of 2 branches missed."> if (propType != null) {</span>
+<span class="fc" id="L270"> value = this.processColumn(rs, i, propType);</span>
+
+<span class="pc bpc" id="L272" title="1 of 4 branches missed."> if (value == null && propType.isPrimitive()) {</span>
+<span class="nc" id="L273"> value = primitiveDefaults.get(propType);</span>
+ }
+ }
+
+<span class="fc" id="L277"> this.callSetter(bean, prop, value);</span>
+ }
+
+<span class="fc" id="L280"> return bean;</span>
+ }
+
+ /**
+ * Calls the setter method on the target object for the given property.
+ * If no setter method exists for the property, this method does nothing.
+ * @param target The object to set the property on.
+ * @param prop The property to set.
+ * @param value The value to pass into the setter.
+ * @throws SQLException if an error occurs setting the property.
+ */
+ private void callSetter(final Object target, final PropertyDescriptor prop, Object value)
+ throws SQLException {
+
+<span class="fc" id="L294"> final Method setter = getWriteMethod(target, prop, value);</span>
+
+<span class="pc bpc" id="L296" title="2 of 4 branches missed."> if (setter == null || setter.getParameterTypes().length != 1) {</span>
+<span class="nc" id="L297"> return;</span>
+ }
+
+ try {
+<span class="fc" id="L301"> final Class<?> firstParam = setter.getParameterTypes()[0];</span>
+<span class="fc bfc" id="L302" title="All 2 branches covered."> for (final PropertyHandler handler : propertyHandlers) {</span>
+<span class="fc bfc" id="L303" title="All 2 branches covered."> if (handler.match(firstParam, value)) {</span>
+<span class="fc" id="L304"> value = handler.apply(firstParam, value);</span>
+<span class="fc" id="L305"> break;</span>
+ }
+<span class="fc" id="L307"> }</span>
+
+ // Don't call setter if the value object isn't the right type
+<span class="pc bpc" id="L310" title="1 of 2 branches missed."> if (this.isCompatibleType(value, firstParam)) {</span>
+<span class="fc" id="L311"> setter.invoke(target, value);</span>
+ } else {
+<span class="nc" id="L313"> throw new SQLException(</span>
+<span class="nc" id="L314"> "Cannot set " + prop.getName() + ": incompatible types, cannot convert "</span>
+<span class="nc" id="L315"> + value.getClass().getName() + " to " + firstParam.getName());</span>
+ // value cannot be null here because isCompatibleType allows null
+ }
+
+<span class="nc" id="L319"> } catch (final IllegalArgumentException e) {</span>
+<span class="nc" id="L320"> throw new SQLException(</span>
+<span class="nc" id="L321"> "Cannot set " + prop.getName() + ": " + e.getMessage());</span>
+
+<span class="nc" id="L323"> } catch (final IllegalAccessException e) {</span>
+<span class="nc" id="L324"> throw new SQLException(</span>
+<span class="nc" id="L325"> "Cannot set " + prop.getName() + ": " + e.getMessage());</span>
+
+<span class="nc" id="L327"> } catch (final InvocationTargetException e) {</span>
+<span class="nc" id="L328"> throw new SQLException(</span>
+<span class="nc" id="L329"> "Cannot set " + prop.getName() + ": " + e.getMessage());</span>
+<span class="fc" id="L330"> }</span>
+<span class="fc" id="L331"> }</span>
+
+ /**
+ * ResultSet.getObject() returns an Integer object for an INT column. The
+ * setter method for the property might take an Integer or a primitive int.
+ * This method returns true if the value can be successfully passed into
+ * the setter method. Remember, Method.invoke() handles the unwrapping
+ * of Integer into an int.
+ *
+ * @param value The value to be passed into the setter method.
+ * @param type The setter's parameter type (non-null)
+ * @return boolean True if the value is compatible (null => true)
+ */
+ private boolean isCompatibleType(final Object value, final Class<?> type) {
+ // Do object check first, then primitives
+<span class="pc bpc" id="L346" title="1 of 6 branches missed."> if (value == null || type.isInstance(value) || matchesPrimitive(type, value.getClass())) {</span>
+<span class="fc" id="L347"> return true;</span>
+
+ }
+<span class="nc" id="L350"> return false;</span>
+
+ }
+
+ /**
+ * Check whether a value is of the same primitive type as {@code targetType}.
+ *
+ * @param targetType The primitive type to target.
+ * @param valueType The value to match to the primitive type.
+ * @return Whether {@code valueType} can be coerced (e.g. autoboxed) into {@code targetType}.
+ */
+ private boolean matchesPrimitive(final Class<?> targetType, final Class<?> valueType) {
+<span class="pc bpc" id="L362" title="1 of 2 branches missed."> if (!targetType.isPrimitive()) {</span>
+<span class="nc" id="L363"> return false;</span>
+ }
+
+ try {
+ // see if there is a "TYPE" field. This is present for primitive wrappers.
+<span class="fc" id="L368"> final Field typeField = valueType.getField("TYPE");</span>
+<span class="fc" id="L369"> final Object primitiveValueType = typeField.get(valueType);</span>
+
+<span class="pc bpc" id="L371" title="1 of 2 branches missed."> if (targetType == primitiveValueType) {</span>
+<span class="fc" id="L372"> return true;</span>
+ }
+<span class="nc" id="L374"> } catch (final NoSuchFieldException e) {</span>
+ // lacking the TYPE field is a good sign that we're not working with a primitive wrapper.
+ // we can't match for compatibility
+<span class="nc" id="L377"> } catch (final IllegalAccessException e) {</span>
+ // an inaccessible TYPE field is a good sign that we're not working with a primitive wrapper.
+ // nothing to do. we can't match for compatibility
+<span class="nc" id="L380"> }</span>
+<span class="nc" id="L381"> return false;</span>
+ }
+
+ /**
+ * Get the write method to use when setting {@code value} to the {@code target}.
+ *
+ * @param target Object where the write method will be called.
+ * @param prop BeanUtils information.
+ * @param value The value that will be passed to the write method.
+ * @return The {@link java.lang.reflect.Method} to call on {@code target} to write {@code value} or {@code null} if
+ * there is no suitable write method.
+ */
+ protected Method getWriteMethod(final Object target, final PropertyDescriptor prop, final Object value) {
+<span class="fc" id="L394"> final Method method = prop.getWriteMethod();</span>
+<span class="fc" id="L395"> return method;</span>
+ }
+
+ /**
+ * Factory method that returns a new instance of the given Class. This
+ * is called at the start of the bean creation process and may be
+ * overridden to provide custom behavior like returning a cached bean
+ * instance.
+ * @param <T> The type of object to create
+ * @param c The Class to create an object from.
+ * @return A newly created object of the Class.
+ * @throws SQLException if creation failed.
+ */
+ protected <T> T newInstance(final Class<T> c) throws SQLException {
+ try {
+<span class="fc" id="L410"> return c.getDeclaredConstructor().newInstance();</span>
+
+<span class="nc" id="L412"> } catch (final IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException e) {</span>
+<span class="nc" id="L413"> throw new SQLException(</span>
+<span class="nc" id="L414"> "Cannot create " + c.getName() + ": " + e.getMessage());</span>
+ }
+ }
+
+ /**
+ * Returns a PropertyDescriptor[] for the given Class.
+ *
+ * @param c The Class to retrieve PropertyDescriptors for.
+ * @return A PropertyDescriptor[] describing the Class.
+ * @throws SQLException if introspection failed.
+ */
+ private PropertyDescriptor[] propertyDescriptors(final Class<?> c)
+ throws SQLException {
+ // Introspector caches BeanInfo classes for better performance
+<span class="fc" id="L428"> BeanInfo beanInfo = null;</span>
+ try {
+<span class="fc" id="L430"> beanInfo = Introspector.getBeanInfo(c);</span>
+
+<span class="nc" id="L432"> } catch (final IntrospectionException e) {</span>
+<span class="nc" id="L433"> throw new SQLException(</span>
+<span class="nc" id="L434"> "Bean introspection failed: " + e.getMessage());</span>
+<span class="fc" id="L435"> }</span>
+
+<span class="fc" id="L437"> return beanInfo.getPropertyDescriptors();</span>
+ }
+
+ /**
+ * The positions in the returned array represent column numbers. The
+ * values stored at each position represent the index in the
+ * {@code PropertyDescriptor[]} for the bean property that matches
+ * the column name. If no bean property was found for a column, the
+ * position is set to {@code PROPERTY_NOT_FOUND}.
+ *
+ * @param rsmd The {@code ResultSetMetaData} containing column
+ * information.
+ *
+ * @param props The bean property descriptors.
+ *
+ * @throws SQLException if a database access error occurs
+ *
+ * @return An int[] with column index to property index mappings. The 0th
+ * element is meaningless because JDBC column indexing starts at 1.
+ */
+ protected int[] mapColumnsToProperties(final ResultSetMetaData rsmd,
+ final PropertyDescriptor[] props) throws SQLException {
+
+<span class="fc" id="L460"> final int cols = rsmd.getColumnCount();</span>
+<span class="fc" id="L461"> final int[] columnToProperty = new int[cols + 1];</span>
+<span class="fc" id="L462"> Arrays.fill(columnToProperty, PROPERTY_NOT_FOUND);</span>
+
+<span class="fc bfc" id="L464" title="All 2 branches covered."> for (int col = 1; col <= cols; col++) {</span>
+<span class="fc" id="L465"> String columnName = rsmd.getColumnLabel(col);</span>
+<span class="pc bpc" id="L466" title="1 of 4 branches missed."> if (null == columnName || 0 == columnName.length()) {</span>
+<span class="fc" id="L467"> columnName = rsmd.getColumnName(col);</span>
+ }
+<span class="fc" id="L469"> String propertyName = columnToPropertyOverrides.get(columnName);</span>
+<span class="fc bfc" id="L470" title="All 2 branches covered."> if (propertyName == null) {</span>
+<span class="fc" id="L471"> propertyName = columnName;</span>
+ }
+<span class="fc bfc" id="L473" title="All 2 branches covered."> for (int i = 0; i < props.length; i++) {</span>
+
+<span class="fc" id="L475"> PropertyDescriptor prop = props[i];</span>
+<span class="fc" id="L476"> Column column = prop.getReadMethod().getAnnotation(Column.class);</span>
+<span class="fc" id="L477"> String propertyColumnName = null;</span>
+<span class="fc bfc" id="L478" title="All 2 branches covered."> if (column != null) {</span>
+<span class="fc" id="L479"> propertyColumnName = column.name();</span>
+ } else {
+<span class="fc" id="L481"> propertyColumnName = prop.getName();</span>
+ }
+<span class="fc bfc" id="L483" title="All 2 branches covered."> if (propertyName.equalsIgnoreCase(propertyColumnName)) {</span>
+<span class="fc" id="L484"> columnToProperty[col] = i;</span>
+<span class="fc" id="L485"> break;</span>
+ }
+ }
+ }
+
+<span class="fc" id="L490"> return columnToProperty;</span>
+ }
+
+ /**
+ * Convert a {@code ResultSet} column into an object. Simple
+ * implementations could just call {@code rs.getObject(index)} while
+ * more complex implementations could perform type manipulation to match
+ * the column's type to the bean property type.
+ *
+ * <p>
+ * This implementation calls the appropriate {@code ResultSet} getter
+ * method for the given property type to perform the type conversion. If
+ * the property type doesn't match one of the supported
+ * {@code ResultSet} types, {@code getObject} is called.
+ * </p>
+ *
+ * @param rs The {@code ResultSet} currently being processed. It is
+ * positioned on a valid row before being passed into this method.
+ *
+ * @param index The current column index being processed.
+ *
+ * @param propType The bean property type that this column needs to be
+ * converted into.
+ *
+ * @throws SQLException if a database access error occurs
+ *
+ * @return The object from the {@code ResultSet} at the given column
+ * index after optional type processing or {@code null} if the column
+ * value was SQL NULL.
+ */
+ protected Object processColumn(final ResultSet rs, final int index, final Class<?> propType)
+ throws SQLException {
+
+<span class="fc" id="L523"> Object retval = rs.getObject(index);</span>
+
+<span class="fc bfc" id="L525" title="All 4 branches covered."> if ( !propType.isPrimitive() && retval == null ) {</span>
+<span class="fc" id="L526"> return null;</span>
+ }
+
+<span class="fc bfc" id="L529" title="All 2 branches covered."> for (final ColumnHandler handler : columnHandlers) {</span>
+<span class="fc bfc" id="L530" title="All 2 branches covered."> if (handler.match(propType)) {</span>
+<span class="fc" id="L531"> retval = handler.apply(rs, index);</span>
+<span class="fc" id="L532"> break;</span>
+ }
+<span class="fc" id="L534"> }</span>
+
+<span class="fc" id="L536"> return retval;</span>
+
+ }
+
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.5.201910111838</span></div></body></html>
\ No newline at end of file
Added: dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/DbUtils$DriverProxy.html
==============================================================================
--- dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/DbUtils$DriverProxy.html (added)
+++ dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/DbUtils$DriverProxy.html Wed Jan 8 06:02:46 2020
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>DbUtils.DriverProxy</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons DbUtils</a> > <a href="index.html" class="el_package">org.apache.commons.dbutils</a> > <span class="el_class">DbUtils.DriverProxy</span></div><h1>DbUtils.DriverProxy</h1><table class="coverage" cellspacing="
0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">50 of 88</td><td class="ctr2">43%</td><td class="bar">2 of 2</td><td class="ctr2">0%</td><td class="ctr1">2</td><t
d class="ctr2">9</td><td class="ctr1">13</td><td class="ctr2">23</td><td class="ctr1">1</td><td class="ctr2">8</td></tr></tfoot><tbody><tr><td id="a5"><a href="DbUtils.java.html#L414" class="el_method">getParentLogger()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="50" alt="50"/></td><td class="ctr2" id="c7">0%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">2</td><td class="ctr1" id="h0">13</td><td class="ctr2" id="i0">13</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="DbUtils.java.html#L345" class="el_method">DbUtils.DriverProxy(Driver)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="21" height="10" title="9" alt="9"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"/><td c
lass="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">4</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a1"><a href="DbUtils.java.html#L374" class="el_method">connect(String, Properties)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="14" height="10" title="6" alt="6"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a6"><a href="DbUtils.java.html#L398" class="el_method">getPropertyInfo(String, Properties)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="14" height="10" title="6" alt="6"/></td><td class="ctr2" id="c2">100%</td><td class="bar" i
d="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a0"><a href="DbUtils.java.html#L366" class="el_method">acceptsURL(String)</a></td><td class="bar" id="b4"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">1</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a3"><a href="DbUtils.java.html#L382" class="el_method">getMajorVersion()</a></td><td class="bar" id="b5"><img src="../jacoco-resources/greenbar.gif" width="9" height="10" title="4" alt="4"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d5"/><td cla
ss="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i5">1</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a4"><a href="DbUtils.java.html#L390" class="el_method">getMinorVersion()</a></td><td class="bar" id="b6"><img src="../jacoco-resources/greenbar.gif" width="9" height="10" title="4" alt="4"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">1</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a7"><a href="DbUtils.java.html#L406" class="el_method">jdbcCompliant()</a></td><td class="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="9" height="10" title="4" alt="4"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n
/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">1</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.5.201910111838</span></div></body></html>
\ No newline at end of file
Added: dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/DbUtils.html
==============================================================================
--- dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/DbUtils.html (added)
+++ dev/commons/dbutils/1.8-RC2/site/jacoco/org.apache.commons.dbutils/DbUtils.html Wed Jan 8 06:02:46 2020
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>DbUtils</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons DbUtils</a> > <a href="index.html" class="el_package">org.apache.commons.dbutils</a> > <span class="el_class">DbUtils</span></div><h1>DbUtils</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td
class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">90 of 164</td><td class="ctr2">45%</td><td class="bar">10 of 22</td><td class="ctr2">54%</td><td class="ctr1">10</td><td class="ctr2">30</td><td class
="ctr1">33</td><td class="ctr2">80</td><td class="ctr1">5</td><td class="ctr2">19</td></tr></tfoot><tbody><tr><td id="a10"><a href="DbUtils.java.html#L206" class="el_method">loadDriver(ClassLoader, String)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="112" height="10" title="44" alt="44"/><img src="../jacoco-resources/greenbar.gif" width="7" height="10" title="3" alt="3"/></td><td class="ctr2" id="c13">6%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="e6">0%</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g0">3</td><td class="ctr1" id="h0">14</td><td class="ctr2" id="i0">16</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a13"><a href="DbUtils.java.html#L259" class="el_method">printStackTrace(SQLException, PrintWriter)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="43" height="10" ti
tle="17" alt="17"/></td><td class="ctr2" id="c14">0%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="e7">0%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h1">7</td><td class="ctr2" id="i1">7</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a15"><a href="DbUtils.java.html#L285" class="el_method">printWarnings(Connection, PrintWriter)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="30" height="10" title="12" alt="12"/></td><td class="ctr2" id="c15">0%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e8">0%</td><td class="ctr1" id="f2">2</td><td class="ctr2" id="g2">2</td><td class="ctr1" id="h2">6</td><td class="ctr2" id="i2">6</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k2">1</td></tr><tr>
<td id="a12"><a href="DbUtils.java.html#L247" class="el_method">printStackTrace(SQLException)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="17" height="10" title="7" alt="7"/></td><td class="ctr2" id="c16">0%</td><td class="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g9">1</td><td class="ctr1" id="h3">2</td><td class="ctr2" id="i15">2</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a14"><a href="DbUtils.java.html#L275" class="el_method">printWarnings(Connection)</a></td><td class="bar" id="b4"><img src="../jacoco-resources/redbar.gif" width="17" height="10" title="7" alt="7"/></td><td class="ctr2" id="c17">0%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f4">1</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h4">2</td><td class="ctr2" id="i16">2</td><td class="ctr1" id="j3">1</td><td class="ctr2" id="k4">1</td></t
r><tr><td id="a9"><a href="DbUtils.java.html#L48" class="el_method">DbUtils()</a></td><td class="bar" id="b5"><img src="../jacoco-resources/redbar.gif" width="7" height="10" title="3" alt="3"/></td><td class="ctr2" id="c18">0%</td><td class="bar" id="d11"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" id="f5">1</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h5">2</td><td class="ctr2" id="i17">2</td><td class="ctr1" id="j4">1</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a4"><a href="DbUtils.java.html#L115" class="el_method">closeQuietly(Connection, Statement, ResultSet)</a></td><td class="bar" id="b6"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="7" alt="7"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d12"/><td class="ctr2" id="e12">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g12">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i3">4</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1
</td></tr><tr><td id="a7"><a href="DbUtils.java.html#L161" class="el_method">commitAndClose(Connection)</a></td><td class="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="7" alt="7"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d3"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i4">4</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a17"><a href="DbUtils.java.html#L314" class="el_method">rollbackAndClose(Connection)</a></td><td class="bar" id="b8"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="7" alt="7"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d4"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e1">10
0%</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g4">2</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i5">4</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a0"><a href="DbUtils.java.html#L59" class="el_method">close(Connection)</a></td><td class="bar" id="b9"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d5"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e2">100%</td><td class="ctr1" id="f9">0</td><td class="ctr2" id="g5">2</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i11">3</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a1"><a href="DbUtils.java.html#L71" class="el_method">close(ResultSet)</a></td><td class="bar" id="b10"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class=
"ctr2" id="c4">100%</td><td class="bar" id="d6"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e3">100%</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g6">2</td><td class="ctr1" id="h10">0</td><td class="ctr2" id="i12">3</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a2"><a href="DbUtils.java.html#L83" class="el_method">close(Statement)</a></td><td class="bar" id="b11"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d7"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e4">100%</td><td class="ctr1" id="f11">0</td><td class="ctr2" id="g7">2</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i13">3</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">1</td></tr><tr><td id="a3"><a href="DbUtils.java.html
#L96" class="el_method">closeQuietly(Connection)</a></td><td class="bar" id="b12"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d13"/><td class="ctr2" id="e13">n/a</td><td class="ctr1" id="f12">0</td><td class="ctr2" id="g13">1</td><td class="ctr1" id="h12">0</td><td class="ctr2" id="i6">4</td><td class="ctr1" id="j12">0</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a5"><a href="DbUtils.java.html#L134" class="el_method">closeQuietly(ResultSet)</a></td><td class="bar" id="b13"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c7">100%</td><td class="bar" id="d14"/><td class="ctr2" id="e14">n/a</td><td class="ctr1" id="f13">0</td><td class="ctr2" id="g14">1</td><td class="ctr1" id="h13">0</td><td class="ctr2" id="i7">4</td><td class="ctr1" id="j13">0</td><td class="ctr2" id="k13">1</td></tr><tr><td id="a6"><a href="DbUt
ils.java.html#L148" class="el_method">closeQuietly(Statement)</a></td><td class="bar" id="b14"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c8">100%</td><td class="bar" id="d15"/><td class="ctr2" id="e15">n/a</td><td class="ctr1" id="f14">0</td><td class="ctr2" id="g15">1</td><td class="ctr1" id="h14">0</td><td class="ctr2" id="i8">4</td><td class="ctr1" id="j14">0</td><td class="ctr2" id="k14">1</td></tr><tr><td id="a8"><a href="DbUtils.java.html#L178" class="el_method">commitAndCloseQuietly(Connection)</a></td><td class="bar" id="b15"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c9">100%</td><td class="bar" id="d16"/><td class="ctr2" id="e16">n/a</td><td class="ctr1" id="f15">0</td><td class="ctr2" id="g16">1</td><td class="ctr1" id="h15">0</td><td class="ctr2" id="i9">4</td><td class="ctr1" id="j15">0</td><td class="ctr2" id="k15">1</td></tr><tr><t
d id="a11"><a href="DbUtils.java.html#L192" class="el_method">loadDriver(String)</a></td><td class="bar" id="b16"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c10">100%</td><td class="bar" id="d17"/><td class="ctr2" id="e17">n/a</td><td class="ctr1" id="f16">0</td><td class="ctr2" id="g17">1</td><td class="ctr1" id="h16">0</td><td class="ctr2" id="i18">1</td><td class="ctr1" id="j16">0</td><td class="ctr2" id="k16">1</td></tr><tr><td id="a16"><a href="DbUtils.java.html#L300" class="el_method">rollback(Connection)</a></td><td class="bar" id="b17"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c11">100%</td><td class="bar" id="d8"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e5">100%</td><td class="ctr1" id="f17">0</td><td class="ctr2" id="g8">2</td><td class="ctr1" id="h17">0</td><td clas
s="ctr2" id="i14">3</td><td class="ctr1" id="j17">0</td><td class="ctr2" id="k17">1</td></tr><tr><td id="a18"><a href="DbUtils.java.html#L332" class="el_method">rollbackAndCloseQuietly(Connection)</a></td><td class="bar" id="b18"><img src="../jacoco-resources/greenbar.gif" width="12" height="10" title="5" alt="5"/></td><td class="ctr2" id="c12">100%</td><td class="bar" id="d18"/><td class="ctr2" id="e18">n/a</td><td class="ctr1" id="f18">0</td><td class="ctr2" id="g18">1</td><td class="ctr1" id="h18">0</td><td class="ctr2" id="i10">4</td><td class="ctr1" id="j18">0</td><td class="ctr2" id="k18">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.5.201910111838</span></div></body></html>
\ No newline at end of file