Class GetRelationshipExecutor
java.lang.Object
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.GetRelationshipExecutor
- All Implemented Interfaces:
RepositoryExecutor
GetRelationshipExecutor provides the executor for the isRelationshipKnown and getRelationship methods.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
methodName, userId
-
Constructor Summary
ConstructorDescriptionGetRelationshipExecutor
(String userId, String relationshipGUID, Date asOfTime, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.GetRelationshipExecutor
(String userId, String relationshipGUID, AuditLog auditLog, String methodName) Constructor takes the parameters for the request. -
Method Summary
Modifier and TypeMethodDescriptionReturn a requested relationship.Return a historical version of a relationship.Returns a boolean indicating if the relationship is stored in the metadata collection.boolean
issueRequestToRepository
(String metadataCollectionId, OMRSMetadataCollection metadataCollection) Perform the required action for the supplied repository.Methods inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutorBase
getMethodName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.executors.RepositoryExecutor
augmentResultFromRepository, getResultsForAugmentation
-
Constructor Details
-
GetRelationshipExecutor
public GetRelationshipExecutor(String userId, String relationshipGUID, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.- Parameters:
userId
- unique identifier for requesting userrelationshipGUID
- unique identifier (guid) for the relationshipauditLog
- logging destinationmethodName
- calling method
-
GetRelationshipExecutor
public GetRelationshipExecutor(String userId, String relationshipGUID, Date asOfTime, AuditLog auditLog, String methodName) Constructor takes the parameters for the request.- Parameters:
userId
- unique identifier for requesting user.relationshipGUID
- unique identifier (guid) for the new entity's type.asOfTime
- is this a historical query.auditLog
- logging destinationmethodName
- calling method
-
-
Method Details
-
issueRequestToRepository
public boolean issueRequestToRepository(String metadataCollectionId, OMRSMetadataCollection metadataCollection) Perform the required action for the supplied repository. Create requests occur in the first repository that accepts the call. Some repositories may produce exceptions. These exceptions are saved and will be returned if there are no positive results from any repository.- Specified by:
issueRequestToRepository
in interfaceRepositoryExecutor
- Specified by:
issueRequestToRepository
in classRepositoryExecutorBase
- Parameters:
metadataCollectionId
- unique identifier for the metadata collection for the repositorymetadataCollection
- metadata collection object for the repository- Returns:
- boolean true means that the required results have been achieved
-
isRelationshipKnown
public Relationship isRelationshipKnown() throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedExceptionReturns a boolean indicating if the relationship is stored in the metadata collection.- Returns:
- relationship details if the relationship is found in the metadata collection; otherwise return null
- Throws:
InvalidParameterException
- the guid is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
getRelationship
public Relationship getRelationship() throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, UserNotAuthorizedExceptionReturn a requested relationship.- Returns:
- a relationship structure.
- Throws:
InvalidParameterException
- the guid is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the metadata collection does not have a relationship with the requested GUID stored.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
getRelationshipHistory
public Relationship getRelationshipHistory() throws InvalidParameterException, RepositoryErrorException, RelationshipNotKnownException, FunctionNotSupportedException, UserNotAuthorizedExceptionReturn a historical version of a relationship.- Returns:
- Relationship structure.
- Throws:
InvalidParameterException
- the guid or date is null or the date is for a future time.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.RelationshipNotKnownException
- the requested entity instance is not known in the metadata collection at the time requested.FunctionNotSupportedException
- the repository does not support the asOfTime parameter.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-