Search in sources :

Example 1 with JdbcUrl

use of com.microsoft.azure.toolkit.lib.database.JdbcUrl in project azure-tools-for-java by Microsoft.

the class SqlServerPropertyView method onDatabaseComboBoxChanged.

private void onDatabaseComboBoxChanged(ItemEvent e) {
    if (e.getStateChange() == ItemEvent.SELECTED && e.getItem() instanceof SqlDatabaseEntity) {
        final SqlDatabaseEntity database = (SqlDatabaseEntity) e.getItem();
        SqlServerEntity entity = this.property.getServer().entity();
        JdbcUrl jdbcUrl = this.getJdbcUrl(entity.getFullyQualifiedDomainName(), database.getName(), overview.getServerAdminLoginNameTextField().getText());
        connectionStringsJDBC.getOutputTextArea().setText(DatabaseTemplateUtils.toJdbcTemplate(jdbcUrl));
        connectionStringsSpring.getOutputTextArea().setText(DatabaseTemplateUtils.toSpringTemplate(jdbcUrl, SQLSERVER_DRIVER_CLASS_NAME));
    }
}
Also used : JdbcUrl(com.microsoft.azure.toolkit.lib.database.JdbcUrl) SqlServerEntity(com.microsoft.azure.toolkit.lib.sqlserver.model.SqlServerEntity) SqlDatabaseEntity(com.microsoft.azure.toolkit.lib.sqlserver.model.SqlDatabaseEntity)

Aggregations

JdbcUrl (com.microsoft.azure.toolkit.lib.database.JdbcUrl)1 SqlDatabaseEntity (com.microsoft.azure.toolkit.lib.sqlserver.model.SqlDatabaseEntity)1 SqlServerEntity (com.microsoft.azure.toolkit.lib.sqlserver.model.SqlServerEntity)1