Class PurgeRelationship

    • Field Detail

      • FUNCTION_NAME

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

      • 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 invocation
        existing - XTDB document to update
        deletedRelationshipGUID - of the relationship to purge
        force - if true, do not validate whether the relationship is already soft-deleted before purging
        Throws:
        Exception - on any error
    • Method Detail

      • transactWithValidation

        public static void transactWithValidation​(XtdbOMRSRepositoryConnector xtdb,
                                                  String relationshipGUID)
                                           throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException,
                                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotDeletedException,
                                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.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 - connectivity
        relationshipGUID - of the relationship to permanently delete
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException - if the relationship cannot be found
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotDeletedException - if the relationship exists but is not in a soft-deleted state
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - on any other error
      • transactWithoutValidation

        public static void transactWithoutValidation​(XtdbOMRSRepositoryConnector xtdb,
                                                     String relationshipGUID)
                                              throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException,
                                                     org.odpi.openmetadata.repositoryservices.ffdc.exception.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 - connectivity
        relationshipGUID - of the relationship to permanently delete
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException - if the relationship cannot be found
        org.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