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

public class AddRelationship extends AbstractTransactionFunction
Transaction function for adding a Relationship.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final clojure.lang.Keyword
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AddRelationship(Long txId, String entityOneGUID, String entityTwoGUID, clojure.lang.PersistentHashMap proxy1, clojure.lang.PersistentHashMap proxy2, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
    Constructor used to execute the transaction function.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    create(xtdb.api.tx.Transaction.Builder tx)
    Create the transaction function within XTDB.
    clojure.lang.IPersistentMap
    doc()
    Interface that returns the updated document to write-back from the transaction.
    static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship
    transact(XTDBOMRSRepositoryConnector xtdb, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship, String entityOneGUID, String entityTwoGUID)
    Create the provided entity instance in the XTDB repository by pushing down the transaction.

    Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction

    getGUID, getInstanceProvenanceType, getMetadataCollectionId, getTypeDefForInstance, getTypeDefGUID

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FUNCTION_NAME

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

    • AddRelationship

      public AddRelationship(Long txId, String entityOneGUID, String entityTwoGUID, clojure.lang.PersistentHashMap proxy1, clojure.lang.PersistentHashMap proxy2, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship) throws Exception
      Constructor used to execute the transaction function.
      Parameters:
      txId - the transaction ID of this function invocation
      entityOneGUID - the unique identifier of the first endpoint of the relationship
      entityTwoGUID - the unique identifier of the second endpoint of the relationship
      proxy1 - XTDB document representing the EntityProxy at endpoint 1 of the relationship
      proxy2 - XTDB document representing the EntityProxy at endpoint 2 of the relationship
      relationship - the relationship to create
      Throws:
      Exception - on any error
  • Method Details

    • transact

      public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship transact(XTDBOMRSRepositoryConnector xtdb, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship, String entityOneGUID, String entityTwoGUID) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
      Create the provided entity instance in the XTDB repository by pushing down the transaction.
      Parameters:
      xtdb - connectivity
      relationship - to create
      entityOneGUID - unique identifier of the first endpoint's proxy
      entityTwoGUID - unique identifier of the second endpoint's proxy
      Returns:
      Relationship as it was created
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException - one of the requested entity proxy's is not known
      org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - one of the parameters is invalid or null
      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