Class ReLinkRelationship


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

      • FUNCTION_NAME

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

      • 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 Detail

      • 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