if (preferences.getAllowIncorrectSchemaVersion()) { log.warning(errorMessage.toString()); } else {
if (preferences.getAllowIncorrectSchemaVersion()) { log.warning(errorMessage.toString()); } else {
/** * Utility method for retrieving the login credentials for a database connection. * * @param taskConfig Contains all information required to instantiate and configure the task. * @return The value of the argument. */ protected DatabasePreferences getDatabasePreferences(TaskConfiguration taskConfig) { DatabasePreferences preferences; // Create a new preferences object with default values. preferences = new DatabasePreferences(DatabaseConstants.TASK_DEFAULT_VALIDATE_SCHEMA_VERSION, DatabaseConstants.TASK_ALLOW_INCORRECT_SCHEMA_VERSION); // Update the preferences with any explicit arguments provided on the // command line. preferences.setValidateSchemaVersion(getBooleanArgument(taskConfig, DatabaseConstants.TASK_ARG_VALIDATE_SCHEMA_VERSION, preferences.getValidateSchemaVersion())); preferences .setAllowIncorrectSchemaVersion(getBooleanArgument(taskConfig, DatabaseConstants.TASK_ARG_ALLOW_INCORRECT_SCHEMA_VERSION, preferences .getAllowIncorrectSchemaVersion())); return preferences; } }
/** * Utility method for retrieving the login credentials for a database connection. * * @param taskConfig Contains all information required to instantiate and configure the task. * @return The value of the argument. */ protected DatabasePreferences getDatabasePreferences(TaskConfiguration taskConfig) { DatabasePreferences preferences; // Create a new preferences object with default values. preferences = new DatabasePreferences(DatabaseConstants.TASK_DEFAULT_VALIDATE_SCHEMA_VERSION, DatabaseConstants.TASK_ALLOW_INCORRECT_SCHEMA_VERSION); // Update the preferences with any explicit arguments provided on the // command line. preferences.setValidateSchemaVersion(getBooleanArgument(taskConfig, DatabaseConstants.TASK_ARG_VALIDATE_SCHEMA_VERSION, preferences.getValidateSchemaVersion())); preferences .setAllowIncorrectSchemaVersion(getBooleanArgument(taskConfig, DatabaseConstants.TASK_ARG_ALLOW_INCORRECT_SCHEMA_VERSION, preferences .getAllowIncorrectSchemaVersion())); return preferences; } }