Class DataEngineRelationalDataHandler
java.lang.Object
org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRelationalDataHandler
DataEngineRelationalDataHandler manages Databases and RelationalTables objects from the property server. It runs server-side in the DataEngine
OMAS and creates entities and relationships through the OMRSRepositoryConnector.
-
Constructor Summary
ConstructorsConstructorDescriptionDataEngineRelationalDataHandler
(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RelationalDataHandler<Database, DatabaseSchema, RelationalTable, RelationalTable, RelationalColumn, SchemaType> relationalDataHandler, AssetHandler<DatabaseSchema> databaseSchemaAssetHandler, DataEngineRegistrationHandler registrationHandler, DataEngineCommonHandler dataEngineCommonHandler, DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler) Construct the handler information needed to interact with the repository services -
Method Summary
Modifier and TypeMethodDescriptionvoid
removeDatabase
(String userId, String databaseGUID, String externalSourceName, DeleteSemantic deleteSemantic) Remove the databasevoid
removeDatabaseSchema
(String userId, String databaseSchemaGUID, String externalSourceName, DeleteSemantic deleteSemantic) Removes the database schemavoid
removeRelationalTable
(String userId, String relationalTableGUID, String externalSourceName, DeleteSemantic deleteSemantic) Remove the relational tableupsertDatabase
(String userId, Database database, String externalSourceName) Create or update the database and the inside entities, if any (a database schema and relational tables)upsertDatabaseSchema
(String userId, String databaseGUID, DatabaseSchema databaseSchema, String externalSourceName) Create or update the database schemaupsertRelationalTable
(String userId, String databaseSchemaQualifiedName, RelationalTable relationalTable, String externalSourceName) Create or update the relational table
-
Constructor Details
-
DataEngineRelationalDataHandler
public DataEngineRelationalDataHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RelationalDataHandler<Database, DatabaseSchema, RelationalTable, RelationalTable, RelationalColumn, SchemaType> relationalDataHandler, AssetHandler<DatabaseSchema> databaseSchemaAssetHandler, DataEngineRegistrationHandler registrationHandler, DataEngineCommonHandler dataEngineCommonHandler, DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler) Construct the handler information needed to interact with the repository services- Parameters:
serviceName
- name of this serviceserverName
- name of the local serverinvalidParameterHandler
- handler for managing parameter errorsrelationalDataHandler
- provides utilities for manipulating the repository services assetsdatabaseSchemaAssetHandler
- provides utilities for manipulating database schema assetsdataEngineCommonHandler
- provides utilities for manipulating entitiesregistrationHandler
- creates engine entitiesdataEngineConnectionAndEndpointHandler
- provides utilities specific for manipulating Connections and Endpoints
-
-
Method Details
-
upsertDatabase
public String upsertDatabase(String userId, Database database, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the database and the inside entities, if any (a database schema and relational tables)- Parameters:
userId
- the name of the calling userdatabase
- the values of the databaseexternalSourceName
- the unique name of the external source- Returns:
- unique identifier of the database in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertDatabaseSchema
public String upsertDatabaseSchema(String userId, String databaseGUID, DatabaseSchema databaseSchema, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create or update the database schema- Parameters:
userId
- the name of the calling userdatabaseGUID
- the unique identifier of the databasedatabaseSchema
- the values of the database schemaexternalSourceName
- the unique name of the external source- Returns:
- database schema GUID
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertRelationalTable
public String upsertRelationalTable(String userId, String databaseSchemaQualifiedName, RelationalTable relationalTable, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create or update the relational table- Parameters:
userId
- the name of the calling userdatabaseSchemaQualifiedName
- the database qualified namerelationalTable
- the values of the relational tableexternalSourceName
- the unique name of the external source- Returns:
- unique identifier of the relational table in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
removeDatabase
public void removeDatabase(String userId, String databaseGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws FunctionNotSupportedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove the database- Parameters:
userId
- the name of the calling userdatabaseGUID
- unique identifier of the database to be removedexternalSourceName
- the external data engine namedeleteSemantic
- the delete semantic- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property serverFunctionNotSupportedException
- the repository does not support this call.
-
removeRelationalTable
public void removeRelationalTable(String userId, String relationalTableGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws FunctionNotSupportedException, InvalidParameterException, PropertyServerException, UserNotAuthorizedException Remove the relational table- Parameters:
userId
- the name of the calling userrelationalTableGUID
- unique identifier of the relational table to be removedexternalSourceName
- the external data engine namedeleteSemantic
- the delete semantic- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property serverFunctionNotSupportedException
- the repository does not support this call.
-
removeDatabaseSchema
public void removeDatabaseSchema(String userId, String databaseSchemaGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException Removes the database schema- Parameters:
userId
- the name of the calling userdatabaseSchemaGUID
- unique identifier of the database schema to be removedexternalSourceName
- the external data engine namedeleteSemantic
- the delete semantic- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property serverFunctionNotSupportedException
- the repository does not support this call.
-