public class DeleteRelationship extends DeleteInstance
Transaction function for soft-deleting a relationship.
  • Field Details

    • FUNCTION_NAME

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

    • DeleteRelationship

      public DeleteRelationship(Long txId, clojure.lang.PersistentHashMap existing, String userId, String obsoleteRelationshipGUID) throws Exception
      Constructor used to execute the transaction function.
      Parameters:
      txId - the transaction ID of this function invocation
      existing - XTDB document to update
      userId - doing the deletion
      obsoleteRelationshipGUID - of the relationship to delete
      Throws:
      Exception - on any error
  • Method Details

    • transact

      public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship transact(XTDBOMRSRepositoryConnector xtdb, String userId, String relationshipGUID) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Soft-delete the specified relationship by pushing down the transaction.
      Parameters:
      xtdb - connectivity
      userId - doing the deletion
      relationshipGUID - of the relationship to be deleted
      Returns:
      the resulting deleted relationship
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException - if the relationship cannot be found
      org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - if the relationship exists but is already soft-deleted
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - on any other error
    • 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