@Test public void validateSqlQueryTabularInputsValid() throws Exception { final List<String> validationList = validateSqlQueryTabularInputs("1", MSSQL_DB_TYPE, "username", "Password", "someInstance", "123", "database", AUTH_SQL, "Command", "true", EMPTY, EMPTY, "1", TYPE_FORWARD_ONLY, CONCUR_READ_ONLY, EMPTY); assertThat(validationList, is(Collections.<String>emptyList())); }
public static List<String> validateSqlQueryTabularInputs(String dbServerName, String dbType, String username, String password, String instance, String dbPort, String database, String authenticationType, String command, String trustAllRoots, String trustStore, String trustStorePassword, String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath) { final List<String> validationList = validateCommonSqlInputs(dbServerName, dbType, username, password, instance, dbPort, database, authenticationType, trustAllRoots, trustStore, trustStorePassword, resultSetType, resultSetConcurrency, authLibraryPath); validateNoneEmpty(command, INVALID_COMMAND, validationList); validateTimeout(timeout, validationList); return validationList; }
SQLInputsValidator { public static List<String> validateSqlQueryTabularInputs(String dbServerName, String dbType, String username, String password, String instance, String dbPort, String database, String authenticationType, String command, String trustAllRoots, String trustStore, String trustStorePassword, String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath) { final List<String> validationList = validateCommonSqlInputs(dbServerName, dbType, username, password, instance, dbPort, database, authenticationType, trustAllRoots, trustStore, trustStorePassword, resultSetType, resultSetConcurrency, authLibraryPath); validateNoneEmpty(command, INVALID_COMMAND, validationList); validateTimeout(timeout, validationList); return validationList; } }
SQLInputsValidator { public static List<String> validateSqlQueryTabularInputs(String dbServerName, String dbType, String username, String password, String instance, String dbPort, String database, String authenticationType, String command, String trustAllRoots, String trustStore, String trustStorePassword, String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath) { final List<String> validationList = validateCommonSqlInputs(dbServerName, dbType, username, password, instance, dbPort, database, authenticationType, trustAllRoots, trustStore, trustStorePassword, resultSetType, resultSetConcurrency, authLibraryPath); validateNoneEmpty(command, INVALID_COMMAND, validationList); validateTimeout(timeout, validationList); return validationList; }  }
SQLInputsValidator { public static List<String> validateSqlQueryTabularInputs(String dbServerName, String dbType, String username, String password, String instance, String dbPort, String database, String authenticationType, String command, String trustAllRoots, String trustStore, String trustStorePassword, String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath) { final List<String> validationList = validateCommonSqlInputs(dbServerName, dbType, username, password, instance, dbPort, database, authenticationType, trustAllRoots, trustStore, trustStorePassword, resultSetType, resultSetConcurrency, authLibraryPath); validateNoneEmpty(command, INVALID_COMMAND, validationList); validateTimeout(timeout, validationList); return validationList; }  static List<String> validateSqlCommandInputs(String dbServerName, String dbType, String username, String password, String instance, String dbPort,
                                                        String database, String authenticationType, String command, String trustAllRoots,
                                                        String resultSetType, String resultSetConcurrency, String trustStore,
                                                        String trustStorePassword, String authLibraryPath); static List<String> validateSqlQueryInputs(String dbServerName, String dbType, String username, String password,
                                                      String instance, String dbPort, String database, String authenticationType, String command,
                                                      String trustAllRoots, String trustStore, String trustStorePassword,
                                                      String timeout, String resultSetType, String resultSetConcurrency, String ignoreCase, String authLibraryPath); static List<String> validateSqlQueryAllRowsInputs(String dbServerName, String dbType, String username, String password,
                                                             String instance, String dbPort, String database, String authenticationType, String command,
                                                             String trustAllRoots, String trustStore, String trustStorePassword,
                                                             String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath); static List<String> validateSqlQueryLOBInputs(String dbServerName, String dbType, String username, String password,
                                                         String instance, String dbPort, String database, String authenticationType, String command,
                                                         String trustAllRoots, String trustStore, String trustStorePassword,
                                                         String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath); static List<String> validateSqlQueryTabularInputs(String dbServerName, String dbType, String username, String password,
                                                             String instance, String dbPort, String database, String authenticationType, String command,
                                                             String trustAllRoots, String trustStore, String trustStorePassword,
                                                             String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath); static List<String> validateSqlScriptInputs(String dbServerName, String dbType, String username, String password,
                                                       String instance, String dbPort, String database, String authenticationType, String sqlCommands, String scriptFileName,
                                                       String trustAllRoots, String trustStore, String trustStorePassword,
                                                       String resultSetType, String resultSetConcurrency, String authLibraryPath); static boolean isValidAuthType(final String authType); static boolean isNotValidAuthType(final String authType); static boolean isValidDbType(final String dbType); static boolean isNotValidDbType(final String dbType); static boolean isValidResultSetConcurrency(final String resultSetConcurrency); static boolean isValidResultSetType(final String resultSetType); }
