com.spss.psapi.resource

Interface ServerDatabaseConnection



  • public interface ServerDatabaseConnection
    This encapsulates the functionality of an object that represents a connection to a database.
    Since:
    PSAPI 1.0
    Author:
    Julian Clinton, Rob Duncan
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static interface  ServerDatabaseConnection.DBInfo
      Defines basic information about the database.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void dropTable(java.lang.String tableName)
      Drops the supplied table.
      ServerDatabaseConnection.DBInfo getDBInfo()
      Returns the database information.
      RowSet getDBQueryColumns(java.lang.String queryText)
      Returns a list of the columns returned by a specified database query.
      RowSet getDBTableColumns(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName)
      Returns a list of the columns in a specified database table.
      RowSet getDBTables(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName, boolean includeUserTables, boolean includeSystemTables, boolean includeViews, boolean includeSynonyms)
      Returns a summary of the tables available on this database connection which match the specified arguments.
      boolean isDBTableVisible(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName)
      Returns true if the specified table is visible to this connection.
    • Method Detail

      • isDBTableVisible

        boolean isDBTableVisible(java.lang.String catalogName,
                               java.lang.String schemaName,
                               java.lang.String tableName)
                                 throws ServerResourceException
        Returns true if the specified table is visible to this connection.
        Parameters:
        catalogName - the catalog name
        schemaName - the schema name
        tableName - the table name
        Returns:
        true if the specified table exists
        Throws:
        ServerResourceException - if the server resource cannot be accessed
      • getDBTables

        RowSet getDBTables(java.lang.String catalogName,
                         java.lang.String schemaName,
                         java.lang.String tableName,
                         boolean includeUserTables,
                         boolean includeSystemTables,
                         boolean includeViews,
                         boolean includeSynonyms)
                           throws ServerResourceException
        Returns a summary of the tables available on this database connection which match the specified arguments. The summary is returned in the form of a dataset with at least two columns, of which the first two columns are the schema name and table name, both as strings.
        Parameters:
        catalogName - pattern for the catalog name
        schemaName - pattern for the schema name
        tableName - pattern for the table name
        includeUserTables - indicates whether user tables should be included
        includeSystemTables - indicates whether systemtables should be included
        includeViews - indicates whether views should be included
        includeSynonyms - indicates whether synonyms should be included
        Returns:
        a row set of matching tables
        Throws:
        ServerResourceException - if the server resource cannot be accessed
      • getDBTableColumns

        RowSet getDBTableColumns(java.lang.String catalogName,
                               java.lang.String schemaName,
                               java.lang.String tableName)
                                 throws ServerResourceException
        Returns a list of the columns in a specified database table. The list is returned in the form of a dataset where the first column contains the column name as a string and the second column contains StorageType constants that provide the closest match for the storage types for the columns in the database table.
        Parameters:
        catalogName - the catalog name
        schemaName - the schema name
        tableName - the base table name
        Returns:
        a row set describing the columns of the table
        Throws:
        ServerResourceException - if the server resource cannot be accessed
        See Also:
        StorageType
      • getDBQueryColumns

        RowSet getDBQueryColumns(java.lang.String queryText)
                                 throws ServerResourceException
        Returns a list of the columns returned by a specified database query. The list is returned in the form of a dataset where the first column contains the column name as a string.
        Parameters:
        queryText - the text of the query
        Returns:
        a row set describing the columns of the query
        Throws:
        ServerResourceException - if the server resource cannot be accessed

Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.