Coverage Report - com.healthmarketscience.jackcess.SimpleImportFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleImportFilter
100%
5/5
N/A
0
 
 1  
 /*
 2  
 Copyright (c) 2007 Health Market Science, Inc.
 3  
 
 4  
 This library is free software; you can redistribute it and/or
 5  
 modify it under the terms of the GNU Lesser General Public
 6  
 License as published by the Free Software Foundation; either
 7  
 version 2.1 of the License, or (at your option) any later version.
 8  
 
 9  
 This library is distributed in the hope that it will be useful,
 10  
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 11  
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 12  
 Lesser General Public License for more details.
 13  
 
 14  
 You should have received a copy of the GNU Lesser General Public
 15  
 License along with this library; if not, write to the Free Software
 16  
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 17  
 USA
 18  
 
 19  
 You can contact Health Market Science at info@healthmarketscience.com
 20  
 or at the following address:
 21  
 
 22  
 Health Market Science
 23  
 2700 Horizon Drive
 24  
 Suite 200
 25  
 King of Prussia, PA 19406
 26  
 */
 27  
 
 28  
 package com.healthmarketscience.jackcess;
 29  
 
 30  
 import java.io.IOException;
 31  
 import java.sql.ResultSetMetaData;
 32  
 import java.sql.SQLException;
 33  
 import java.util.List;
 34  
 
 35  
 /**
 36  
  * Simple concrete implementation of ImportFilter which just returns the given
 37  
  * values.
 38  
  *
 39  
  * @author James Ahlborn
 40  
  */
 41  
 public class SimpleImportFilter implements ImportFilter {
 42  
 
 43  1
   public static final SimpleImportFilter INSTANCE = new SimpleImportFilter();
 44  
   
 45  1
   public SimpleImportFilter() {
 46  1
   }
 47  
   
 48  
   public List<Column> filterColumns(List<Column> destColumns,
 49  
                                     ResultSetMetaData srcColumns)
 50  
      throws SQLException, IOException
 51  
   {
 52  3
     return destColumns;
 53  
   }
 54  
 
 55  
   public Object[] filterRow(Object[] row)
 56  
     throws SQLException, IOException
 57  
   {
 58  2
     return row;
 59  
   }
 60  
 
 61  
 }