}
protected void validateProperties( final String userName, final String password) throws java.sql.SQLException {
String reason = reasonWhyInvalidApplicationName(this.applicationName);
if ( reason != null ) {
throw new SQLException(reason);
}
reason = reasonWhyInvalidDatabaseName(this.databaseName);
if ( reason != null ) {
throw new SQLException(reason);
}
reason = reasonWhyInvalidDatabaseVersion(this.databaseVersion);
if ( reason != null ) {
throw new SQLException(reason);
}
reason = reasonWhyInvalidDataSourceName(this.dataSourceName);
if ( reason != null ) {
throw new SQLException(reason);
}
reason = reasonWhyInvalidDescription(this.description);
if ( reason != null ) {
throw new SQLException(reason);
}
final String pwd = password != null ? password : getPassword();
reason = reasonWhyInvalidPassword(pwd);
if ( reason != null ) {
throw new SQLException(reason);
}
reason = reasonWhyInvalidPartialResultsMode(this.partialResultsMode);
if (reason != null) {
throw new SQLException(reason);
}
reason = reasonWhyInvalidFetchSize(this.fetchSize);
if (reason != null) {
throw new SQLException(reason);
}
final String user = userName != null ? userName : getUser();
reason = reasonWhyInvalidUser(user);
if ( reason != null ) {
throw new SQLException(reason);
}
reason = reasonWhyInvalidTransactionAutoWrap(this.transactionAutoWrap);
if ( reason != null ) {
throw new SQLException(reason);
}
if (this.queryTimeout < 0) {
throw new TeiidSQLException(JDBCPlugin.Util.getString("MMStatement.Bad_timeout_value")); //$NON-NLS-1$
}