Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.dsp.management.beans
Class RDBDataSourceConfig

    java.lang.Object
      com.bea.dsp.management.beans.DataSourceConfig
          com.bea.dsp.management.beans.HierarchicalDataSourceConfig
              com.bea.dsp.management.beans.RDBDataSourceConfig

All Implemented Interfaces:
  Validatable, java.io.Serializable

    public final class RDBDataSourceConfig

extends HierarchicalDataSourceConfig

Data source configuration for relational data bases.

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class com.bea.dsp.management.beans.DataSourceConfig
`DataSourceConfig.ServiceAccountScope`

Constructor Summary
`RDBDataSourceConfig(java.lang.String id)`

Method Summary
`void` | `addOrUpdateSqlStatementSubstitutionRule(SqlStatementSubstitutionRuleConfig config)` Add or updates the passed rule.
`static boolean` | `areSqlEqual(java.lang.String sql1, java.lang.String sql2)` Returns `true` if the two sql strings are equals after being normalized.
`void` | `deleteSqlStatementSubstitutionRule(java.lang.String generatedSql)` Delete the rule associated with the passed generated sql.
`java.util.Collection<SqlStatementSubstitutionRuleConfig>` | `getAllSqlStatementSubstitutionRules()` Returns a non-null collection of all the defined sql statement substitution rules.
`java.lang.String` | `getNewCatalogName(java.lang.String originalCatalogName)` Returns the new configured name for the passed original catalog name.
`java.lang.String` | `getNewPackageName(java.lang.String originalCatalogName, java.lang.String originalSchemaName, java.lang.String originalPackageName)` Return the new name configured for the passed original package name.
`java.lang.String` | `getNewSchemaName(java.lang.String originalCatalogName, java.lang.String originalSchemaName)` Returns the new configured name of the passed original schema name.
`java.util.Set<java.lang.String>` | `getOriginalCatalogNames()` Returns a non null set containing all the catalog names.
`java.util.Set<java.lang.String>` | `getOriginalPackageNames(java.lang.String originalCatalogName, java.lang.String originalSchemaName)` Returns a non null set of all the package names.
`java.util.Set<java.lang.String>` | `getOriginalSchemaNames(java.lang.String originalCatalogName)` Returns a non null set of all the schema names within the passed catalog.
`EndPointConfig` | `getProceduralEndPoint(java.lang.String originalCatalogName, java.lang.String originalSchemaName, java.lang.String originalPackageName, EndPointName endPointName)`
`java.util.Collection<EndPointConfig>` | `getProceduralEndPoints(java.lang.String originalCatalogName, java.lang.String originalSchemaName, java.lang.String originalPackageName)`
`SqlStatementSubstitutionRuleConfig` | `getSqlStatementSubstitutionRuleByName(java.lang.String name)` Returns the sql statement substitution rule having the passed name.
`SqlStatementSubstitutionRuleConfig` | `getSqlStatementSubstitutionRuleBySql(java.lang.String sql)` Returns the sql statement substitution rule for the passed sql.
`EndPointConfig` | `getTabularEndPoint(java.lang.String originalCatalogName, java.lang.String originalSchemaName, EndPointName endPointName)` Return a endpoint config object for the passed tabular endpoint name.
`java.util.Collection<EndPointConfig>` | `getTabularEndPoints(java.lang.String originalCatalogName, java.lang.String originalSchemaName)` Returns a non null collection of end points within this schema.
`boolean` | `hasSqlStatementSubstitutionRule()` Returns `true` if any sql statement substitution rule has been defined for this datasource.
`static java.lang.String` | `normalizeSQLStatement(java.lang.String sqlStatement)` Normalizes SQL statement so it can be used as a key in the SQL substitution table
`void` | `setNewCatalogName(java.lang.String originalCatalogName, java.lang.String newCatalogName)` Set a new name for a catalog.
`void` | `setNewPackageName(java.lang.String originalCatalogName, java.lang.String originalSchemaName, java.lang.String originalPackageName, java.lang.String newPackageName)` Set a new name for the passed package name.
`void` | `setNewSchemaName(java.lang.String originalCatalogName, java.lang.String originalSchemaName, java.lang.String newSchemaName)` Set the new name for the passed schema.
`void` | `updateSqlStatementSubstitutionRules(java.util.Collection<SqlStatementSubstitutionRuleConfig> configs)` Updates in the internal collection with the passed set of rules.

