Class DeleteRelationship
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.DeleteInstance
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.DeleteRelationship
Transaction function for soft-deleting a relationship.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDeleteRelationship
(Long txId, clojure.lang.PersistentHashMap existing, String userId, String obsoleteRelationshipGUID) Constructor used to execute the transaction function. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
create
(xtdb.api.tx.Transaction.Builder tx) Create the transaction function within XTDB.clojure.lang.IPersistentMap
doc()
Interface that returns the updated document to write-back from the transaction.static Relationship
transact
(XTDBOMRSRepositoryConnector xtdb, String userId, String relationshipGUID) Soft-delete the specified relationship by pushing down the transaction.Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.DeleteInstance
deleteInstance
Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
createTransactionFunction, getGUID, getInstanceProvenanceType, getMetadataCollectionId, getTxnTimeCalculation, getTypeDefForInstance, getTypeDefGUID, incrementVersion, incrementVersion
-
Field Details
-
FUNCTION_NAME
public static final clojure.lang.Keyword FUNCTION_NAME
-
-
Constructor Details
-
DeleteRelationship
public DeleteRelationship(Long txId, clojure.lang.PersistentHashMap existing, String userId, String obsoleteRelationshipGUID) throws Exception Constructor used to execute the transaction function.- Parameters:
txId
- the transaction ID of this function invocationexisting
- XTDB document to updateuserId
- doing the deletionobsoleteRelationshipGUID
- of the relationship to delete- Throws:
Exception
- on any error
-
-
Method Details
-
transact
public static Relationship transact(XTDBOMRSRepositoryConnector xtdb, String userId, String relationshipGUID) throws RelationshipNotKnownException, InvalidParameterException, RepositoryErrorException Soft-delete the specified relationship by pushing down the transaction.- Parameters:
xtdb
- connectivityuserId
- doing the deletionrelationshipGUID
- of the relationship to be deleted- Returns:
- the resulting deleted relationship
- Throws:
RelationshipNotKnownException
- if the relationship cannot be foundInvalidParameterException
- if the relationship exists but is already soft-deletedRepositoryErrorException
- on any other error
-
doc
public clojure.lang.IPersistentMap doc()Interface that returns the updated document to write-back from the transaction.- Returns:
- IPersistentMap giving the updated document in its entirety
-
create
public static void create(xtdb.api.tx.Transaction.Builder tx) Create the transaction function within XTDB.- Parameters:
tx
- transaction through which to create the function
-