use of net.sourceforge.sqlexplorer.SQLAlias in project tdi-studio-se by Talend.
the class SessionTreeNodeUtils method createSQLAlias.
/**
* @param url Connection Url
* @param userName DB username
* @param password DB password
* @param databaseName databaseName
* @param name RepositoryName
* @return ISQLAlias
*/
private static ISQLAlias createSQLAlias(String name, String url, String userName, String password, String databaseName) {
SQLAlias alias = new SQLAlias(IdentifierFactory.getInstance().createIdentifier());
try {
alias.setName(databaseName);
alias.setUrl(url);
alias.setUserName(userName);
alias.setPassword(password);
alias.setSchemaFilterExpression(databaseName);
//$NON-NLS-1$
alias.setFolderFilterExpression("Tables,Views,Synonyms");
} catch (Exception e) {
SqlBuilderPlugin.log(e.getMessage(), e);
}
return alias;
}