@Test public void tableConsistentTest() throws Exception { Assert.assertTrue(setupDataBaseService.tableConsistent("code_gen")); }
public boolean tableConsistent(String catalog) throws Exception { Set<String> catalogTableNames = setupDBDao.getCatalogTableNames(catalog); if (CollectionUtils.isEmpty(catalogTableNames)) { return false; } String scriptContent = ResourceUtil.getSingleInstance().getScriptContent(SCRIPT_FILE); Set<String> scriptTableNames = getScriptTableNames(scriptContent); if (CollectionUtils.isNotEmpty(scriptTableNames)) { for (String tableName : scriptTableNames) { if (!catalogTableNames.contains(tableName)) { return false; } } } return true; }
SetupDataBaseService { public boolean tableConsistent(String catalog) throws Exception { Set<String> catalogTableNames = setupDBDao.getCatalogTableNames(catalog); if (CollectionUtils.isEmpty(catalogTableNames)) { return false; } String scriptContent = ResourceUtil.getSingleInstance().getScriptContent(SCRIPT_FILE); Set<String> scriptTableNames = getScriptTableNames(scriptContent); if (CollectionUtils.isNotEmpty(scriptTableNames)) { for (String tableName : scriptTableNames) { if (!catalogTableNames.contains(tableName)) { return false; } } } return true; } }
SetupDataBaseService { public boolean tableConsistent(String catalog) throws Exception { Set<String> catalogTableNames = setupDBDao.getCatalogTableNames(catalog); if (CollectionUtils.isEmpty(catalogTableNames)) { return false; } String scriptContent = ResourceUtil.getSingleInstance().getScriptContent(SCRIPT_FILE); Set<String> scriptTableNames = getScriptTableNames(scriptContent); if (CollectionUtils.isNotEmpty(scriptTableNames)) { for (String tableName : scriptTableNames) { if (!catalogTableNames.contains(tableName)) { return false; } } } return true; }  }
SetupDataBaseService { public boolean tableConsistent(String catalog) throws Exception { Set<String> catalogTableNames = setupDBDao.getCatalogTableNames(catalog); if (CollectionUtils.isEmpty(catalogTableNames)) { return false; } String scriptContent = ResourceUtil.getSingleInstance().getScriptContent(SCRIPT_FILE); Set<String> scriptTableNames = getScriptTableNames(scriptContent); if (CollectionUtils.isNotEmpty(scriptTableNames)) { for (String tableName : scriptTableNames) { if (!catalogTableNames.contains(tableName)) { return false; } } } return true; }  ServiceResult connectionTest(ConnectionRequest connectionRequest); boolean tableConsistent(String catalog); boolean setupAdmin(DasGroup dasGroup, LoginUser user); boolean isDalInitialized(); }
SetupDataBaseService { public boolean tableConsistent(String catalog) throws Exception { Set<String> catalogTableNames = setupDBDao.getCatalogTableNames(catalog); if (CollectionUtils.isEmpty(catalogTableNames)) { return false; } String scriptContent = ResourceUtil.getSingleInstance().getScriptContent(SCRIPT_FILE); Set<String> scriptTableNames = getScriptTableNames(scriptContent); if (CollectionUtils.isNotEmpty(scriptTableNames)) { for (String tableName : scriptTableNames) { if (!catalogTableNames.contains(tableName)) { return false; } } } return true; }  ServiceResult connectionTest(ConnectionRequest connectionRequest); boolean tableConsistent(String catalog); boolean setupAdmin(DasGroup dasGroup, LoginUser user); boolean isDalInitialized(); static final Object LOCK; final static String DATASOURCE_MYSQL_DRIVER; final static String jdbcUrlTemplate; }