Class PurgeRelationship
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.PurgeRelationship
Transaction function for hard-deleting a relationship.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPurgeRelationship
(Long txId, clojure.lang.PersistentHashMap existing, String deletedRelationshipGUID, boolean force) 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 document about to be evicted (purged).static void
transactWithoutValidation
(XTDBOMRSRepositoryConnector xtdb, String relationshipGUID) Permanently delete the relationship (and all of its history) from the XTDB repository by pushing down the transaction.static void
transactWithValidation
(XTDBOMRSRepositoryConnector xtdb, String relationshipGUID) Permanently delete the relationship (and all of its history) from the XTDB repository by pushing down the transaction.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
-
PurgeRelationship
public PurgeRelationship(Long txId, clojure.lang.PersistentHashMap existing, String deletedRelationshipGUID, boolean force) throws Exception Constructor used to execute the transaction function.- Parameters:
txId
- the transaction ID of this function invocationexisting
- XTDB document to updatedeletedRelationshipGUID
- of the relationship to purgeforce
- if true, do not validate whether the relationship is already soft-deleted before purging- Throws:
Exception
- on any error
-
-
Method Details
-
transactWithValidation
public static void transactWithValidation(XTDBOMRSRepositoryConnector xtdb, String relationshipGUID) throws RelationshipNotKnownException, RelationshipNotDeletedException, RepositoryErrorException Permanently delete the relationship (and all of its history) from the XTDB repository by pushing down the transaction. Note that this operation is NOT reversible!- Parameters:
xtdb
- connectivityrelationshipGUID
- of the relationship to permanently delete- Throws:
RelationshipNotKnownException
- if the relationship cannot be foundRelationshipNotDeletedException
- if the relationship exists but is not in a soft-deleted stateRepositoryErrorException
- on any other error
-
transactWithoutValidation
public static void transactWithoutValidation(XTDBOMRSRepositoryConnector xtdb, String relationshipGUID) throws RelationshipNotKnownException, RepositoryErrorException Permanently delete the relationship (and all of its history) from the XTDB repository by pushing down the transaction. Note that this operation is NOT reversible!- Parameters:
xtdb
- connectivityrelationshipGUID
- of the relationship to permanently delete- Throws:
RelationshipNotKnownException
- if the relationship cannot be foundRepositoryErrorException
- on any other error
-
doc
public clojure.lang.IPersistentMap doc()Interface that returns the document about to be evicted (purged).- Returns:
- IPersistentMap giving the purged 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 whic to create the function
-