SQLInputsValidator { public static List<String> validateSqlQueryTabularInputs(String dbServerName, String dbType, String username, String password, String instance, String dbPort, String database, String authenticationType, String command, String trustAllRoots, String trustStore, String trustStorePassword, String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath) { final List<String> validationList = validateCommonSqlInputs(dbServerName, dbType, username, password, instance, dbPort, database, authenticationType, trustAllRoots, trustStore, trustStorePassword, resultSetType, resultSetConcurrency, authLibraryPath); validateNoneEmpty(command, INVALID_COMMAND, validationList); validateTimeout(timeout, validationList); return validationList; }  static List<String> validateSqlCommandInputs(String dbServerName, String dbType, String username, String password, String instance, String dbPort,
                                                        String database, String authenticationType, String command, String trustAllRoots,
                                                        String resultSetType, String resultSetConcurrency, String trustStore,
                                                        String trustStorePassword, String authLibraryPath); static List<String> validateSqlQueryInputs(String dbServerName, String dbType, String username, String password,
                                                      String instance, String dbPort, String database, String authenticationType, String command,
                                                      String trustAllRoots, String trustStore, String trustStorePassword,
                                                      String timeout, String resultSetType, String resultSetConcurrency, String ignoreCase, String authLibraryPath); static List<String> validateSqlQueryAllRowsInputs(String dbServerName, String dbType, String username, String password,
                                                             String instance, String dbPort, String database, String authenticationType, String command,
                                                             String trustAllRoots, String trustStore, String trustStorePassword,
                                                             String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath); static List<String> validateSqlQueryLOBInputs(String dbServerName, String dbType, String username, String password,
                                                         String instance, String dbPort, String database, String authenticationType, String command,
                                                         String trustAllRoots, String trustStore, String trustStorePassword,
                                                         String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath); static List<String> validateSqlQueryTabularInputs(String dbServerName, String dbType, String username, String password,
                                                             String instance, String dbPort, String database, String authenticationType, String command,
                                                             String trustAllRoots, String trustStore, String trustStorePassword,
                                                             String timeout, String resultSetType, String resultSetConcurrency, String authLibraryPath); static List<String> validateSqlScriptInputs(String dbServerName, String dbType, String username, String password,
                                                       String instance, String dbPort, String database, String authenticationType, String sqlCommands, String scriptFileName,
                                                       String trustAllRoots, String trustStore, String trustStorePassword,
                                                       String resultSetType, String resultSetConcurrency, String authLibraryPath); static boolean isValidAuthType(final String authType); static boolean isNotValidAuthType(final String authType); static boolean isValidDbType(final String dbType); static boolean isNotValidDbType(final String dbType); static boolean isValidResultSetConcurrency(final String resultSetConcurrency); static boolean isValidResultSetType(final String resultSetType);  }