Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

SimpleImportFilter.java 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. Copyright (c) 2007 Health Market Science, Inc.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package com.healthmarketscience.jackcess.util;
  14. import java.io.IOException;
  15. import java.sql.ResultSetMetaData;
  16. import java.sql.SQLException;
  17. import java.util.List;
  18. import com.healthmarketscience.jackcess.ColumnBuilder;
  19. /**
  20. * Simple concrete implementation of ImportFilter which just returns the given
  21. * values.
  22. *
  23. * @author James Ahlborn
  24. * @usage _general_class_
  25. */
  26. public class SimpleImportFilter implements ImportFilter {
  27. public static final SimpleImportFilter INSTANCE = new SimpleImportFilter();
  28. public SimpleImportFilter() {
  29. }
  30. @Override
  31. public List<ColumnBuilder> filterColumns(List<ColumnBuilder> destColumns,
  32. ResultSetMetaData srcColumns)
  33. throws SQLException, IOException
  34. {
  35. return destColumns;
  36. }
  37. @Override
  38. public Object[] filterRow(Object[] row)
  39. throws SQLException, IOException
  40. {
  41. return row;
  42. }
  43. }