Class SaveRelationshipReferenceCopy


  • public class SaveRelationshipReferenceCopy
    extends AbstractTransactionFunction
    Transaction function for adding a reference copy relationship.
    • Field Detail

      • FUNCTION_NAME

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

      • SaveRelationshipReferenceCopy

        public SaveRelationshipReferenceCopy​(Long txId,
                                             clojure.lang.PersistentHashMap existing,
                                             clojure.lang.PersistentHashMap updated,
                                             String homeMetadataCollectionId)
                                      throws Exception
        Constructor used to execute the transaction function.
        Parameters:
        txId - the transaction ID of this function invocation
        existing - the existing relationship in XT, if any
        updated - the updated relationship to replace the existing one with
        homeMetadataCollectionId - the metadataCollectionId of the repository where the transaction is running
        Throws:
        Exception - on any error
    • Method Detail

      • transact

        public static void transact​(XtdbOMRSRepositoryConnector xtdb,
                                    org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship toSave)
                             throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipConflictException,
                                    org.odpi.openmetadata.repositoryservices.ffdc.exception.HomeRelationshipException,
                                    org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                    org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
        Create the provided relationship instance in the XTDB repository by pushing down the transaction.
        Parameters:
        xtdb - connectivity
        toSave - the relationship reference copy to persist
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipConflictException - the new relationship conflicts with an existing relationship
        org.odpi.openmetadata.repositoryservices.ffdc.exception.HomeRelationshipException - if the relationship belongs to the local repository so cannot be a reference copy
        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