You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ImportFilter.java 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2006 Health Market Science, Inc.
  2. package com.healthmarketscience.jackcess;
  3. import java.io.IOException;
  4. import java.sql.ResultSetMetaData;
  5. import java.sql.SQLException;
  6. import java.util.List;
  7. /**
  8. * Interface which allows customization of the behavior of the
  9. * <code>Database<</code> import/copy methods.
  10. *
  11. * @author James Ahlborn
  12. */
  13. public interface ImportFilter {
  14. /**
  15. * The columns that should be used to create the imported table.
  16. * @param destColumns the columns as determined by the import code, may be
  17. * directly modified and returned
  18. * @param srcColumns the sql metadata, only available if importing from a
  19. * JDBC source
  20. * @return the columns to use when creating the import table
  21. */
  22. public List<Column> filterColumns(List<Column> destColumns,
  23. ResultSetMetaData srcColumns)
  24. throws SQLException, IOException;
  25. /**
  26. * The desired values for the row.
  27. * @param row the row data as determined by the import code, may be directly
  28. * modified
  29. * @return the row data as it should be written to the import table
  30. */
  31. public Object[] filterRow(Object[] row)
  32. throws SQLException, IOException;
  33. }