java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.PurgeEntity

public class PurgeEntity extends AbstractTransactionFunction
Transaction function for hard-deleting an entity.
  • Field Details

    • FUNCTION_NAME

      public static final clojure.lang.Keyword FUNCTION_NAME
  • Constructor Details

    • 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 invocation
      existing - XTDB document to update
      deletedEntityGUID - of the entity to purge
      force - if true do not validate whether the entity is soft-deleted prior to purging it
      Throws:
      Exception - on any error
  • Method Details

    • transactWithValidation

      public static void transactWithValidation(XTDBOMRSRepositoryConnector xtdb, String entityGUID) throws EntityNotKnownException, EntityNotDeletedException, 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 - connectivity
      entityGUID - of the entity to permanently delete
      Throws:
      EntityNotKnownException - if the entity cannot be found
      EntityNotDeletedException - if the entity exists but is not in a soft-deleted state
      RepositoryErrorException - on any other error
    • transactWithoutValidation

      public static void transactWithoutValidation(XTDBOMRSRepositoryConnector xtdb, String entityGUID) throws EntityNotKnownException, 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 - connectivity
      entityGUID - of the entity to permanently delete
      Throws:
      EntityNotKnownException - if the entity cannot be found
      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