Class PurgeEntity
- java.lang.Object
-
- org.odpi.egeria.connectors.juxt.xtdb.txnfn.AbstractTransactionFunction
-
- org.odpi.egeria.connectors.juxt.xtdb.txnfn.PurgeEntity
-
public class PurgeEntity extends AbstractTransactionFunction
Transaction function for hard-deleting an entity.
-
-
Field Summary
Fields Modifier and Type Field Description static clojure.lang.KeywordFUNCTION_NAME
-
Constructor Summary
Constructors Constructor Description PurgeEntity(Long txId, clojure.lang.PersistentHashMap existing, String deletedEntityGUID, boolean force)Constructor used to execute the transaction function.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcreate(xtdb.api.tx.Transaction.Builder tx)Create the transaction function within XTDB.clojure.lang.IPersistentMapdoc()Interface that returns the document about to be evicted (purged).static voidtransactWithoutValidation(XtdbOMRSRepositoryConnector xtdb, String entityGUID)Permanently delete the entity (and all of its history) from the XTDB repository by pushing down the transaction.static voidtransactWithValidation(XtdbOMRSRepositoryConnector xtdb, String entityGUID)Permanently delete the entity (and all of its history) from the XTDB repository by pushing down the transaction.-
Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.txnfn.AbstractTransactionFunction
createTransactionFunction, getGUID, getInstanceProvenanceType, getMetadataCollectionId, getTxnTimeCalculation, getTypeDefForInstance, getTypeDefGUID, incrementVersion, incrementVersion
-
-
-
-
Constructor Detail
-
PurgeEntity
public PurgeEntity(Long txId, clojure.lang.PersistentHashMap existing, String deletedEntityGUID, boolean force) throws Exception
Constructor used to execute the transaction function.- Parameters:
txId- the transaction ID of this function invocationexisting- XTDB document to updatedeletedEntityGUID- of the entity to purgeforce- if true do not validate whether the entity is soft-deleted prior to purging it- Throws:
Exception- on any error
-
-
Method Detail
-
transactWithValidation
public static void transactWithValidation(XtdbOMRSRepositoryConnector xtdb, String entityGUID) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotDeletedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Permanently delete the entity (and all of its history) from the XTDB repository by pushing down the transaction. Note that this operation is NOT reversible!- Parameters:
xtdb- connectivityentityGUID- of the entity to permanently delete- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException- if the entity cannot be foundorg.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotDeletedException- if the entity exists but is not in a soft-deleted stateorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- on any other error
-
transactWithoutValidation
public static void transactWithoutValidation(XtdbOMRSRepositoryConnector xtdb, String entityGUID) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Permanently delete the entity (and all of its history) from the XTDB repository by pushing down the transaction. Note that this operation is NOT reversible!- Parameters:
xtdb- connectivityentityGUID- of the entity to permanently delete- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException- if the entity cannot be foundorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- 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
-
-