Search in sources :

Example 1 with SQLAlias

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;
}
Also used : ISQLAlias(net.sourceforge.squirrel_sql.fw.sql.ISQLAlias) SQLAlias(net.sourceforge.sqlexplorer.SQLAlias)

Aggregations

SQLAlias (net.sourceforge.sqlexplorer.SQLAlias)1 ISQLAlias (net.sourceforge.squirrel_sql.fw.sql.ISQLAlias)1