Class DataEngineRelationalDataHandler
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineRelationalDataHandler
-
public class DataEngineRelationalDataHandler extends Object
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
Constructors Constructor Description 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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidremoveDatabase(String userId, String databaseGUID, String externalSourceName, DeleteSemantic deleteSemantic)Remove the databasevoidremoveDatabaseSchema(String userId, String databaseSchemaGUID, String externalSourceName, DeleteSemantic deleteSemantic)voidremoveRelationalTable(String userId, String relationalTableGUID, String externalSourceName, DeleteSemantic deleteSemantic)Remove the relational tableStringupsertDatabase(String userId, Database database, boolean incomplete, String externalSourceName)Create or update the database and the inside entities, if any (a database schema and relational tables)StringupsertDatabaseSchema(String userId, String databaseGUID, DatabaseSchema databaseSchema, boolean incomplete, String externalSourceName)Create or update the database schemaStringupsertRelationalTable(String userId, String databaseSchemaQualifiedName, RelationalTable relationalTable, String externalSourceName, boolean incomplete)Create or update the relational table
-
-
-
Constructor Detail
-
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 assetsdataEngineCommonHandler- provides utilities for manipulating entitiesregistrationHandler- creates software server capability entitiesdataEngineConnectionAndEndpointHandler- provides utilities specific for manipulating Connections and Endpoints
-
-
Method Detail
-
upsertDatabase
public String upsertDatabase(String userId, Database database, boolean incomplete, 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 sourceincomplete- determines if the entities inside the database are incomplete, if any (database schema and relational tables)- 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, boolean incomplete, 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- 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, boolean incomplete) 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 relationa 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
-
-