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

public class ReLinkRelationship extends AbstractTransactionFunction
Transaction function for re-linking a relationship when one of its entity proxy's identities has changed.
  • Field Details

    • FUNCTION_NAME

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

    • ReLinkRelationship

      public ReLinkRelationship(Long txId, clojure.lang.PersistentHashMap existing, String relationshipGUID, String oldEntityGUID, String newEntityGUID) throws Exception
      Constructor used to execute the transaction function.
      Parameters:
      txId - the transaction ID of this function invocation
      existing - XTDB document to update
      relationshipGUID - unique identifier of the relationship
      oldEntityGUID - unique identifier of the entity that is being changed
      newEntityGUID - new unique identifier for that same entity
      Throws:
      Exception - on any error
  • Method Details

    • 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