Class RelationalDataHandler<DATABASE,​DATABASE_SCHEMA,​DATABASE_TABLE,​DATABASE_VIEW,​DATABASE_COLUMN,​SCHEMA_TYPE>


  • public class RelationalDataHandler<DATABASE,​DATABASE_SCHEMA,​DATABASE_TABLE,​DATABASE_VIEW,​DATABASE_COLUMN,​SCHEMA_TYPE>
    extends Object
    RelationalDataHandler manages the assets and schemas for relational data. It is build on the AssetHandler and the SchemaAttributeHandler. Its role is to maintain a simple interface that covers databases, database schemas, database tables and columns. It automatically creates and links in the schema type information in the structure and keeps it linked together.
    • Constructor Detail

      • RelationalDataHandler

        public RelationalDataHandler​(OpenMetadataAPIGenericConverter<DATABASE> databaseConverter,
                                     Class<DATABASE> databaseClass,
                                     OpenMetadataAPIGenericConverter<DATABASE_SCHEMA> databaseSchemaConverter,
                                     Class<DATABASE_SCHEMA> databaseSchemaClass,
                                     OpenMetadataAPIGenericConverter<DATABASE_TABLE> databaseTableConverter,
                                     Class<DATABASE_TABLE> databaseTableClass,
                                     OpenMetadataAPIGenericConverter<DATABASE_VIEW> databaseViewConverter,
                                     Class<DATABASE_VIEW> databaseViewClass,
                                     OpenMetadataAPIGenericConverter<DATABASE_COLUMN> databaseColumnConverter,
                                     Class<DATABASE_COLUMN> databaseColumnClass,
                                     OpenMetadataAPIGenericConverter<SCHEMA_TYPE> schemaTypeConverter,
                                     Class<SCHEMA_TYPE> schemaTypeClass,
                                     String serviceName,
                                     String serverName,
                                     InvalidParameterHandler invalidParameterHandler,
                                     RepositoryHandler repositoryHandler,
                                     OMRSRepositoryHelper repositoryHelper,
                                     String localServerUserId,
                                     OpenMetadataServerSecurityVerifier securityVerifier,
                                     List<String> supportedZones,
                                     List<String> defaultZones,
                                     List<String> publishZones,
                                     AuditLog auditLog)
        Construct the relational data handler with information needed to work with assets and schemas.
        Parameters:
        databaseConverter - specific converter for the DATABASE bean class
        databaseClass - name of bean class that is represented by the generic class DATABASE
        databaseSchemaConverter - specific converter for the DATABASE_SCHEMA bean class
        databaseSchemaClass - name of bean class that is represented by the generic class DATABASE_SCHEMA
        databaseTableConverter - specific converter for the DATABASE_TABLE bean class
        databaseTableClass - name of bean class that is represented by the generic class DATABASE_TABLE
        databaseViewConverter - specific converter for the DATABASE_VIEW bean class
        databaseViewClass - name of bean class that is represented by the generic class DATABASE_VIEW
        databaseColumnConverter - specific converter for the DATABASE_COLUMN bean class
        databaseColumnClass - name of bean class that is represented by the generic class DATABASE_COLUMN
        schemaTypeConverter - specific converter for the SCHEMA_TYPE bean class
        schemaTypeClass - name of bean class that is represented by the generic class SCHEMA_TYPE
        serviceName - name of this service
        serverName - name of the local server
        invalidParameterHandler - handler for managing parameter errors
        repositoryHandler - manages calls to the repository services
        repositoryHelper - provides utilities for manipulating the repository services objects
        localServerUserId - userId for this server
        securityVerifier - open metadata security services verifier
        supportedZones - list of zones that the access service is allowed to serve Asset instances from.
        defaultZones - list of zones that the access service should set in all new Asset instances.
        publishZones - list of zones that the access service sets up in published Asset instances.
        auditLog - destination for audit log events.
    • Method Detail

      • createDatabase

        public String createDatabase​(String userId,
                                     String databaseManagerGUID,
                                     String databaseManagerName,
                                     String qualifiedName,
                                     String displayName,
                                     String description,
                                     String owner,
                                     int ownerTypeOrdinal,
                                     List<String> zoneMembership,
                                     String originOrganizationGUID,
                                     String originBusinessCapabilityGUID,
                                     Map<String,​String> otherOriginValues,
                                     String pathName,
                                     Date createTime,
                                     Date modifiedTime,
                                     String encodingType,
                                     String encodingLanguage,
                                     String encodingDescription,
                                     Map<String,​String> encodingProperties,
                                     String databaseType,
                                     String databaseVersion,
                                     String databaseInstance,
                                     String databaseImportedFrom,
                                     Map<String,​String> additionalProperties,
                                     String typeName,
                                     Map<String,​Object> extendedProperties,
                                     Map<String,​String> vendorProperties,
                                     String methodName)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Create a new metadata element to represent a database that is owned by an external element.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        qualifiedName - unique name for this database
        displayName - the stored display name property for the database
        description - the stored description property associated with the database
        owner - identifier of the owner
        ownerTypeOrdinal - is the owner identifier a user id, personal profile or team profile
        zoneMembership - governance zones for the database - null means use the default zones set for this service
        originOrganizationGUID - the properties that characterize where this database is from
        originBusinessCapabilityGUID - the properties that characterize where this database is from
        otherOriginValues - the properties that characterize where this database is from
        pathName - the fully qualified physical location of the data store
        createTime - the time that the database was created
        modifiedTime - the last known time the data store was modified
        encodingType - the name of the encoding style used in the database
        encodingLanguage - the name of the natural language used for text strings within the database
        encodingDescription - the description of the encoding used in the database
        encodingProperties - properties used to control encoding
        databaseType - a description of the database type
        databaseVersion - the version of the database - often this is related to the version of its schemas.
        databaseInstance - the name of this database instance - useful if the same schemas are deployed to multiple database instances
        databaseImportedFrom - the source (typically connection name) of the database information
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of Database - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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)
      • createDatabase

        public String createDatabase​(String userId,
                                     String databaseManagerGUID,
                                     String databaseManagerName,
                                     String qualifiedName,
                                     String displayName,
                                     String description,
                                     String pathName,
                                     Date createTime,
                                     Date modifiedTime,
                                     String encodingType,
                                     String encodingLanguage,
                                     String encodingDescription,
                                     Map<String,​String> encodingProperties,
                                     String databaseType,
                                     String databaseVersion,
                                     String databaseInstance,
                                     String databaseImportedFrom,
                                     Map<String,​String> additionalProperties,
                                     String typeName,
                                     Map<String,​Object> extendedProperties,
                                     Map<String,​String> vendorProperties,
                                     String methodName)
                              throws InvalidParameterException,
                                     UserNotAuthorizedException,
                                     PropertyServerException
        Create a new metadata element to represent a database that is owned by an external element.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        qualifiedName - unique name for this database
        displayName - the stored display name property for the database
        description - the stored description property associated with the database
        pathName - the fully qualified physical location of the data store
        createTime - the time that the database was created
        modifiedTime - the last known time the data store was modified
        encodingType - the name of the encoding style used in the database
        encodingLanguage - the name of the natural language used for text strings within the database
        encodingDescription - the description of the encoding used in the database
        encodingProperties - properties used to control encoding
        databaseType - a description of the database type
        databaseVersion - the version of the database - often this is related to the version of its schemas.
        databaseInstance - the name of this database instance - useful if the same schemas are deployed to multiple database instances
        databaseImportedFrom - the source (typically connection name) of the database information
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of Database - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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

        public String createDatabaseFromTemplate​(String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String templateGUID,
                                                 String qualifiedName,
                                                 String displayName,
                                                 String description,
                                                 String networkAddress,
                                                 String methodName)
                                          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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        qualifiedName - unique name for this database - must not be null
        displayName - the stored display name property for the database - if null, the value from the template is used
        description - the stored description property associated with the database - if null, the value from the template is used
        networkAddress - physical location of the database - used to connect to it
        methodName - calling method
        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

        public void updateDatabase​(String userId,
                                   String databaseManagerGUID,
                                   String databaseManagerName,
                                   String databaseGUID,
                                   String qualifiedName,
                                   String displayName,
                                   String description,
                                   String owner,
                                   int ownerTypeOrdinal,
                                   List<String> zoneMembership,
                                   String originOrganizationGUID,
                                   String originBusinessCapabilityGUID,
                                   Map<String,​String> otherOriginValues,
                                   Date createTime,
                                   Date modifiedTime,
                                   String encodingType,
                                   String encodingLanguage,
                                   String encodingDescription,
                                   Map<String,​String> encodingProperties,
                                   String databaseType,
                                   String databaseVersion,
                                   String databaseInstance,
                                   String databaseImportedFrom,
                                   Map<String,​String> additionalProperties,
                                   String typeName,
                                   Map<String,​Object> extendedProperties,
                                   Map<String,​String> vendorProperties,
                                   String methodName)
                            throws InvalidParameterException,
                                   UserNotAuthorizedException,
                                   PropertyServerException
        Update the metadata element representing a database.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the metadata element to update
        qualifiedName - unique name for this database
        displayName - the stored display name property for the database
        description - the stored description property associated with the database
        owner - identifier of the owner
        ownerTypeOrdinal - is the owner identifier a user id, personal profile or team profile
        zoneMembership - governance zones for the database - null means use the default zones set for this service
        originOrganizationGUID - the properties that characterize where this database is from
        originBusinessCapabilityGUID - the properties that characterize where this database is from
        otherOriginValues - the properties that characterize where this database is from
        createTime - the time that the database was created
        modifiedTime - the last known time the data store was modified
        encodingType - the name of the encoding style used in the database
        encodingLanguage - the name of the natural language used for text strings within the database
        encodingDescription - the description of the encoding used in the database
        encodingProperties - properties used to control encoding
        databaseType - a description of the database type
        databaseVersion - the version of the database - often this is related to the version of its schemas.
        databaseInstance - the name of this database instance - useful if the same schemas are deployed to multiple database instances
        databaseImportedFrom - the source (typically connection name) of the database information
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of Database - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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)
      • updateGovernanceClassifications

        public void updateGovernanceClassifications​(String userId,
                                                    String elementGUID,
                                                    String elementGUIDParameterName,
                                                    String owner,
                                                    int ownerTypeOrdinal,
                                                    List<String> zoneMembership,
                                                    String originOrganizationGUID,
                                                    String originBusinessCapabilityGUID,
                                                    Map<String,​String> otherOriginValues,
                                                    String methodName)
                                             throws InvalidParameterException,
                                                    UserNotAuthorizedException,
                                                    PropertyServerException
        Update the metadata element representing a database.
        Parameters:
        userId - calling user
        elementGUID - unique identifier of the metadata element to update
        elementGUIDParameterName - parameter name of elementGUID
        owner - identifier of the owner
        ownerTypeOrdinal - is the owner identifier a user id, personal profile or team profile
        zoneMembership - governance zones for the database - null means use the default zones set for this service
        originOrganizationGUID - the properties that characterize where this database is from
        originBusinessCapabilityGUID - the properties that characterize where this database is from
        otherOriginValues - the properties that characterize where this database is from
        methodName - calling method
        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

        public void updateDatabase​(String userId,
                                   String databaseManagerGUID,
                                   String databaseManagerName,
                                   String databaseGUID,
                                   String qualifiedName,
                                   String displayName,
                                   String description,
                                   Date createTime,
                                   Date modifiedTime,
                                   String encodingType,
                                   String encodingLanguage,
                                   String encodingDescription,
                                   Map<String,​String> encodingProperties,
                                   String databaseType,
                                   String databaseVersion,
                                   String databaseInstance,
                                   String databaseImportedFrom,
                                   Map<String,​String> additionalProperties,
                                   String typeName,
                                   Map<String,​Object> extendedProperties,
                                   Map<String,​String> vendorProperties,
                                   String methodName)
                            throws InvalidParameterException,
                                   UserNotAuthorizedException,
                                   PropertyServerException
        Update the metadata element representing a database.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the metadata element to update
        qualifiedName - unique name for this database
        displayName - the stored display name property for the database
        description - the stored description property associated with the database
        createTime - the time that the database was created
        modifiedTime - the last known time the data store was modified
        encodingType - the name of the encoding style used in the database
        encodingLanguage - the name of the natural language used for text strings within the database
        encodingDescription - the description of the encoding used in the database
        encodingProperties - properties used to control encoding
        databaseType - a description of the database type
        databaseVersion - the version of the database - often this is related to the version of its schemas.
        databaseInstance - the name of this database instance - useful if the same schemas are deployed to multiple database instances
        databaseImportedFrom - the source (typically connection name) of the database information
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of Database - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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

        public void removeDatabase​(String userId,
                                   String databaseManagerGUID,
                                   String databaseManagerName,
                                   String databaseGUID,
                                   String qualifiedName,
                                   String methodName)
                            throws InvalidParameterException,
                                   UserNotAuthorizedException,
                                   PropertyServerException
        Remove the metadata element representing a database.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        methodName - calling method
        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

        public List<DATABASE> getDatabasesForDatabaseManager​(String userId,
                                                             String databaseManagerGUID,
                                                             String databaseManagerName,
                                                             int startFrom,
                                                             int pageSize,
                                                             String methodName)
                                                      throws InvalidParameterException,
                                                             UserNotAuthorizedException,
                                                             PropertyServerException
        Retrieve the list of databases created for the requested database manager.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        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

        public String createDatabaseSchema​(String userId,
                                           String databaseManagerGUID,
                                           String databaseManagerName,
                                           String databaseGUID,
                                           String qualifiedName,
                                           String displayName,
                                           String description,
                                           Map<String,​String> additionalProperties,
                                           String typeName,
                                           Map<String,​Object> extendedProperties,
                                           Map<String,​String> vendorProperties,
                                           String methodName)
                                    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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the database where the schema is located
        qualifiedName - unique name for this database schema
        displayName - the stored display name property for the database schema
        description - the stored description property associated with the database schema
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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)
      • createDatabaseSchema

        public String createDatabaseSchema​(String userId,
                                           String databaseManagerGUID,
                                           String databaseManagerName,
                                           String databaseGUID,
                                           String qualifiedName,
                                           String displayName,
                                           String description,
                                           String owner,
                                           int ownerTypeOrdinal,
                                           List<String> zoneMembership,
                                           String originOrganizationGUID,
                                           String originBusinessCapabilityGUID,
                                           Map<String,​String> otherOriginValues,
                                           Map<String,​String> additionalProperties,
                                           String typeName,
                                           Map<String,​Object> extendedProperties,
                                           Map<String,​String> vendorProperties,
                                           String methodName)
                                    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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseGUID - unique identifier of the database where the schema is located
        qualifiedName - unique name for this database schema
        displayName - the stored display name property for the database schema
        description - the stored description property associated with the database schema
        owner - identifier of the owner
        ownerTypeOrdinal - is the owner identifier a user id, personal profile or team profile
        zoneMembership - governance zones for the database schema - null means use the default zones set for this service
        originOrganizationGUID - the properties that characterize where this database schema is from
        originBusinessCapabilityGUID - the properties that characterize where this database schema is from
        otherOriginValues - the properties that characterize where this database schema is from
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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

        public String createDatabaseSchemaFromTemplate​(String userId,
                                                       String databaseManagerGUID,
                                                       String databaseManagerName,
                                                       String templateGUID,
                                                       String databaseGUID,
                                                       String qualifiedName,
                                                       String displayName,
                                                       String description,
                                                       String methodName)
                                                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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseGUID - unique identifier of the database where the schema is located
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database schema
        description - the stored description property associated with the database schema
        methodName - calling method
        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

        public void updateDatabaseSchema​(String userId,
                                         String databaseManagerGUID,
                                         String databaseManagerName,
                                         String databaseSchemaGUID,
                                         String qualifiedName,
                                         String displayName,
                                         String description,
                                         String owner,
                                         int ownerTypeOrdinal,
                                         List<String> zoneMembership,
                                         String originOrganizationGUID,
                                         String originBusinessCapabilityGUID,
                                         Map<String,​String> otherOriginValues,
                                         Map<String,​String> additionalProperties,
                                         String typeName,
                                         Map<String,​Object> extendedProperties,
                                         Map<String,​String> vendorProperties,
                                         String methodName)
                                  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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseSchemaGUID - unique identifier of the metadata element to update
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database schema
        description - the stored description property associated with the database schema
        owner - identifier of the owner
        ownerTypeOrdinal - is the owner identifier a user id, personal profile or team profile
        zoneMembership - governance zones for the database schema - null means use the default zones set for this service
        originOrganizationGUID - the properties that characterize where this database schema is from
        originBusinessCapabilityGUID - the properties that characterize where this database schema is from
        otherOriginValues - the properties that characterize where this database schema is from
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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

        public void withdrawDatabaseSchema​(String userId,
                                           String databaseSchemaGUID,
                                           String methodName)
                                    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 Platform OMAS. This is the setting when the database is first created).
        Parameters:
        userId - calling user
        databaseSchemaGUID - unique identifier of the metadata element to withdraw
        methodName - calling method
        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

        public void removeDatabaseSchema​(String userId,
                                         String databaseManagerGUID,
                                         String databaseManagerName,
                                         String databaseSchemaGUID,
                                         String qualifiedName,
                                         String methodName)
                                  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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseSchemaGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        methodName - calling method
        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

        public String createDatabaseSchemaType​(String userId,
                                               String databaseManagerGUID,
                                               String databaseManagerName,
                                               String qualifiedName,
                                               String methodName)
                                        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
        methodName - calling method
        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

        public void attachSchemaTypeToDatabaseAsset​(String userId,
                                                    String databaseManagerGUID,
                                                    String databaseManagerName,
                                                    String databaseAssetGUID,
                                                    String schemaTypeGUID,
                                                    String methodName)
                                             throws InvalidParameterException,
                                                    PropertyServerException,
                                                    UserNotAuthorizedException
        Link the schema type and asset. This is called from outside of 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
        methodName - calling method
        Throws:
        InvalidParameterException - the bean properties are invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server
      • createDatabaseTable

        @Deprecated
        public String createDatabaseTable​(String userId,
                                          String databaseManagerGUID,
                                          String databaseManagerName,
                                          String databaseAssetGUID,
                                          String qualifiedName,
                                          String displayName,
                                          String description,
                                          boolean isDeprecated,
                                          List<String> aliases,
                                          Map<String,​String> additionalProperties,
                                          String typeName,
                                          Map<String,​Object> extendedProperties,
                                          Map<String,​String> vendorProperties,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Deprecated.
        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
        databaseAssetGUID - unique identifier of the database or database schema where the database table is located
        qualifiedName - unique name for the database table
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        isDeprecated - is this table deprecated?
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of RelationalTable - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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)
      • createDatabaseTable

        public String createDatabaseTable​(String userId,
                                          String databaseManagerGUID,
                                          String databaseManagerName,
                                          String databaseAssetGUID,
                                          String qualifiedName,
                                          String displayName,
                                          String description,
                                          boolean isDeprecated,
                                          List<String> aliases,
                                          Map<String,​String> additionalProperties,
                                          String typeName,
                                          Map<String,​Object> extendedProperties,
                                          Map<String,​String> vendorProperties,
                                          Date effectiveTime,
                                          String methodName)
                                   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
        databaseAssetGUID - unique identifier of the database or database schema where the database table is located
        qualifiedName - unique name for the database table
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        isDeprecated - is this table deprecated?
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of RelationalTable - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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

        public String createDatabaseTableForSchemaType​(String userId,
                                                       String databaseManagerGUID,
                                                       String databaseManagerName,
                                                       String databaseSchemaTypeGUID,
                                                       String qualifiedName,
                                                       String displayName,
                                                       String description,
                                                       boolean isDeprecated,
                                                       List<String> aliases,
                                                       Map<String,​String> additionalProperties,
                                                       String typeName,
                                                       Map<String,​Object> extendedProperties,
                                                       Map<String,​String> vendorProperties,
                                                       Date effectiveTime,
                                                       String methodName)
                                                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
        qualifiedName - unique name for the database table
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        isDeprecated - is this table deprecated?
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of RelationalTable - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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

        public String createDatabaseTableFromTemplate​(String userId,
                                                      String databaseManagerGUID,
                                                      String databaseManagerName,
                                                      String templateGUID,
                                                      String databaseAssetGUID,
                                                      String qualifiedName,
                                                      String displayName,
                                                      String description,
                                                      Date effectiveTime,
                                                      String methodName)
                                               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 DBMS - if null a local element is created
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseAssetGUID - unique identifier of the database or database schema where the database table is located.
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        methodName - calling method
        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)
      • updateDatabaseTable

        public void updateDatabaseTable​(String userId,
                                        String databaseManagerGUID,
                                        String databaseManagerName,
                                        String databaseTableGUID,
                                        String qualifiedName,
                                        String displayName,
                                        String description,
                                        boolean isDeprecated,
                                        List<String> aliases,
                                        Map<String,​String> additionalProperties,
                                        String typeName,
                                        Map<String,​Object> extendedProperties,
                                        Map<String,​String> vendorProperties,
                                        String methodName)
                                 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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseTableGUID - unique identifier of the database table to update
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        isDeprecated - is this table deprecated?
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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

        public void removeDatabaseTable​(String userId,
                                        String databaseManagerGUID,
                                        String databaseManagerName,
                                        String databaseTableGUID,
                                        String databaseTableGUIDParameterName,
                                        String qualifiedName,
                                        String methodName)
                                 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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseTableGUID - unique identifier of the metadata element to remove
        databaseTableGUIDParameterName - name of parameter supplying databaseTableGUID
        qualifiedName - unique name of the metadata element to remove
        methodName - calling method
        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)
      • findDatabaseTables

        public List<DATABASE_TABLE> findDatabaseTables​(String userId,
                                                       String searchString,
                                                       int startFrom,
                                                       int pageSize,
                                                       Date effectiveTime,
                                                       String methodName)
                                                throws InvalidParameterException,
                                                       UserNotAuthorizedException,
                                                       PropertyServerException
        Retrieve the list of database table metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        userId - calling user
        searchString - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • getTablesForDatabaseAsset

        public List<DATABASE_TABLE> getTablesForDatabaseAsset​(String userId,
                                                              String databaseAssetGUID,
                                                              int startFrom,
                                                              int pageSize,
                                                              Date effectiveTime,
                                                              String methodName)
                                                       throws InvalidParameterException,
                                                              UserNotAuthorizedException,
                                                              PropertyServerException
        Retrieve the list of database tables associated with a database schema.
        Parameters:
        userId - calling user
        databaseAssetGUID - unique identifier of the database or database schema of interest
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of associated 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)
      • getDatabaseTablesByName

        public List<DATABASE_TABLE> getDatabaseTablesByName​(String userId,
                                                            String name,
                                                            int startFrom,
                                                            int pageSize,
                                                            Date effectiveTime,
                                                            String methodName)
                                                     throws InvalidParameterException,
                                                            UserNotAuthorizedException,
                                                            PropertyServerException
        Retrieve the list of database table metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        name - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • createDatabaseView

        public String createDatabaseView​(String userId,
                                         String databaseManagerGUID,
                                         String databaseManagerName,
                                         String databaseAssetGUID,
                                         String qualifiedName,
                                         String displayName,
                                         String description,
                                         boolean isDeprecated,
                                         List<String> aliases,
                                         String expression,
                                         Map<String,​String> additionalProperties,
                                         String typeName,
                                         Map<String,​Object> extendedProperties,
                                         Map<String,​String> vendorProperties,
                                         Date effectiveTime,
                                         String methodName)
                                  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
        databaseAssetGUID - unique identifier of the database or database schema where the database view is located.
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        isDeprecated - is this table deprecated?
        aliases - a list of alternative names for the attribute
        expression - the code that generates the value for this view.
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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

        public String createDatabaseViewForSchemaType​(String userId,
                                                      String databaseManagerGUID,
                                                      String databaseManagerName,
                                                      String databaseSchemaTypeGUID,
                                                      String qualifiedName,
                                                      String displayName,
                                                      String description,
                                                      boolean isDeprecated,
                                                      List<String> aliases,
                                                      String expression,
                                                      Map<String,​String> additionalProperties,
                                                      String typeName,
                                                      Map<String,​Object> extendedProperties,
                                                      Map<String,​String> vendorProperties,
                                                      Date effectiveTime,
                                                      String methodName)
                                               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.
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        isDeprecated - is this table deprecated?
        aliases - a list of alternative names for the attribute
        expression - the code that generates the value for this view.
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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

        public String createDatabaseViewFromTemplate​(String userId,
                                                     String databaseManagerGUID,
                                                     String databaseManagerName,
                                                     String templateGUID,
                                                     String databaseAssetGUID,
                                                     String qualifiedName,
                                                     String displayName,
                                                     String description,
                                                     Date effectiveTime,
                                                     String methodName)
                                              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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseAssetGUID - unique identifier of the database or database schema where the database view is located.
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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

        public void updateDatabaseView​(String userId,
                                       String databaseManagerGUID,
                                       String databaseManagerName,
                                       String databaseViewGUID,
                                       String qualifiedName,
                                       String displayName,
                                       String description,
                                       boolean isDeprecated,
                                       List<String> aliases,
                                       String expression,
                                       Map<String,​String> additionalProperties,
                                       String typeName,
                                       Map<String,​Object> extendedProperties,
                                       Map<String,​String> vendorProperties,
                                       String methodName)
                                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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseViewGUID - unique identifier of the database view to update
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        isDeprecated - is this table deprecated?
        aliases - a list of alternative names for the attribute
        expression - the code that generates the value for this view.
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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)
      • findDatabaseViews

        public List<DATABASE_VIEW> findDatabaseViews​(String userId,
                                                     String searchString,
                                                     int startFrom,
                                                     int pageSize,
                                                     Date effectiveTime,
                                                     String methodName)
                                              throws InvalidParameterException,
                                                     UserNotAuthorizedException,
                                                     PropertyServerException
        Retrieve the list of database view metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        userId - calling user
        searchString - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • getViewsForDatabaseAsset

        public List<DATABASE_VIEW> getViewsForDatabaseAsset​(String userId,
                                                            String databaseAssetGUID,
                                                            int startFrom,
                                                            int pageSize,
                                                            Date effectiveTime,
                                                            String methodName)
                                                     throws InvalidParameterException,
                                                            UserNotAuthorizedException,
                                                            PropertyServerException
        Retrieve the list of database views associated with a database or database schema.
        Parameters:
        userId - calling user
        databaseAssetGUID - unique identifier of the database or database schema of interest
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of associated 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)
      • getDatabaseViewsByName

        public List<DATABASE_VIEW> getDatabaseViewsByName​(String userId,
                                                          String name,
                                                          int startFrom,
                                                          int pageSize,
                                                          Date effectiveTime,
                                                          String methodName)
                                                   throws InvalidParameterException,
                                                          UserNotAuthorizedException,
                                                          PropertyServerException
        Retrieve the list of database view metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        name - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • createDatabaseColumn

        @Deprecated
        public String createDatabaseColumn​(String userId,
                                           String databaseManagerGUID,
                                           String databaseManagerName,
                                           String databaseTableGUID,
                                           String qualifiedName,
                                           String displayName,
                                           String description,
                                           String externalSchemaTypeGUID,
                                           String dataType,
                                           String defaultValue,
                                           String fixedValue,
                                           String validValuesSetGUID,
                                           String formula,
                                           boolean isDeprecated,
                                           int elementPosition,
                                           int minCardinality,
                                           int maxCardinality,
                                           boolean allowsDuplicateValues,
                                           boolean orderedValues,
                                           String defaultValueOverride,
                                           int sortOrder,
                                           int minimumLength,
                                           int length,
                                           int significantDigits,
                                           boolean isNullable,
                                           String nativeJavaClass,
                                           List<String> aliases,
                                           Map<String,​String> additionalProperties,
                                           String typeName,
                                           Map<String,​Object> extendedProperties,
                                           Map<String,​String> vendorProperties,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Deprecated.
        Create a new metadata element to represent a database column.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseTableGUID - unique identifier of the database table where this column is located
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        externalSchemaTypeGUID - unique identifier of a schema Type that provides the type. If null, a private schema type is used
        dataType - data type name - for stored values
        defaultValue - string containing default value - for stored values
        fixedValue - string containing a fixed value - for a literal
        validValuesSetGUID - unique identifier of a valid value set that lists the valid values for this schema
        formula - String formula - for derived values
        isDeprecated - is this table deprecated?
        elementPosition - the position of this column in its parent table.
        minCardinality - minimum number of repeating instances allowed for this column - typically 1
        maxCardinality - the maximum number of repeating instances allowed for this column - typically 1
        allowsDuplicateValues - whether the same value can be used by more than one instance of this attribute
        orderedValues - whether the attribute instances are arranged in an order
        sortOrder - the order that the attribute instances are arranged in - if any
        minimumLength - the minimum length of the data
        length - the length of the data field
        significantDigits - number of significant digits to the right of decimal point
        isNullable - whether the field is nullable or not
        nativeJavaClass - equivalent Java class implementation
        defaultValueOverride - default value for this column
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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)
      • createDatabaseColumn

        public String createDatabaseColumn​(String userId,
                                           String databaseManagerGUID,
                                           String databaseManagerName,
                                           String databaseTableGUID,
                                           String qualifiedName,
                                           String displayName,
                                           String description,
                                           String externalSchemaTypeGUID,
                                           String dataType,
                                           String defaultValue,
                                           String fixedValue,
                                           String validValuesSetGUID,
                                           String formula,
                                           boolean isDeprecated,
                                           int elementPosition,
                                           int minCardinality,
                                           int maxCardinality,
                                           boolean allowsDuplicateValues,
                                           boolean orderedValues,
                                           String defaultValueOverride,
                                           int sortOrder,
                                           int minimumLength,
                                           int length,
                                           int significantDigits,
                                           boolean isNullable,
                                           String nativeJavaClass,
                                           List<String> aliases,
                                           Map<String,​String> additionalProperties,
                                           String typeName,
                                           Map<String,​Object> extendedProperties,
                                           Map<String,​String> vendorProperties,
                                           Date effectiveTime,
                                           String methodName)
                                    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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseTableGUID - unique identifier of the database table where this column is located
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        externalSchemaTypeGUID - unique identifier of a schema Type that provides the type. If null, a private schema type is used
        dataType - data type name - for stored values
        defaultValue - string containing default value - for stored values
        fixedValue - string containing a fixed value - for a literal
        validValuesSetGUID - unique identifier of a valid value set that lists the valid values for this schema
        formula - String formula - for derived values
        isDeprecated - is this table deprecated?
        elementPosition - the position of this column in its parent table.
        minCardinality - minimum number of repeating instances allowed for this column - typically 1
        maxCardinality - the maximum number of repeating instances allowed for this column - typically 1
        allowsDuplicateValues - whether the same value can be used by more than one instance of this attribute
        orderedValues - whether the attribute instances are arranged in an order
        sortOrder - the order that the attribute instances are arranged in - if any
        minimumLength - the minimum length of the data
        length - the length of the data field
        significantDigits - number of significant digits to the right of decimal point
        isNullable - whether the field is nullable or not
        nativeJavaClass - equivalent Java class implementation
        defaultValueOverride - default value for this column
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • createDatabaseColumnQuery

        public void createDatabaseColumnQuery​(String userId,
                                              String databaseManagerGUID,
                                              String databaseManagerName,
                                              String databaseColumnGUID,
                                              String queryId,
                                              String query,
                                              String queryTargetGUID,
                                              String methodName)
                                       throws InvalidParameterException,
                                              UserNotAuthorizedException,
                                              PropertyServerException
        Create a new query relationship for a derived database column.
        Parameters:
        userId - calling user
        databaseManagerGUID - unique identifier of software server capability representing the DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier of the database column that this query supports
        queryId - identifier for the query - used as a placeholder in the formula (stored in the column's CalculatedValue classification)
        query - the query that is made on the targetGUID
        queryTargetGUID - the unique identifier of the target (this is a schema element - typically a column)
        methodName - calling method
        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

        public String createDatabaseColumnFromTemplate​(String userId,
                                                       String databaseManagerGUID,
                                                       String databaseManagerName,
                                                       String templateGUID,
                                                       String databaseTableGUID,
                                                       String qualifiedName,
                                                       String displayName,
                                                       String description,
                                                       Date effectiveTime,
                                                       String methodName)
                                                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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        databaseTableGUID - unique identifier of the database table where this column is located
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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

        public void updateDatabaseColumn​(String userId,
                                         String databaseManagerGUID,
                                         String databaseManagerName,
                                         String databaseColumnGUID,
                                         String qualifiedName,
                                         String displayName,
                                         String description,
                                         String dataType,
                                         String defaultValue,
                                         String fixedValue,
                                         String formula,
                                         boolean isDeprecated,
                                         int elementPosition,
                                         int minCardinality,
                                         int maxCardinality,
                                         boolean allowsDuplicateValues,
                                         boolean orderedValues,
                                         String defaultValueOverride,
                                         int sortOrder,
                                         int minimumLength,
                                         int length,
                                         int significantDigits,
                                         boolean isNullable,
                                         String nativeJavaClass,
                                         List<String> aliases,
                                         Map<String,​String> additionalProperties,
                                         String typeName,
                                         Map<String,​Object> extendedProperties,
                                         Map<String,​String> vendorProperties,
                                         String methodName)
                                  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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier of the metadata element to update
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        dataType - data type name - for stored values
        defaultValue - string containing default value - for stored values
        fixedValue - string containing fixed value - for literals
        formula - String formula - for derived values
        isDeprecated - is this table deprecated?
        elementPosition - the position of this column in its parent table.
        minCardinality - minimum number of repeating instances allowed for this column - typically 1
        maxCardinality - the maximum number of repeating instances allowed for this column - typically 1
        allowsDuplicateValues - whether the same value can be used by more than one instance of this attribute
        orderedValues - whether the attribute instances are arranged in an order
        sortOrder - the order that the attribute instances are arranged in - if any
        minimumLength - the minimum length of the data
        length - the length of the data field
        significantDigits - number of significant digits to the right of decimal point
        isNullable - whether the field is nullable or not
        nativeJavaClass - equivalent Java class implementation
        defaultValueOverride - default value for this column
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of RelationalColumn - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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

        public void updateDatabaseColumn​(String userId,
                                         String databaseManagerGUID,
                                         String databaseManagerName,
                                         String databaseColumnGUID,
                                         String qualifiedName,
                                         String displayName,
                                         String description,
                                         String externalSchemaTypeGUID,
                                         String dataType,
                                         String defaultValue,
                                         String fixedValue,
                                         String validValuesSetGUID,
                                         String formula,
                                         boolean isDeprecated,
                                         int elementPosition,
                                         int minCardinality,
                                         int maxCardinality,
                                         boolean allowsDuplicateValues,
                                         boolean orderedValues,
                                         String defaultValueOverride,
                                         int sortOrder,
                                         int minimumLength,
                                         int length,
                                         int significantDigits,
                                         boolean isNullable,
                                         String nativeJavaClass,
                                         List<String> aliases,
                                         Map<String,​String> additionalProperties,
                                         String typeName,
                                         Map<String,​Object> extendedProperties,
                                         Map<String,​String> vendorProperties,
                                         String methodName)
                                  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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier of the metadata element to update
        qualifiedName - unique name for the database schema
        displayName - the stored display name property for the database table
        description - the stored description property associated with the database table
        externalSchemaTypeGUID - unique identifier of an external schema identifier
        dataType - data type name - for stored values
        defaultValue - string containing default value - for stored values
        fixedValue - string containing fixed value - for literals
        validValuesSetGUID - unique identifier for a valid values set to support
        formula - String formula - for derived values
        isDeprecated - is this table deprecated?
        elementPosition - the position of this column in its parent table.
        minCardinality - minimum number of repeating instances allowed for this column - typically 1
        maxCardinality - the maximum number of repeating instances allowed for this column - typically 1
        allowsDuplicateValues - whether the same value can be used by more than one instance of this attribute
        orderedValues - whether the attribute instances are arranged in an order
        sortOrder - the order that the attribute instances are arranged in - if any
        minimumLength - the minimum length of the data
        length - the length of the data field
        significantDigits - number of significant digits to the right of decimal point
        isNullable - whether the field is nullable or not
        nativeJavaClass - equivalent Java class implementation
        defaultValueOverride - default value for this column
        aliases - a list of alternative names for the attribute
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DeployedDatabaseSchema - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the database technology
        methodName - calling method
        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

        public void removeDatabaseColumn​(String userId,
                                         String databaseManagerGUID,
                                         String databaseManagerName,
                                         String databaseColumnGUID,
                                         String qualifiedName,
                                         String methodName)
                                  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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier of the metadata element to remove
        qualifiedName - unique name of the metadata element to remove
        methodName - calling method
        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)
      • findDatabaseColumns

        public List<DATABASE_COLUMN> findDatabaseColumns​(String userId,
                                                         String searchString,
                                                         int startFrom,
                                                         int pageSize,
                                                         Date effectiveTime,
                                                         String methodName)
                                                  throws InvalidParameterException,
                                                         UserNotAuthorizedException,
                                                         PropertyServerException
        Retrieve the list of database column metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        userId - calling user
        searchString - string to find in the properties
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • getColumnsForDatabaseTable

        public List<DATABASE_COLUMN> getColumnsForDatabaseTable​(String userId,
                                                                String databaseTableGUID,
                                                                int startFrom,
                                                                int pageSize,
                                                                Date effectiveTime,
                                                                String methodName)
                                                         throws InvalidParameterException,
                                                                UserNotAuthorizedException,
                                                                PropertyServerException
        Retrieve the list of column for a database table (or view)
        Parameters:
        userId - calling user
        databaseTableGUID - unique identifier of the database table of interest
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • getDatabaseColumnsByName

        public List<DATABASE_COLUMN> getDatabaseColumnsByName​(String userId,
                                                              String name,
                                                              int startFrom,
                                                              int pageSize,
                                                              Date effectiveTime,
                                                              String methodName)
                                                       throws InvalidParameterException,
                                                              UserNotAuthorizedException,
                                                              PropertyServerException
        Retrieve the list of database column metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
        Parameters:
        userId - calling user
        name - name to search for
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        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)
      • setPrimaryKeyOnColumn

        public void setPrimaryKeyOnColumn​(String userId,
                                          String databaseManagerGUID,
                                          String databaseManagerName,
                                          String databaseColumnGUID,
                                          String name,
                                          int keyPatternOrdinal,
                                          String methodName)
                                   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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        databaseColumnGUID - unique identifier if the primary key column
        name - name of primary key
        keyPatternOrdinal - type of lifecycle and scope
        methodName - calling method
        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

        public void addForeignKeyRelationship​(String userId,
                                              String databaseManagerGUID,
                                              String databaseManagerName,
                                              String primaryKeyColumnGUID,
                                              String foreignKeyColumnGUID,
                                              String name,
                                              String description,
                                              int confidence,
                                              String steward,
                                              String source,
                                              String methodName)
                                       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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        primaryKeyColumnGUID - unique identifier of the column containing the primary key
        foreignKeyColumnGUID - unique identifier of the column containing the primary key from the other table
        name - the display name for UIs and reports
        description - description of the foreign key
        confidence - the level of confidence that the foreign key is correct. This is a value between 0 and 100
        steward - the name of the steward who assigned the foreign key (or approved the discovered value)
        source - the id of the source of the knowledge of the foreign key
        methodName - calling method
        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

        public void removeForeignKeyRelationship​(String userId,
                                                 String databaseManagerGUID,
                                                 String databaseManagerName,
                                                 String primaryKeyColumnGUID,
                                                 String foreignKeyColumnGUID,
                                                 String methodName)
                                          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 DBMS
        databaseManagerName - unique name of software server capability representing the DBMS
        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
        methodName - calling method
        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)