Interface DatabaseManagerInterface

  • All Known Implementing Classes:
    DatabaseManagerClient

    public interface DatabaseManagerInterface
    DatabaseManagerInterface defines the client side interface for the Data Manager OMAS that is relevant for relational database assets. It provides the ability to define and maintain the metadata about a database and the schemas (tables and columns) it contains.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void addForeignKeyRelationship​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String primaryKeyColumnGUID, java.lang.String foreignKeyColumnGUID, DatabaseForeignKeyProperties databaseForeignKeyProperties)
      Create a foreign relationship between two columns.
      void attachSchemaTypeToDatabaseAsset​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseAssetGUID, java.lang.String schemaTypeGUID)
      Link the schema type and asset.
      java.lang.String createDatabase​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, DatabaseProperties databaseProperties)
      Create a new metadata element to represent a database.
      java.lang.String createDatabaseColumn​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseTableGUID, DatabaseColumnProperties databaseColumnProperties)
      Create a new metadata element to represent a database column.
      java.lang.String createDatabaseColumnFromTemplate​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String templateGUID, java.lang.String databaseTableGUID, TemplateProperties templateProperties)
      Create a new metadata element to represent a database column using an existing metadata element as a template.
      java.lang.String createDatabaseFromTemplate​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String templateGUID, TemplateProperties templateProperties)
      Create a new metadata element to represent a database using an existing metadata element as a template.
      java.lang.String createDatabaseSchema​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseGUID, DatabaseSchemaProperties databaseSchemaProperties)
      Create a new metadata element to represent a database schema.
      java.lang.String createDatabaseSchemaFromTemplate​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String templateGUID, java.lang.String databaseGUID, TemplateProperties templateProperties)
      Create a new metadata element to represent a database schema using an existing metadata element as a template.
      java.lang.String createDatabaseSchemaType​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String qualifiedName)
      Create a database top-level schema type used to attach tables and views to the database/database schema.
      java.lang.String createDatabaseTable​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseAssetGUID, DatabaseTableProperties databaseTableProperties)
      Create a new metadata element to represent a database table.
      java.lang.String createDatabaseTableForSchemaType​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseSchemaTypeGUID, DatabaseTableProperties databaseTableProperties)
      Create a new metadata element to represent a database table.
      java.lang.String createDatabaseTableFromTemplate​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String templateGUID, java.lang.String databaseAssetGUID, TemplateProperties templateProperties)
      Create a new metadata element to represent a database table using an existing metadata element as a template.
      java.lang.String createDatabaseView​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseAssetGUID, DatabaseViewProperties databaseViewProperties)
      Create a new metadata element to represent a database view.
      java.lang.String createDatabaseViewForSchemaType​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseSchemaTypeGUID, DatabaseViewProperties databaseViewProperties)
      Create a new metadata element to represent a database view.
      java.lang.String createDatabaseViewFromTemplate​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String templateGUID, java.lang.String databaseAssetGUID, TemplateProperties templateProperties)
      Create a new metadata element to represent a database view using an existing metadata element as a template.
      java.util.List<DatabaseColumnElement> findDatabaseColumns​(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize)
      Retrieve the list of database column metadata elements that contain the search string.
      java.util.List<DatabaseElement> findDatabases​(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize)
      Retrieve the list of database metadata elements that contain the search string.
      java.util.List<DatabaseSchemaElement> findDatabaseSchemas​(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize)
      Retrieve the list of database schema metadata elements that contain the search string.
      java.util.List<DatabaseTableElement> findDatabaseTables​(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize)
      Retrieve the list of database table metadata elements that contain the search string.
      java.util.List<DatabaseViewElement> findDatabaseViews​(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize)
      Retrieve the list of database view metadata elements that contain the search string.
      java.util.List<DatabaseColumnElement> getColumnsForDatabaseTable​(java.lang.String userId, java.lang.String databaseTableGUID, int startFrom, int pageSize)
      Retrieve the list of column for a database table (or view)
      DatabaseElement getDatabaseByGUID​(java.lang.String userId, java.lang.String guid)
      Retrieve the database metadata element with the supplied unique identifier.
      DatabaseColumnElement getDatabaseColumnByGUID​(java.lang.String userId, java.lang.String guid)
      Retrieve the database column metadata element with the supplied unique identifier.
      java.util.List<DatabaseColumnElement> getDatabaseColumnsByName​(java.lang.String userId, java.lang.String name, int startFrom, int pageSize)
      Retrieve the list of database column metadata elements with a matching qualified or display name.
      java.util.List<DatabaseElement> getDatabasesByName​(java.lang.String userId, java.lang.String name, int startFrom, int pageSize)
      Retrieve the list of database metadata elements with a matching qualified or display name.
      DatabaseSchemaElement getDatabaseSchemaByGUID​(java.lang.String userId, java.lang.String guid)
      Retrieve the database schema metadata element with the supplied unique identifier.
      java.util.List<DatabaseSchemaElement> getDatabaseSchemasByName​(java.lang.String userId, java.lang.String name, int startFrom, int pageSize)
      Retrieve the list of database schema metadata elements with a matching qualified or display name.
      java.util.List<DatabaseElement> getDatabasesForDatabaseManager​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, int startFrom, int pageSize)
      Retrieve the list of databases created by this caller.
      DatabaseTableElement getDatabaseTableByGUID​(java.lang.String userId, java.lang.String guid)
      Retrieve the database table metadata element with the supplied unique identifier.
      java.util.List<DatabaseTableElement> getDatabaseTablesByName​(java.lang.String userId, java.lang.String name, int startFrom, int pageSize)
      Retrieve the list of database table metadata elements with a matching qualified or display name.
      DatabaseViewElement getDatabaseViewByGUID​(java.lang.String userId, java.lang.String guid)
      Retrieve the database view metadata element with the supplied unique identifier.
      java.util.List<DatabaseViewElement> getDatabaseViewsByName​(java.lang.String userId, java.lang.String name, int startFrom, int pageSize)
      Retrieve the list of database view metadata elements with a matching qualified or display name.
      java.util.List<DatabaseSchemaElement> getSchemasForDatabase​(java.lang.String userId, java.lang.String databaseGUID, int startFrom, int pageSize)
      Return the list of schemas associated with a database.
      java.util.List<DatabaseTableElement> getTablesForDatabaseAsset​(java.lang.String userId, java.lang.String databaseAssetGUID, int startFrom, int pageSize)
      Retrieve the list of database tables associated with a database or database schema.
      java.util.List<DatabaseTableElement> getTablesForDatabaseSchema​(java.lang.String userId, java.lang.String databaseSchemaGUID, int startFrom, int pageSize)
      Deprecated.
      java.util.List<DatabaseViewElement> getViewsForDatabaseAsset​(java.lang.String userId, java.lang.String databaseAssetGUID, int startFrom, int pageSize)
      Retrieve the list of database views associated with a database or database schema.
      java.util.List<DatabaseViewElement> getViewsForDatabaseSchema​(java.lang.String userId, java.lang.String databaseSchemaGUID, int startFrom, int pageSize)
      Deprecated.
      void publishDatabase​(java.lang.String userId, java.lang.String databaseGUID)
      Update the zones for the database asset so that it becomes visible to consumers.
      void publishDatabaseSchema​(java.lang.String userId, java.lang.String databaseSchemaGUID)
      Update the zones for the database asset so that it becomes visible to consumers.
      void removeDatabase​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseGUID)
      Remove the metadata element representing a database.
      void removeDatabaseColumn​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseColumnGUID)
      Remove the metadata element representing a database column.
      void removeDatabaseSchema​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseSchemaGUID)
      Remove the metadata element representing a database schema.
      void removeDatabaseTable​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseTableGUID)
      Remove the metadata element representing a database table.
      void removeDatabaseView​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseViewGUID)
      Remove the metadata element representing a database table.
      void removeForeignKeyRelationship​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String primaryKeyColumnGUID, java.lang.String foreignKeyColumnGUID)
      Remove the foreign key relationship for the requested columns.
      void removePrimaryKeyFromColumn​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseColumnGUID)
      Remove the classification that this column is a primary key.
      void setPrimaryKeyOnColumn​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseColumnGUID, DatabasePrimaryKeyProperties databasePrimaryKeyProperties)
      Classify a column in a database table as the primary key.
      void updateDatabase​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseGUID, boolean isMergeUpdate, DatabaseProperties databaseProperties)
      Update the metadata element representing a database.
      void updateDatabaseColumn​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseColumnGUID, boolean isMergeUpdate, DatabaseColumnProperties databaseColumnProperties)
      Update the metadata element representing a database column.
      void updateDatabaseSchema​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseSchemaGUID, boolean isMergeUpdate, DatabaseSchemaProperties databaseSchemaProperties)
      Update the metadata element representing a database schema.
      void updateDatabaseTable​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseTableGUID, boolean isMergeUpdate, DatabaseTableProperties databaseTableProperties)
      Update the metadata element representing a database table.
      void updateDatabaseView​(java.lang.String userId, java.lang.String databaseManagerGUID, java.lang.String databaseManagerName, java.lang.String databaseViewGUID, boolean isMergeUpdate, DatabaseViewProperties databaseViewProperties)
      Update the metadata element representing a database table.
      void withdrawDatabase​(java.lang.String userId, java.lang.String databaseGUID)
      Update the zones for the database asset so that it is no longer visible to consumers.
      void withdrawDatabaseSchema​(java.lang.String userId, java.lang.String databaseSchemaGUID)
      Update the zones for the database asset so that it is no longer visible to consumers.
    • Method Detail

      • createDatabase

        java.lang.String createDatabase​(java.lang.String userId,
                                        java.lang.String databaseManagerGUID,
                                        java.lang.String databaseManagerName,
                                        DatabaseProperties databaseProperties)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Create a new metadata element to represent a database.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseProperties - properties to store
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseFromTemplate

        java.lang.String createDatabaseFromTemplate​(java.lang.String userId,
                                                    java.lang.String databaseManagerGUID,
                                                    java.lang.String databaseManagerName,
                                                    java.lang.String templateGUID,
                                                    TemplateProperties templateProperties)
                                             throws InvalidParameterException,
                                                    UserNotAuthorizedException,
                                                    PropertyServerException
        Create a new metadata element to represent a database using an existing metadata element as a template.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateDatabase

        void updateDatabase​(java.lang.String userId,
                            java.lang.String databaseManagerGUID,
                            java.lang.String databaseManagerName,
                            java.lang.String databaseGUID,
                            boolean isMergeUpdate,
                            DatabaseProperties databaseProperties)
                     throws InvalidParameterException,
                            UserNotAuthorizedException,
                            PropertyServerException
        Update the metadata element representing a database.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseGUID - unique identifier of the metadata element to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        databaseProperties - new properties for this element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • withdrawDatabase

        void withdrawDatabase​(java.lang.String userId,
                              java.lang.String databaseGUID)
                       throws InvalidParameterException,
                              UserNotAuthorizedException,
                              PropertyServerException
        Update the zones for the database asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Data Manager OMAS. This is the setting when the database is first created).
        Parameters:
        userId - calling user
        databaseGUID - unique identifier of the metadata element to withdraw
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removeDatabase

        void removeDatabase​(java.lang.String userId,
                            java.lang.String databaseManagerGUID,
                            java.lang.String databaseManagerName,
                            java.lang.String databaseGUID)
                     throws InvalidParameterException,
                            UserNotAuthorizedException,
                            PropertyServerException
        Remove the metadata element representing a database.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseGUID - unique identifier of the metadata element to remove
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • getDatabasesForDatabaseManager

        java.util.List<DatabaseElement> getDatabasesForDatabaseManager​(java.lang.String userId,
                                                                       java.lang.String databaseManagerGUID,
                                                                       java.lang.String databaseManagerName,
                                                                       int startFrom,
                                                                       int pageSize)
                                                                throws InvalidParameterException,
                                                                       UserNotAuthorizedException,
                                                                       PropertyServerException
        Retrieve the list of databases created by this caller.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the database manager (DBMS)
        databaseManagerName - unique name of software server capability representing the database manager (DBMS)
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of matching metadata elements
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseSchema

        java.lang.String createDatabaseSchema​(java.lang.String userId,
                                              java.lang.String databaseManagerGUID,
                                              java.lang.String databaseManagerName,
                                              java.lang.String databaseGUID,
                                              DatabaseSchemaProperties databaseSchemaProperties)
                                       throws InvalidParameterException,
                                              UserNotAuthorizedException,
                                              PropertyServerException
        Create a new metadata element to represent a database schema.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseGUID - unique identifier of the database where the schema is located
        databaseSchemaProperties - properties about the database schema
        Returns:
        unique identifier of the new database schema
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseSchemaFromTemplate

        java.lang.String createDatabaseSchemaFromTemplate​(java.lang.String userId,
                                                          java.lang.String databaseManagerGUID,
                                                          java.lang.String databaseManagerName,
                                                          java.lang.String templateGUID,
                                                          java.lang.String databaseGUID,
                                                          TemplateProperties templateProperties)
                                                   throws InvalidParameterException,
                                                          UserNotAuthorizedException,
                                                          PropertyServerException
        Create a new metadata element to represent a database schema using an existing metadata element as a template.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        templateGUID - unique identifier of the metadata element to copy
        databaseGUID - unique identifier of the database where the schema is located
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new database schema
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateDatabaseSchema

        void updateDatabaseSchema​(java.lang.String userId,
                                  java.lang.String databaseManagerGUID,
                                  java.lang.String databaseManagerName,
                                  java.lang.String databaseSchemaGUID,
                                  boolean isMergeUpdate,
                                  DatabaseSchemaProperties databaseSchemaProperties)
                           throws InvalidParameterException,
                                  UserNotAuthorizedException,
                                  PropertyServerException
        Update the metadata element representing a database schema.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseSchemaGUID - unique identifier of the metadata element to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        databaseSchemaProperties - new properties for the metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • publishDatabaseSchema

        void publishDatabaseSchema​(java.lang.String userId,
                                   java.lang.String databaseSchemaGUID)
                            throws InvalidParameterException,
                                   UserNotAuthorizedException,
                                   PropertyServerException
        Update the zones for the database asset so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of the Data Manager OMAS).
        Parameters:
        userId - calling user
        databaseSchemaGUID - unique identifier of the metadata element to publish
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • withdrawDatabaseSchema

        void withdrawDatabaseSchema​(java.lang.String userId,
                                    java.lang.String databaseSchemaGUID)
                             throws InvalidParameterException,
                                    UserNotAuthorizedException,
                                    PropertyServerException
        Update the zones for the database asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Data Manager OMAS. This is the setting when the database is first created).
        Parameters:
        userId - calling user
        databaseSchemaGUID - unique identifier of the metadata element to withdraw
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removeDatabaseSchema

        void removeDatabaseSchema​(java.lang.String userId,
                                  java.lang.String databaseManagerGUID,
                                  java.lang.String databaseManagerName,
                                  java.lang.String databaseSchemaGUID)
                           throws InvalidParameterException,
                                  UserNotAuthorizedException,
                                  PropertyServerException
        Remove the metadata element representing a database schema.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseSchemaGUID - unique identifier of the metadata element to remove
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseSchemaType

        java.lang.String createDatabaseSchemaType​(java.lang.String userId,
                                                  java.lang.String databaseManagerGUID,
                                                  java.lang.String databaseManagerName,
                                                  java.lang.String qualifiedName)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Create a database top-level schema type used to attach tables and views to the database/database schema.
        Parameters:
        userId - calling user
        databaseManagerGUID - guid of the software server capability entity that represented the external source - null for local
        databaseManagerName - name of the software server capability entity that represented the external source - null for local
        qualifiedName - qualified name ofr the schema type - suggest "SchemaOf:" + asset's qualified name
        Returns:
        unique identifier of the database schema type
        Throws:
        InvalidParameterException - the bean properties are invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server
      • attachSchemaTypeToDatabaseAsset

        void attachSchemaTypeToDatabaseAsset​(java.lang.String userId,
                                             java.lang.String databaseManagerGUID,
                                             java.lang.String databaseManagerName,
                                             java.lang.String databaseAssetGUID,
                                             java.lang.String schemaTypeGUID)
                                      throws InvalidParameterException,
                                             PropertyServerException,
                                             UserNotAuthorizedException
        Link the schema type and asset. This is called from outside AssetHandler. The databaseAssetGUID is checked to ensure the asset exists and updates are allowed. If there is already a schema attached, it is deleted.
        Parameters:
        userId - calling user
        databaseManagerGUID - guid of the software server capability entity that represented the external source - null for local
        databaseManagerName - name of the software server capability entity that represented the external source - null for local
        databaseAssetGUID - unique identifier of the asset to connect the schema to
        schemaTypeGUID - identifier for schema Type object
        Throws:
        InvalidParameterException - the bean properties are invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server
      • createDatabaseTable

        java.lang.String createDatabaseTable​(java.lang.String userId,
                                             java.lang.String databaseManagerGUID,
                                             java.lang.String databaseManagerName,
                                             java.lang.String databaseAssetGUID,
                                             DatabaseTableProperties databaseTableProperties)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Create a new metadata element to represent a database table.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseAssetGUID - unique identifier of the database or schema where the database table is located.
        databaseTableProperties - properties for the database table
        Returns:
        unique identifier of the new metadata element for the database table
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseTableFromTemplate

        java.lang.String createDatabaseTableFromTemplate​(java.lang.String userId,
                                                         java.lang.String databaseManagerGUID,
                                                         java.lang.String databaseManagerName,
                                                         java.lang.String templateGUID,
                                                         java.lang.String databaseAssetGUID,
                                                         TemplateProperties templateProperties)
                                                  throws InvalidParameterException,
                                                         UserNotAuthorizedException,
                                                         PropertyServerException
        Create a new metadata element to represent a database table using an existing metadata element as a template.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        templateGUID - unique identifier of the metadata element to copy
        databaseAssetGUID - unique identifier of the database or database schema where the database table is located.
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element for the database table
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseTableForSchemaType

        java.lang.String createDatabaseTableForSchemaType​(java.lang.String userId,
                                                          java.lang.String databaseManagerGUID,
                                                          java.lang.String databaseManagerName,
                                                          java.lang.String databaseSchemaTypeGUID,
                                                          DatabaseTableProperties databaseTableProperties)
                                                   throws InvalidParameterException,
                                                          UserNotAuthorizedException,
                                                          PropertyServerException
        Create a new metadata element to represent a database table.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseSchemaTypeGUID - unique identifier of the database or database schema where the database table is located
        databaseTableProperties - properties for the database table
        Returns:
        unique identifier of the new metadata element for the database table
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateDatabaseTable

        void updateDatabaseTable​(java.lang.String userId,
                                 java.lang.String databaseManagerGUID,
                                 java.lang.String databaseManagerName,
                                 java.lang.String databaseTableGUID,
                                 boolean isMergeUpdate,
                                 DatabaseTableProperties databaseTableProperties)
                          throws InvalidParameterException,
                                 UserNotAuthorizedException,
                                 PropertyServerException
        Update the metadata element representing a database table.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseTableGUID - unique identifier of the database table to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        databaseTableProperties - new properties for the database table
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removeDatabaseTable

        void removeDatabaseTable​(java.lang.String userId,
                                 java.lang.String databaseManagerGUID,
                                 java.lang.String databaseManagerName,
                                 java.lang.String databaseTableGUID)
                          throws InvalidParameterException,
                                 UserNotAuthorizedException,
                                 PropertyServerException
        Remove the metadata element representing a database table.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseTableGUID - unique identifier of the metadata element to remove
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseView

        java.lang.String createDatabaseView​(java.lang.String userId,
                                            java.lang.String databaseManagerGUID,
                                            java.lang.String databaseManagerName,
                                            java.lang.String databaseAssetGUID,
                                            DatabaseViewProperties databaseViewProperties)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Create a new metadata element to represent a database view.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseAssetGUID - unique identifier of the database or database schema where the database view is located.
        databaseViewProperties - properties for the new view
        Returns:
        unique identifier of the new metadata element for the database view
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseViewFromTemplate

        java.lang.String createDatabaseViewFromTemplate​(java.lang.String userId,
                                                        java.lang.String databaseManagerGUID,
                                                        java.lang.String databaseManagerName,
                                                        java.lang.String templateGUID,
                                                        java.lang.String databaseAssetGUID,
                                                        TemplateProperties templateProperties)
                                                 throws InvalidParameterException,
                                                        UserNotAuthorizedException,
                                                        PropertyServerException
        Create a new metadata element to represent a database view using an existing metadata element as a template.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        templateGUID - unique identifier of the metadata element to copy
        databaseAssetGUID - unique identifier of the database or database schema where the database view is located.
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element for the database view
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseViewForSchemaType

        java.lang.String createDatabaseViewForSchemaType​(java.lang.String userId,
                                                         java.lang.String databaseManagerGUID,
                                                         java.lang.String databaseManagerName,
                                                         java.lang.String databaseSchemaTypeGUID,
                                                         DatabaseViewProperties databaseViewProperties)
                                                  throws InvalidParameterException,
                                                         UserNotAuthorizedException,
                                                         PropertyServerException
        Create a new metadata element to represent a database view.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseSchemaTypeGUID - unique identifier of the schema type where the database view is located.
        databaseViewProperties - properties for the new view
        Returns:
        unique identifier of the new metadata element for the database view
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateDatabaseView

        void updateDatabaseView​(java.lang.String userId,
                                java.lang.String databaseManagerGUID,
                                java.lang.String databaseManagerName,
                                java.lang.String databaseViewGUID,
                                boolean isMergeUpdate,
                                DatabaseViewProperties databaseViewProperties)
                         throws InvalidParameterException,
                                UserNotAuthorizedException,
                                PropertyServerException
        Update the metadata element representing a database table.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseViewGUID - unique identifier of the database view to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        databaseViewProperties - properties for the new database view
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removeDatabaseView

        void removeDatabaseView​(java.lang.String userId,
                                java.lang.String databaseManagerGUID,
                                java.lang.String databaseManagerName,
                                java.lang.String databaseViewGUID)
                         throws InvalidParameterException,
                                UserNotAuthorizedException,
                                PropertyServerException
        Remove the metadata element representing a database table.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseViewGUID - unique identifier of the metadata element to remove
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseColumn

        java.lang.String createDatabaseColumn​(java.lang.String userId,
                                              java.lang.String databaseManagerGUID,
                                              java.lang.String databaseManagerName,
                                              java.lang.String databaseTableGUID,
                                              DatabaseColumnProperties databaseColumnProperties)
                                       throws InvalidParameterException,
                                              UserNotAuthorizedException,
                                              PropertyServerException
        Create a new metadata element to represent a database column.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseTableGUID - unique identifier of the database table where this column is located
        databaseColumnProperties - properties for the new column
        Returns:
        unique identifier of the new metadata element for the new database column
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • createDatabaseColumnFromTemplate

        java.lang.String createDatabaseColumnFromTemplate​(java.lang.String userId,
                                                          java.lang.String databaseManagerGUID,
                                                          java.lang.String databaseManagerName,
                                                          java.lang.String templateGUID,
                                                          java.lang.String databaseTableGUID,
                                                          TemplateProperties templateProperties)
                                                   throws InvalidParameterException,
                                                          UserNotAuthorizedException,
                                                          PropertyServerException
        Create a new metadata element to represent a database column using an existing metadata element as a template.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        templateGUID - unique identifier of the metadata element to copy
        databaseTableGUID - unique identifier of the database table where this column is located
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element for the database column
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateDatabaseColumn

        void updateDatabaseColumn​(java.lang.String userId,
                                  java.lang.String databaseManagerGUID,
                                  java.lang.String databaseManagerName,
                                  java.lang.String databaseColumnGUID,
                                  boolean isMergeUpdate,
                                  DatabaseColumnProperties databaseColumnProperties)
                           throws InvalidParameterException,
                                  UserNotAuthorizedException,
                                  PropertyServerException
        Update the metadata element representing a database column.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseColumnGUID - unique identifier of the metadata element to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        databaseColumnProperties - new properties for the metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removeDatabaseColumn

        void removeDatabaseColumn​(java.lang.String userId,
                                  java.lang.String databaseManagerGUID,
                                  java.lang.String databaseManagerName,
                                  java.lang.String databaseColumnGUID)
                           throws InvalidParameterException,
                                  UserNotAuthorizedException,
                                  PropertyServerException
        Remove the metadata element representing a database column.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseColumnGUID - unique identifier of the metadata element to remove
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • setPrimaryKeyOnColumn

        void setPrimaryKeyOnColumn​(java.lang.String userId,
                                   java.lang.String databaseManagerGUID,
                                   java.lang.String databaseManagerName,
                                   java.lang.String databaseColumnGUID,
                                   DatabasePrimaryKeyProperties databasePrimaryKeyProperties)
                            throws InvalidParameterException,
                                   UserNotAuthorizedException,
                                   PropertyServerException
        Classify a column in a database table as the primary key. This means each row has a different value in this column, and it can be used to uniquely identify the column.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseColumnGUID - unique identifier if the primary key column
        databasePrimaryKeyProperties - properties to store
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removePrimaryKeyFromColumn

        void removePrimaryKeyFromColumn​(java.lang.String userId,
                                        java.lang.String databaseManagerGUID,
                                        java.lang.String databaseManagerName,
                                        java.lang.String databaseColumnGUID)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Remove the classification that this column is a primary key.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        databaseColumnGUID - unique identifier if the primary key column
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • addForeignKeyRelationship

        void addForeignKeyRelationship​(java.lang.String userId,
                                       java.lang.String databaseManagerGUID,
                                       java.lang.String databaseManagerName,
                                       java.lang.String primaryKeyColumnGUID,
                                       java.lang.String foreignKeyColumnGUID,
                                       DatabaseForeignKeyProperties databaseForeignKeyProperties)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Create a foreign relationship between two columns. One of the columns holds the primary key of the other to form a link.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        primaryKeyColumnGUID - unique identifier of the column containing the primary key
        foreignKeyColumnGUID - unique identifier of the column containing the primary key from the other table
        databaseForeignKeyProperties - properties about the foreign key relationship
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • removeForeignKeyRelationship

        void removeForeignKeyRelationship​(java.lang.String userId,
                                          java.lang.String databaseManagerGUID,
                                          java.lang.String databaseManagerName,
                                          java.lang.String primaryKeyColumnGUID,
                                          java.lang.String foreignKeyColumnGUID)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Remove the foreign key relationship for the requested columns.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the caller
        databaseManagerName - unique name of software server capability representing the caller
        primaryKeyColumnGUID - unique identifier of the column that is the linked primary key
        foreignKeyColumnGUID - unique identifier of the column the contains the primary key from another table
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)