Class DatabaseManagerClient
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.datamanager.client.DatabaseManagerClient
-
- All Implemented Interfaces:
DatabaseManagerInterface
public class DatabaseManagerClient extends Object implements DatabaseManagerInterface
DatabaseManagerClient is the client for managing resources from a relational database server.
-
-
Constructor Summary
Constructors Constructor Description DatabaseManagerClient(String serverName, String serverPlatformURLRoot)Create a new client with no authentication embedded in the HTTP request.DatabaseManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password)Create a new client that passes userId and password in each HTTP request.DatabaseManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Create a new client that passes userId and password in each HTTP request.DatabaseManagerClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize, AuditLog auditLog)Create a new client that is going to be used in an OMAG Server.DatabaseManagerClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Create a new client with no authentication embedded in the HTTP request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddForeignKeyRelationship(String userId, String databaseManagerGUID, String databaseManagerName, String primaryKeyColumnGUID, String foreignKeyColumnGUID, DatabaseForeignKeyProperties databaseForeignKeyProperties)Create a foreign relationship between two columns.voidattachSchemaTypeToDatabaseAsset(String userId, String databaseManagerGUID, String databaseManagerName, String databaseAssetGUID, String schemaTypeGUID)Link the schema type and asset.StringcreateDatabase(String userId, String databaseManagerGUID, String databaseManagerName, DatabaseProperties databaseProperties)Create a new metadata element to represent a database.StringcreateDatabaseColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseTableGUID, DatabaseColumnProperties databaseColumnProperties)Create a new metadata element to represent a database column.StringcreateDatabaseColumnFromTemplate(String userId, String databaseManagerGUID, String databaseManagerName, String templateGUID, String databaseTableGUID, TemplateProperties templateProperties)Create a new metadata element to represent a database column using an existing metadata element as a template.StringcreateDatabaseFromTemplate(String userId, String databaseManagerGUID, String databaseManagerName, String templateGUID, TemplateProperties templateProperties)Create a new metadata element to represent a database using an existing metadata element as a template.StringcreateDatabaseSchema(String userId, String databaseManagerGUID, String databaseManagerName, String databaseGUID, DatabaseSchemaProperties databaseSchemaProperties)Create a new metadata element to represent a database schema.StringcreateDatabaseSchemaFromTemplate(String userId, String databaseManagerGUID, String databaseManagerName, String templateGUID, String databaseGUID, TemplateProperties templateProperties)Create a new metadata element to represent a database schema using an existing metadata element as a template.StringcreateDatabaseSchemaType(String userId, String databaseManagerGUID, String databaseManagerName, String qualifiedName)Create a database top-level schema type used to attach tables and views to the database/database schema.StringcreateDatabaseTable(String userId, String databaseManagerGUID, String databaseManagerName, String databaseAssetGUID, DatabaseTableProperties databaseTableProperties)Create a new metadata element to represent a database table.StringcreateDatabaseTableForSchemaType(String userId, String databaseManagerGUID, String databaseManagerName, String databaseSchemaTypeGUID, DatabaseTableProperties databaseTableProperties)Create a new metadata element to represent a database table.StringcreateDatabaseTableFromTemplate(String userId, String databaseManagerGUID, String databaseManagerName, String templateGUID, String databaseAssetGUID, TemplateProperties templateProperties)Create a new metadata element to represent a database table using an existing metadata element as a template.StringcreateDatabaseView(String userId, String databaseManagerGUID, String databaseManagerName, String databaseAssetGUID, DatabaseViewProperties databaseViewProperties)Create a new metadata element to represent a database view.StringcreateDatabaseViewForSchemaType(String userId, String databaseManagerGUID, String databaseManagerName, String databaseSchemaTypeGUID, DatabaseViewProperties databaseViewProperties)Create a new metadata element to represent a database view.StringcreateDatabaseViewFromTemplate(String userId, String databaseManagerGUID, String databaseManagerName, String templateGUID, String databaseAssetGUID, TemplateProperties templateProperties)Create a new metadata element to represent a database view using an existing metadata element as a template.List<DatabaseColumnElement>findDatabaseColumns(String userId, String searchString, int startFrom, int pageSize)Retrieve the list of database column metadata elements that contain the search string.List<DatabaseElement>findDatabases(String userId, String searchString, int startFrom, int pageSize)Retrieve the list of database metadata elements that contain the search string.List<DatabaseSchemaElement>findDatabaseSchemas(String userId, String searchString, int startFrom, int pageSize)Retrieve the list of database schema metadata elements that contain the search string.List<DatabaseTableElement>findDatabaseTables(String userId, String searchString, int startFrom, int pageSize)Retrieve the list of database table metadata elements that contain the search string.List<DatabaseViewElement>findDatabaseViews(String userId, String searchString, int startFrom, int pageSize)Retrieve the list of database view metadata elements that contain the search string.List<DatabaseColumnElement>getColumnsForDatabaseTable(String userId, String databaseTableGUID, int startFrom, int pageSize)Retrieve the list of column for a database table (or view)DatabaseElementgetDatabaseByGUID(String userId, String guid)Retrieve the database metadata element with the supplied unique identifier.DatabaseColumnElementgetDatabaseColumnByGUID(String userId, String guid)Retrieve the database column metadata element with the supplied unique identifier.List<DatabaseColumnElement>getDatabaseColumnsByName(String userId, String name, int startFrom, int pageSize)Retrieve the list of database column metadata elements with a matching qualified or display name.List<DatabaseElement>getDatabasesByName(String userId, String name, int startFrom, int pageSize)Retrieve the list of database metadata elements with a matching qualified or display name.DatabaseSchemaElementgetDatabaseSchemaByGUID(String userId, String guid)Retrieve the database schema metadata element with the supplied unique identifier.List<DatabaseSchemaElement>getDatabaseSchemasByName(String userId, String name, int startFrom, int pageSize)Retrieve the list of database schema metadata elements with a matching qualified or display name.List<DatabaseElement>getDatabasesForDatabaseManager(String userId, String databaseManagerGUID, String databaseManagerName, int startFrom, int pageSize)Retrieve the list of databases created by this caller.DatabaseTableElementgetDatabaseTableByGUID(String userId, String guid)Retrieve the database table metadata element with the supplied unique identifier.List<DatabaseTableElement>getDatabaseTablesByName(String userId, String name, int startFrom, int pageSize)Retrieve the list of database table metadata elements with a matching qualified or display name.DatabaseViewElementgetDatabaseViewByGUID(String userId, String guid)Retrieve the database view metadata element with the supplied unique identifier.List<DatabaseViewElement>getDatabaseViewsByName(String userId, String name, int startFrom, int pageSize)Retrieve the list of database view metadata elements with a matching qualified or display name.List<DatabaseSchemaElement>getSchemasForDatabase(String userId, String databaseGUID, int startFrom, int pageSize)Return the list of schemas associated with a database.List<DatabaseTableElement>getTablesForDatabaseAsset(String userId, String databaseAssetGUID, int startFrom, int pageSize)Retrieve the list of database tables associated with a database or database schema.List<DatabaseTableElement>getTablesForDatabaseSchema(String userId, String databaseSchemaGUID, int startFrom, int pageSize)Retrieve the list of database tables associated with a database schema.List<DatabaseViewElement>getViewsForDatabaseAsset(String userId, String databaseAssetGUID, int startFrom, int pageSize)Retrieve the list of database views associated with a database or database schema.List<DatabaseViewElement>getViewsForDatabaseSchema(String userId, String databaseSchemaGUID, int startFrom, int pageSize)Retrieve the list of database views associated with a database schema.voidpublishDatabase(String userId, String databaseGUID)Update the zones for the database asset so that it becomes visible to consumers.voidpublishDatabaseSchema(String userId, String databaseSchemaGUID)Update the zones for the database asset so that it becomes visible to consumers.voidremoveDatabase(String userId, String databaseManagerGUID, String databaseManagerName, String databaseGUID, String qualifiedName)Remove the metadata element representing a database.voidremoveDatabaseColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseColumnGUID, String qualifiedName)Remove the metadata element representing a database column.voidremoveDatabaseSchema(String userId, String databaseManagerGUID, String databaseManagerName, String databaseSchemaGUID, String qualifiedName)Remove the metadata element representing a database schema.voidremoveDatabaseTable(String userId, String databaseManagerGUID, String databaseManagerName, String databaseTableGUID, String qualifiedName)Remove the metadata element representing a database table.voidremoveDatabaseView(String userId, String databaseManagerGUID, String databaseManagerName, String databaseViewGUID, String qualifiedName)Remove the metadata element representing a database table.voidremoveForeignKeyRelationship(String userId, String databaseManagerGUID, String databaseManagerName, String primaryKeyColumnGUID, String foreignKeyColumnGUID)Remove the foreign key relationship for the requested columns.voidremovePrimaryKeyFromColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseColumnGUID)Remove the classification that this column is a primary key.voidsetPrimaryKeyOnColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseColumnGUID, DatabasePrimaryKeyProperties databasePrimaryKeyProperties)Classify a column in a database table as the primary key.voidupdateDatabase(String userId, String databaseManagerGUID, String databaseManagerName, String databaseGUID, DatabaseProperties databaseProperties)Update the metadata element representing a database.voidupdateDatabaseColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseColumnGUID, DatabaseColumnProperties databaseColumnProperties)Update the metadata element representing a database column.voidupdateDatabaseSchema(String userId, String databaseManagerGUID, String databaseManagerName, String databaseSchemaGUID, DatabaseSchemaProperties databaseSchemaProperties)Update the metadata element representing a database schema.voidupdateDatabaseTable(String userId, String databaseManagerGUID, String databaseManagerName, String databaseTableGUID, DatabaseTableProperties databaseTableProperties)Update the metadata element representing a database table.voidupdateDatabaseView(String userId, String databaseManagerGUID, String databaseManagerName, String databaseViewGUID, DatabaseViewProperties databaseViewProperties)Update the metadata element representing a database table.voidwithdrawDatabase(String userId, String databaseGUID)Update the zones for the database asset so that it is no longer visible to consumers.voidwithdrawDatabaseSchema(String userId, String databaseSchemaGUID)Update the zones for the database asset so that it is no longer visible to consumers.
-
-
-
Constructor Detail
-
DatabaseManagerClient
public DatabaseManagerClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DatabaseManagerClient
public DatabaseManagerClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servers- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DatabaseManagerClient
public DatabaseManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DatabaseManagerClient
public DatabaseManagerClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
Create a new client that is going to be used in an OMAG Server.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversrestClient- client that issues the REST API callsmaxPageSize- maximum number of results supported by this serverauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DatabaseManagerClient
public DatabaseManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
createDatabase
public String createDatabase(String userId, String databaseManagerGUID, String databaseManagerName, DatabaseProperties databaseProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database.- Specified by:
createDatabasein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseProperties- properties to store- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDatabaseFromTemplate
public String createDatabaseFromTemplate(String userId, String databaseManagerGUID, String databaseManagerName, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database using an existing metadata element as a template.- Specified by:
createDatabaseFromTemplatein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMStemplateGUID- unique identifier of the metadata element to copytemplateProperties- properties that override the template- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateDatabase
public void updateDatabase(String userId, String databaseManagerGUID, String databaseManagerName, String databaseGUID, DatabaseProperties databaseProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a database.- Specified by:
updateDatabasein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseGUID- unique identifier of the metadata element to updatedatabaseProperties- new properties for this element- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
publishDatabase
public void publishDatabase(String userId, String databaseGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the zones for the database asset so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of the Data Manager OMAS).- Specified by:
publishDatabasein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseGUID- unique identifier of the metadata element to publish- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
withdrawDatabase
public void withdrawDatabase(String userId, String databaseGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the zones for the database asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Data Manager OMAS. This is the setting when the database is first created).- Specified by:
withdrawDatabasein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseGUID- unique identifier of the metadata element to withdraw- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a database.- Specified by:
removeDatabasein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseGUID- unique identifier of the metadata element to removequalifiedName- unique name of the metadata element to remove- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findDatabases
public List<DatabaseElement> findDatabases(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findDatabasesin interfaceDatabaseManagerInterface- Parameters:
userId- calling usersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabasesByName
public List<DatabaseElement> getDatabasesByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getDatabasesByNamein interfaceDatabaseManagerInterface- Parameters:
userId- calling username- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabasesForDatabaseManager
public List<DatabaseElement> getDatabasesForDatabaseManager(String userId, String databaseManagerGUID, String databaseManagerName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of databases created by this caller.- Specified by:
getDatabasesForDatabaseManagerin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the database manager (DBMS)databaseManagerName- unique name of software server capability representing the database manager (DBMS)startFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseByGUID
public DatabaseElement getDatabaseByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the database metadata element with the supplied unique identifier.- Specified by:
getDatabaseByGUIDin interfaceDatabaseManagerInterface- Parameters:
userId- calling userguid- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDatabaseSchema
public String createDatabaseSchema(String userId, String databaseManagerGUID, String databaseManagerName, String databaseGUID, DatabaseSchemaProperties databaseSchemaProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database schema.- Specified by:
createDatabaseSchemain interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseGUID- unique identifier of the database where the schema is locateddatabaseSchemaProperties- properties about the database schema- Returns:
- unique identifier of the new database schema
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database schema using an existing metadata element as a template.- Specified by:
createDatabaseSchemaFromTemplatein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMStemplateGUID- unique identifier of the metadata element to copydatabaseGUID- unique identifier of the database where the schema is locatedtemplateProperties- properties that override the template- Returns:
- unique identifier of the new database schema
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateDatabaseSchema
public void updateDatabaseSchema(String userId, String databaseManagerGUID, String databaseManagerName, String databaseSchemaGUID, DatabaseSchemaProperties databaseSchemaProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a database schema.- Specified by:
updateDatabaseSchemain interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseSchemaGUID- unique identifier of the metadata element to updatedatabaseSchemaProperties- new properties for the metadata element- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
publishDatabaseSchema
public void publishDatabaseSchema(String userId, String databaseSchemaGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the zones for the database asset so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of the Data Manager OMAS).- Specified by:
publishDatabaseSchemain interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseSchemaGUID- unique identifier of the metadata element to publish- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
withdrawDatabaseSchema
public void withdrawDatabaseSchema(String userId, String databaseSchemaGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the zones for the database asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Data Manager OMAS. This is the setting when the database is first created).- Specified by:
withdrawDatabaseSchemain interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseSchemaGUID- unique identifier of the metadata element to withdraw- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a database schema.- Specified by:
removeDatabaseSchemain interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseSchemaGUID- unique identifier of the metadata element to removequalifiedName- unique name of the metadata element to remove- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findDatabaseSchemas
public List<DatabaseSchemaElement> findDatabaseSchemas(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database schema metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findDatabaseSchemasin interfaceDatabaseManagerInterface- Parameters:
userId- calling usersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getSchemasForDatabase
public List<DatabaseSchemaElement> getSchemasForDatabase(String userId, String databaseGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the list of schemas associated with a database.- Specified by:
getSchemasForDatabasein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseGUID- unique identifier of the database to querystartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of metadata elements describing the schemas associated with the requested database
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseSchemasByName
public List<DatabaseSchemaElement> getDatabaseSchemasByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database schema metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getDatabaseSchemasByNamein interfaceDatabaseManagerInterface- Parameters:
userId- calling username- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseSchemaByGUID
public DatabaseSchemaElement getDatabaseSchemaByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the database schema metadata element with the supplied unique identifier.- Specified by:
getDatabaseSchemaByGUIDin interfaceDatabaseManagerInterface- Parameters:
userId- calling userguid- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDatabaseSchemaType
public String createDatabaseSchemaType(String userId, String databaseManagerGUID, String databaseManagerName, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a database top-level schema type used to attach tables and views to the database/database schema.- Specified by:
createDatabaseSchemaTypein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- guid of the software server capability entity that represented the external source - null for localdatabaseManagerName- name of the software server capability entity that represented the external source - null for localqualifiedName- qualified name ofr the schema type - suggest "SchemaOf:" + asset's qualified name- Returns:
- unique identifier of the database schema type
- Throws:
InvalidParameterException- the bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
attachSchemaTypeToDatabaseAsset
public void attachSchemaTypeToDatabaseAsset(String userId, String databaseManagerGUID, String databaseManagerName, String databaseAssetGUID, String schemaTypeGUID) 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.- Specified by:
attachSchemaTypeToDatabaseAssetin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- guid of the software server capability entity that represented the external source - null for localdatabaseManagerName- name of the software server capability entity that represented the external source - null for localdatabaseAssetGUID- unique identifier of the asset to connect the schema toschemaTypeGUID- identifier for schema Type object- Throws:
InvalidParameterException- the bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
createDatabaseTable
public String createDatabaseTable(String userId, String databaseManagerGUID, String databaseManagerName, String databaseAssetGUID, DatabaseTableProperties databaseTableProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database table.- Specified by:
createDatabaseTablein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseAssetGUID- unique identifier of the database or database schema where the database table is located.databaseTableProperties- properties for the database table- Returns:
- unique identifier of the new metadata element for the database table
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database table using an existing metadata element as a template.- Specified by:
createDatabaseTableFromTemplatein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMStemplateGUID- unique identifier of the metadata element to copydatabaseAssetGUID- unique identifier of the database or database schema where the database table is located.templateProperties- properties that override the template- Returns:
- unique identifier of the new database table
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDatabaseTableForSchemaType
public String createDatabaseTableForSchemaType(String userId, String databaseManagerGUID, String databaseManagerName, String databaseSchemaTypeGUID, DatabaseTableProperties databaseTableProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database table.- Specified by:
createDatabaseTableForSchemaTypein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseSchemaTypeGUID- unique identifier of the database or database schema where the database table is locateddatabaseTableProperties- properties for the database table- Returns:
- unique identifier of the new metadata element for the database table
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateDatabaseTable
public void updateDatabaseTable(String userId, String databaseManagerGUID, String databaseManagerName, String databaseTableGUID, DatabaseTableProperties databaseTableProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a database table.- Specified by:
updateDatabaseTablein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseTableGUID- unique identifier of the database table to updatedatabaseTableProperties- new properties for the database table- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
removeDatabaseTable
public void removeDatabaseTable(String userId, String databaseManagerGUID, String databaseManagerName, String databaseTableGUID, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a database table.- Specified by:
removeDatabaseTablein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseTableGUID- unique identifier of the metadata element to removequalifiedName- unique name of the metadata element to remove- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findDatabaseTables
public List<DatabaseTableElement> findDatabaseTables(String userId, String searchString, int startFrom, int pageSize) 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.- Specified by:
findDatabaseTablesin interfaceDatabaseManagerInterface- Parameters:
userId- calling usersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getTablesForDatabaseSchema
public List<DatabaseTableElement> getTablesForDatabaseSchema(String userId, String databaseSchemaGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database tables associated with a database schema.- Specified by:
getTablesForDatabaseSchemain interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseSchemaGUID- unique identifier of the database schema of intereststartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of associated metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getTablesForDatabaseAsset
public List<DatabaseTableElement> getTablesForDatabaseAsset(String userId, String databaseAssetGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database tables associated with a database or database schema.- Specified by:
getTablesForDatabaseAssetin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseAssetGUID- unique identifier of the database or database schema of intereststartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of associated metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseTablesByName
public List<DatabaseTableElement> getDatabaseTablesByName(String userId, String name, int startFrom, int pageSize) 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.- Specified by:
getDatabaseTablesByNamein interfaceDatabaseManagerInterface- Parameters:
userId- calling username- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseTableByGUID
public DatabaseTableElement getDatabaseTableByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the database table metadata element with the supplied unique identifier.- Specified by:
getDatabaseTableByGUIDin interfaceDatabaseManagerInterface- Parameters:
userId- calling userguid- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDatabaseView
public String createDatabaseView(String userId, String databaseManagerGUID, String databaseManagerName, String databaseAssetGUID, DatabaseViewProperties databaseViewProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database view.- Specified by:
createDatabaseViewin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseAssetGUID- unique identifier of the database or database schema where the database view is located.databaseViewProperties- properties for the new view- Returns:
- unique identifier of the new metadata element for the database view
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database view using an existing metadata element as a template.- Specified by:
createDatabaseViewFromTemplatein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMStemplateGUID- unique identifier of the metadata element to copydatabaseAssetGUID- unique identifier of the database or database schema where the database view is located.templateProperties- properties that override the template- Returns:
- unique identifier of the new metadata element for the database view
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDatabaseViewForSchemaType
public String createDatabaseViewForSchemaType(String userId, String databaseManagerGUID, String databaseManagerName, String databaseSchemaTypeGUID, DatabaseViewProperties databaseViewProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database view.- Specified by:
createDatabaseViewForSchemaTypein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseSchemaTypeGUID- unique identifier of the schema type where the database view is located.databaseViewProperties- properties for the new view- Returns:
- unique identifier of the new metadata element for the database view
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateDatabaseView
public void updateDatabaseView(String userId, String databaseManagerGUID, String databaseManagerName, String databaseViewGUID, DatabaseViewProperties databaseViewProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a database table.- Specified by:
updateDatabaseViewin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseViewGUID- unique identifier of the database view to updatedatabaseViewProperties- properties for the new database view- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
removeDatabaseView
public void removeDatabaseView(String userId, String databaseManagerGUID, String databaseManagerName, String databaseViewGUID, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a database table.- Specified by:
removeDatabaseViewin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseViewGUID- unique identifier of the metadata element to removequalifiedName- unique name of the metadata element to remove- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findDatabaseViews
public List<DatabaseViewElement> findDatabaseViews(String userId, String searchString, int startFrom, int pageSize) 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.- Specified by:
findDatabaseViewsin interfaceDatabaseManagerInterface- Parameters:
userId- calling usersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getViewsForDatabaseSchema
public List<DatabaseViewElement> getViewsForDatabaseSchema(String userId, String databaseSchemaGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database views associated with a database schema.- Specified by:
getViewsForDatabaseSchemain interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseSchemaGUID- unique identifier of the database schema of intereststartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of associated metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getViewsForDatabaseAsset
public List<DatabaseViewElement> getViewsForDatabaseAsset(String userId, String databaseAssetGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of database views associated with a database or database schema.- Specified by:
getViewsForDatabaseAssetin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseAssetGUID- unique identifier of the database or database schema of intereststartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of associated metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseViewsByName
public List<DatabaseViewElement> getDatabaseViewsByName(String userId, String name, int startFrom, int pageSize) 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.- Specified by:
getDatabaseViewsByNamein interfaceDatabaseManagerInterface- Parameters:
userId- calling username- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseViewByGUID
public DatabaseViewElement getDatabaseViewByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the database view metadata element with the supplied unique identifier.- Specified by:
getDatabaseViewByGUIDin interfaceDatabaseManagerInterface- Parameters:
userId- calling userguid- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDatabaseColumn
public String createDatabaseColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseTableGUID, DatabaseColumnProperties databaseColumnProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database column.- Specified by:
createDatabaseColumnin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseTableGUID- unique identifier of the database table where this column is locateddatabaseColumnProperties- properties for the new column- Returns:
- unique identifier of the new metadata element for the database column
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a database column using an existing metadata element as a template.- Specified by:
createDatabaseColumnFromTemplatein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMStemplateGUID- unique identifier of the metadata element to copydatabaseTableGUID- unique identifier of the database table where this column is locatedtemplateProperties- properties that override the template- Returns:
- unique identifier of the new metadata element for the database column
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateDatabaseColumn
public void updateDatabaseColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseColumnGUID, DatabaseColumnProperties databaseColumnProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a database column.- Specified by:
updateDatabaseColumnin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseColumnGUID- unique identifier of the metadata element to updatedatabaseColumnProperties- new properties for the metadata element- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a database column.- Specified by:
removeDatabaseColumnin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseColumnGUID- unique identifier of the metadata element to removequalifiedName- unique name of the metadata element to remove- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findDatabaseColumns
public List<DatabaseColumnElement> findDatabaseColumns(String userId, String searchString, int startFrom, int pageSize) 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.- Specified by:
findDatabaseColumnsin interfaceDatabaseManagerInterface- Parameters:
userId- calling usersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getColumnsForDatabaseTable
public List<DatabaseColumnElement> getColumnsForDatabaseTable(String userId, String databaseTableGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of column for a database table (or view)- Specified by:
getColumnsForDatabaseTablein interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseTableGUID- unique identifier of the database table of intereststartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseColumnsByName
public List<DatabaseColumnElement> getDatabaseColumnsByName(String userId, String name, int startFrom, int pageSize) 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.- Specified by:
getDatabaseColumnsByNamein interfaceDatabaseManagerInterface- Parameters:
userId- calling username- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDatabaseColumnByGUID
public DatabaseColumnElement getDatabaseColumnByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the database column metadata element with the supplied unique identifier.- Specified by:
getDatabaseColumnByGUIDin interfaceDatabaseManagerInterface- Parameters:
userId- calling userguid- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setPrimaryKeyOnColumn
public void setPrimaryKeyOnColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseColumnGUID, DatabasePrimaryKeyProperties databasePrimaryKeyProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Classify a column in a database table as the primary key. This means each row has a different value in this column and it can be used to uniquely identify the column.- Specified by:
setPrimaryKeyOnColumnin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseColumnGUID- unique identifier if the primary key columndatabasePrimaryKeyProperties- properties to store- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
removePrimaryKeyFromColumn
public void removePrimaryKeyFromColumn(String userId, String databaseManagerGUID, String databaseManagerName, String databaseColumnGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the classification that this column is a primary key.- Specified by:
removePrimaryKeyFromColumnin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSdatabaseColumnGUID- unique identifier if the primary key column- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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, DatabaseForeignKeyProperties databaseForeignKeyProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a foreign relationship between two columns. One of the columns holds the primary key of the other to form a link.- Specified by:
addForeignKeyRelationshipin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSprimaryKeyColumnGUID- unique identifier of the column containing the primary keyforeignKeyColumnGUID- unique identifier of the column containing the primary key from the other tabledatabaseForeignKeyProperties- properties about the foreign key relationship- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- 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) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the foreign key relationship for the requested columns.- Specified by:
removeForeignKeyRelationshipin interfaceDatabaseManagerInterface- Parameters:
userId- calling userdatabaseManagerGUID- unique identifier of software server capability representing the DBMSdatabaseManagerName- unique name of software server capability representing the DBMSprimaryKeyColumnGUID- unique identifier of the column that is the linked primary keyforeignKeyColumnGUID- unique identifier of the column the contains the primary key from another table- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
-