Methods inherited from class com.bea.dsp.management.beans.HierarchicalDataSourceConfig
`getContainer, getContainers, getEndPoint, getEndPoints`

Methods inherited from class com.bea.dsp.management.beans.DataSourceConfig
`getDataSourceId, getDependents, getNewId, getServiceAccountName, getServiceAccountNames, readResolve, setNewId, setServiceAccountName, setServiceAccountNames, validate, writeReplace`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RDBDataSourceConfig

    public RDBDataSourceConfig(java.lang.String id)

Method Detail

### getOriginalCatalogNames

    public java.util.Set<java.lang.String> getOriginalCatalogNames()

  Returns a non null set containing all the catalog names. If the data source does not support catalog then set is empty.

  Returns:
    catalog names

### getNewCatalogName

    public java.lang.String getNewCatalogName(java.lang.String originalCatalogName)

  Returns the new configured name for the passed original catalog name.

  Parameters:
    `originalCatalogName` -
  Returns:
    new catalog name

### setNewCatalogName

    public void setNewCatalogName(java.lang.String originalCatalogName,
                                  java.lang.String newCatalogName)
                           throws ValidationException

  Set a new name for a catalog.

  Parameters:
    `originalCatalogName` -
    `newCatalogName` -
  Throws:
    `ValidationException`

### getOriginalSchemaNames

    public java.util.Set<java.lang.String> getOriginalSchemaNames(java.lang.String originalCatalogName)

  Returns a non null set of all the schema names within the passed catalog. The passed catalog name can be null if the datasource does not support catalog. Similarly if the datasource does not contain schemas then the returned set is empty.

  Parameters:
    `originalCatalogName` -
  Returns:
    non null set of all the schema names

### getNewSchemaName

    public java.lang.String getNewSchemaName(java.lang.String originalCatalogName,
                                             java.lang.String originalSchemaName)

  Returns the new configured name of the passed original schema name. originalCatalogName can be null.

  Parameters:
    `originalCatalogName` -
    `originalSchemaName` -
  Returns:
    new schema name

### setNewSchemaName

    public void setNewSchemaName(java.lang.String originalCatalogName,
                                 java.lang.String originalSchemaName,
                                 java.lang.String newSchemaName)
                          throws ValidationException

  Set the new name for the passed schema. Catalog name can be null but originalSchemaName cannot be null.

  Parameters:
    `originalCatalogName` -
    `originalSchemaName` -
    `newSchemaName` -
  Throws:
    `ValidationException` - if such a schema does not exist.

### getTabularEndPoints

    public java.util.Collection<EndPointConfig> getTabularEndPoints(java.lang.String originalCatalogName,
                                                                    java.lang.String originalSchemaName)

  Returns a non null collection of end points within this schema. It returns endpoints for tables and views. It does not returns the procedural endpoints like stored procedures etc. There is a separate method for that. Both the catalog and the schema name can be null. New name for end points can be set directly on the returned endpoints.

  Parameters:
    `originalCatalogName` -
    `originalSchemaName` -
  Returns:
    end points

### getTabularEndPoint

    public EndPointConfig getTabularEndPoint(java.lang.String originalCatalogName,
                                             java.lang.String originalSchemaName,
                                             EndPointName endPointName)

  Return a endpoint config object for the passed tabular endpoint name. Use this method to fetch endpoints for tables and views. Both the catalog and the schema name can be null.

  Parameters:
    `originalCatalogName` -
    `originalSchemaName` -
    `endPointName` -
  Returns:
    endpoint config for the passed tabular endpoint

### getOriginalPackageNames

    public java.util.Set<java.lang.String> getOriginalPackageNames(java.lang.String originalCatalogName,
                                                                   java.lang.String originalSchemaName)

  Returns a non null set of all the package names. Both the catalog name and the schema name can be null if they are not supported by the database. If packages are not supported by the database or procedures have been created outside of packages then this set is empty.

  Parameters:
    `originalCatalogName` -
    `originalSchemaName` -
  Returns:

