## org.eclipse.datatools.sqltools.editor.core.connection
Interface ISQLEditorConnectionInfo

All Known Implementing Classes:
  SQLEditorConnectionInfo

public interface ISQLEditorConnectionInfo

This interface defines all the connection information require by a `SQLEditor`.

Author:
  Hui Cao

Method Summary
`java.lang.String` `encode()` Encodes the given `ISQLEditorConnectionInfo` object for persistency.
`IConnectionProfile` `getConnectionProfile()` Gets the `IConnectionProfile` object associated with this input.
`java.lang.String` `getConnectionProfileName()` Gets the `IConnectionProfile` name associated with this input.
`Database` `getDatabase()` Gets the `Database` object associated with this input.
`java.lang.String` `getDatabaseName()` Gets the database name associated with this input.
`DatabaseVendorDefinition` `getDatabaseVendorDefinition()` Gets the `DatabaseVendorDefinition` object associated with this input.
`DatabaseVendorDefinitionId` `getDatabaseVendorDefinitionId()` Gets the `DatabaseVendorDefinitionId` object associated with this input.
`java.lang.String` `getDefaultSchemaName()` Gets the default schema name to use with the connection or database associated with this input.
`java.lang.String` `getName()` Gets a representing this object.
`java.sql.Connection` `getSharedConnection()` Retrieves the shared connection.
`void` `setConnectionProfileName(java.lang.String profileName)` Sets the `IConnectionProfile` name associated with this input to the given object.
`void` `setDatabase(Database database)` Sets the `Database` object associated with this input to the given object.
`void` `setDatabaseVendorDefinitionId(DatabaseVendorDefinitionId dbVendorDefId)` Sets the `DatabaseVendorDefinitionId` associated with this input to the given object.
`void` `setDefaultSchemaName(java.lang.String schemaName)` Sets the default schema name to use with the connection or database associated with this input.

Method Detail

### getName

    public java.lang.String getName()

  Gets a representing this object. Contains connection profile name and database name if any.

  Returns:
    connection name

### getDatabaseVendorDefinition

    public DatabaseVendorDefinition getDatabaseVendorDefinition()

  Gets the `DatabaseVendorDefinition` object associated with this input. The `DatabaseVendorDefinition` object contains the information needed to do parsing, syntax highlighting, and syntax validation.

  Returns:
    the `DatabaseVendorDefinition` object associated with this input, can never be null. A default `DatabaseVendorDefinition` object will be return if not specified.

### getDatabaseVendorDefinitionId

    public DatabaseVendorDefinitionId getDatabaseVendorDefinitionId()

  Gets the `DatabaseVendorDefinitionId` object associated with this input. The `DatabaseVendorDefinitionId` object identifies a `DatabaseVendorDefinition` object

  Returns:
    the `DatabaseVendorDefinitionId` object associated with this input, can never be null. A default `DatabaseVendorDefinitionId` object will be return if not specified.

### getConnectionProfile

    public IConnectionProfile getConnectionProfile()

  Gets the `IConnectionProfile` object associated with this input. The `IConnectionProfile` object contains the information needed to connect to a database.

  Returns:
    the `IConnectionProfile` object associated with this input or `null` if none or profile name is invalid

### getConnectionProfileName

    public java.lang.String getConnectionProfileName()

  Gets the `IConnectionProfile` name associated with this input. The `IConnectionProfile` object contains the information needed to connect to a database.

  Returns:
    the `IConnectionProfile` name associated with this input or `null` if none

### getDatabase

    public Database getDatabase()

  Gets the `Database` object associated with this input. The `Database` object provides access to database metadata (catalog) information.

  Returns:
    the `Database` object associated with this input, or `null` if none

### getDatabaseName

    public java.lang.String getDatabaseName()

  Gets the database name associated with this input.

  Returns:
    the database name associated with this input, or `null` if none
  See Also:
    `getDatabase()`

### getDefaultSchemaName

    public java.lang.String getDefaultSchemaName()

  Gets the default schema name to use with the connection or database associated with this input.

  Returns:
    the default schema name to use with this input, or null if none

### setConnectionProfileName

    public void setConnectionProfileName(java.lang.String profileName)

  Sets the `IConnectionProfile` name associated with this input to the given object.

  Parameters:
    `profileName` - the `IConnectionProfile` name to set

### setDatabase

    public void setDatabase(Database database)

  Sets the `Database` object associated with this input to the given object.

  Parameters:
    `database` - the `Database` object to set

### setDefaultSchemaName

    public void setDefaultSchemaName(java.lang.String schemaName)

  Sets the default schema name to use with the connection or database associated with this input.

### setDatabaseVendorDefinitionId

    public void setDatabaseVendorDefinitionId(DatabaseVendorDefinitionId dbVendorDefId)

  Sets the `DatabaseVendorDefinitionId` associated with this input to the given object.

  Parameters:
    `dbVendorDefId` - the `DatabaseVendorDefinitionId` object to set

### getSharedConnection

    public java.sql.Connection getSharedConnection()

  Retrieves the shared connection.

  Returns:
    if no shared connection set, return null.

### encode

    public java.lang.String encode()

  Encodes the given `ISQLEditorConnectionInfo` object for persistency.

  Returns:
    A encoded String
  See Also:
    `decode()`

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.