@Test public void insertDatabaseSetTest() throws SQLException { DatabaseSet dbset = DatabaseSet.builder().name("name").build(); Assert.assertTrue(databaseSetService.insertDatabaseSet(dbset)); }
public boolean insertDatabaseSet(DatabaseSet dbset) throws SQLException { if (dbset.getStrategyType() == StrategyTypeEnum.NoStrategy.getType()) { dbset.setClassName(StringUtils.EMPTY); dbset.setStrategySource(StringUtils.EMPTY); } Long id = databaseSetDao.insertDatabaseSet(dbset); dbset.setId(id); return id > 0; }
DatabaseSetService { public boolean insertDatabaseSet(DatabaseSet dbset) throws SQLException { if (dbset.getStrategyType() == StrategyTypeEnum.NoStrategy.getType()) { dbset.setClassName(StringUtils.EMPTY); dbset.setStrategySource(StringUtils.EMPTY); } Long id = databaseSetDao.insertDatabaseSet(dbset); dbset.setId(id); return id > 0; } }
DatabaseSetService { public boolean insertDatabaseSet(DatabaseSet dbset) throws SQLException { if (dbset.getStrategyType() == StrategyTypeEnum.NoStrategy.getType()) { dbset.setClassName(StringUtils.EMPTY); dbset.setStrategySource(StringUtils.EMPTY); } Long id = databaseSetDao.insertDatabaseSet(dbset); dbset.setId(id); return id > 0; }  }
DatabaseSetService { public boolean insertDatabaseSet(DatabaseSet dbset) throws SQLException { if (dbset.getStrategyType() == StrategyTypeEnum.NoStrategy.getType()) { dbset.setClassName(StringUtils.EMPTY); dbset.setStrategySource(StringUtils.EMPTY); } Long id = databaseSetDao.insertDatabaseSet(dbset); dbset.setId(id); return id > 0; }  ValidatorChain validatePermision(LoginUser user, Errors errors); boolean insertDatabaseSet(DatabaseSet dbset); int updateDatabaseSet(DatabaseSet dbset); ServiceResult deleteCheck(Long dbsetId); boolean deleteDatabaseSet(Long dbsetId); ListResult<DatabaseSetView> findDbSetPageList(Paging<DatabaseSet> paging); List<DatabaseSet> getAllDatabaseSetByProjectId(Long projectId); List<DatabaseSet> getAllDatabaseSetByAppId(String appId); ListResult<DatabaseSetView> findDbSetPageListByAppid(Paging<DatabaseSet> paging); ServiceResult<String> addDataCenter(LoginUser user, DatabaseSet dbset); ServiceResult<String> updateDataCenter(LoginUser user, DatabaseSet newDbset); ServiceResult<String> deleteDataCenter(LoginUser user, DatabaseSet dbset); ServiceResult<String> syncDbSet(LoginUser user, DatabaseSet dbset); ConfigCkeckResult<List<ConfigDataResponse>> getCheckData(LoginUser user, DatabaseSet dbset); ServiceResult<String> getDbSetButton(LoginUser user); List<ConfigDataResponse> getAllCheckData(LoginUser user, Long gourpId, DatabaseSet dbset); }
DatabaseSetService { public boolean insertDatabaseSet(DatabaseSet dbset) throws SQLException { if (dbset.getStrategyType() == StrategyTypeEnum.NoStrategy.getType()) { dbset.setClassName(StringUtils.EMPTY); dbset.setStrategySource(StringUtils.EMPTY); } Long id = databaseSetDao.insertDatabaseSet(dbset); dbset.setId(id); return id > 0; }  ValidatorChain validatePermision(LoginUser user, Errors errors); boolean insertDatabaseSet(DatabaseSet dbset); int updateDatabaseSet(DatabaseSet dbset); ServiceResult deleteCheck(Long dbsetId); boolean deleteDatabaseSet(Long dbsetId); ListResult<DatabaseSetView> findDbSetPageList(Paging<DatabaseSet> paging); List<DatabaseSet> getAllDatabaseSetByProjectId(Long projectId); List<DatabaseSet> getAllDatabaseSetByAppId(String appId); ListResult<DatabaseSetView> findDbSetPageListByAppid(Paging<DatabaseSet> paging); ServiceResult<String> addDataCenter(LoginUser user, DatabaseSet dbset); ServiceResult<String> updateDataCenter(LoginUser user, DatabaseSet newDbset); ServiceResult<String> deleteDataCenter(LoginUser user, DatabaseSet dbset); ServiceResult<String> syncDbSet(LoginUser user, DatabaseSet dbset); ConfigCkeckResult<List<ConfigDataResponse>> getCheckData(LoginUser user, DatabaseSet dbset); ServiceResult<String> getDbSetButton(LoginUser user); List<ConfigDataResponse> getAllCheckData(LoginUser user, Long gourpId, DatabaseSet dbset);  }