### getNewPackageName

    public java.lang.String getNewPackageName(java.lang.String originalCatalogName,
                                              java.lang.String originalSchemaName,
                                              java.lang.String originalPackageName)

  Return the new name configured for the passed original package name. The value returned could be null if the package does not exist or if no new name has been configured for that package. Both the catalog and the schema name can be null.

  Parameters:
    `originalCatalogName` -
    `originalSchemaName` -
    `originalPackageName` -
  Returns:
    new name for the package

### setNewPackageName

    public void setNewPackageName(java.lang.String originalCatalogName,
                                  java.lang.String originalSchemaName,
                                  java.lang.String originalPackageName,
                                  java.lang.String newPackageName)
                           throws ValidationException

  Set a new name for the passed package name. Both the catalog name and the schema name can be null if they are not supported by the database.

  Parameters:
    `originalCatalogName` -
    `originalSchemaName` -
    `originalPackageName` -
    `newPackageName` -
  Throws:
    `ValidationException`

### getProceduralEndPoints

    public java.util.Collection<EndPointConfig> getProceduralEndPoints(java.lang.String originalCatalogName,
                                                                       java.lang.String originalSchemaName,
                                                                       java.lang.String originalPackageName)

### getProceduralEndPoint

    public EndPointConfig getProceduralEndPoint(java.lang.String originalCatalogName,
                                                java.lang.String originalSchemaName,
                                                java.lang.String originalPackageName,
                                                EndPointName endPointName)

### hasSqlStatementSubstitutionRule

    public boolean hasSqlStatementSubstitutionRule()

  Returns `true` if any sql statement substitution rule has been defined for this datasource.

  Returns:

### getSqlStatementSubstitutionRuleBySql

    public SqlStatementSubstitutionRuleConfig getSqlStatementSubstitutionRuleBySql(java.lang.String sql)

  Returns the sql statement substitution rule for the passed sql. The passed sql is first normalized before comparison. This method may return null if no rule is defined for this sql.

  Parameters:
    `sql` -
  Returns:
    the sql statement substitution rule for the passed sql
  See Also:
    `normalizeSQLStatement(String)`

### getAllSqlStatementSubstitutionRules

    public java.util.Collection<SqlStatementSubstitutionRuleConfig> getAllSqlStatementSubstitutionRules()

  Returns a non-null collection of all the defined sql statement substitution rules.

### addOrUpdateSqlStatementSubstitutionRule

    public void addOrUpdateSqlStatementSubstitutionRule(SqlStatementSubstitutionRuleConfig config)

  Add or updates the passed rule. Note that internally the rules are keyed on the generated sql. If a rule with the same generated sql exists then it is updated otherwise a new entry is added.

  Parameters:
    `config` -

### deleteSqlStatementSubstitutionRule

    public void deleteSqlStatementSubstitutionRule(java.lang.String generatedSql)

  Delete the rule associated with the passed generated sql.

  Parameters:
    `generatedSql` -

### updateSqlStatementSubstitutionRules

    public void updateSqlStatementSubstitutionRules(java.util.Collection<SqlStatementSubstitutionRuleConfig> configs)

  Updates in the internal collection with the passed set of rules. If the passed collection is null then all the rules are cleared.

  Parameters:
    `configs` -

### getSqlStatementSubstitutionRuleByName

    public SqlStatementSubstitutionRuleConfig getSqlStatementSubstitutionRuleByName(java.lang.String name)

  Returns the sql statement substitution rule having the passed name. Returned value can be null incase no rule with this name is defined.

  Parameters:
    `name` -
  Returns:
    the sql statement substitution rule having the passed name

### areSqlEqual

    public static boolean areSqlEqual(java.lang.String sql1,
                                      java.lang.String sql2)

  Returns `true` if the two sql strings are equals after being normalized.

  Parameters:
    `sql1` -
    `sql2` -

### normalizeSQLStatement

    public static java.lang.String normalizeSQLStatement(java.lang.String sqlStatement)

  Normalizes SQL statement so it can be used as a key in the SQL substitution table

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 Oracle. All Rights Reserved.