@Test public void testIsTarget() throws Exception { TableDesc tableDesc = new TableDesc(); tableDesc.setCanonicalName("aaa.bbb.ccc"); DatabaseDesc databaseDesc = new DatabaseDesc(); databaseDesc.addTableDesc(tableDesc); File match = new File("aaa.bbb.ccc.csv"); File unmatch = new File("xxx.csv"); assertTrue(loader.isTarget(databaseDesc, match)); assertFalse(loader.isTarget(databaseDesc, unmatch)); }
public boolean isTarget(DatabaseDesc databaseDesc, File file) { if (databaseDesc == null || file == null) { return false; } if (!file.getName().endsWith(extension)) { return false; } if (getTableDesc(databaseDesc, file) == null) { return false; } return true; }
LoaderImpl implements Loader { public boolean isTarget(DatabaseDesc databaseDesc, File file) { if (databaseDesc == null || file == null) { return false; } if (!file.getName().endsWith(extension)) { return false; } if (getTableDesc(databaseDesc, file) == null) { return false; } return true; } }
LoaderImpl implements Loader { public boolean isTarget(DatabaseDesc databaseDesc, File file) { if (databaseDesc == null || file == null) { return false; } if (!file.getName().endsWith(extension)) { return false; } if (getTableDesc(databaseDesc, file) == null) { return false; } return true; } LoaderImpl(GenDialect dialect, String dumpFileEncoding,
            int batchSize, boolean delete); }
LoaderImpl implements Loader { public boolean isTarget(DatabaseDesc databaseDesc, File file) { if (databaseDesc == null || file == null) { return false; } if (!file.getName().endsWith(extension)) { return false; } if (getTableDesc(databaseDesc, file) == null) { return false; } return true; } LoaderImpl(GenDialect dialect, String dumpFileEncoding,
            int batchSize, boolean delete); void load(SqlExecutionContext sqlExecutionContext,
            DatabaseDesc databaseDesc, File dumpFile); boolean isTarget(DatabaseDesc databaseDesc, File file); }
LoaderImpl implements Loader { public boolean isTarget(DatabaseDesc databaseDesc, File file) { if (databaseDesc == null || file == null) { return false; } if (!file.getName().endsWith(extension)) { return false; } if (getTableDesc(databaseDesc, file) == null) { return false; } return true; } LoaderImpl(GenDialect dialect, String dumpFileEncoding,
            int batchSize, boolean delete); void load(SqlExecutionContext sqlExecutionContext,
            DatabaseDesc databaseDesc, File dumpFile); boolean isTarget(DatabaseDesc databaseDesc, File file);  }