Class SaveEntityReferenceCopy
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.SaveEntityReferenceCopy
Transaction function for adding a reference copy entity.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSaveEntityReferenceCopy(Long txId, clojure.lang.PersistentHashMap existing, clojure.lang.PersistentHashMap updated, String homeMetadataCollectionId) Constructor used to execute the transaction function. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreate(xtdb.api.tx.Transaction.Builder tx) Create the transaction function within XTDB.clojure.lang.IPersistentMapdoc()Interface that returns the updated document to write-back from the transaction.static voidtransact(XTDBOMRSRepositoryConnector xtdb, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail toSave) 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
-
Field Details
-
FUNCTION_NAME
public static final clojure.lang.Keyword FUNCTION_NAME
-
-
Constructor Details
-
SaveEntityReferenceCopy
public SaveEntityReferenceCopy(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 invocationexisting- the existing entity in XT, if anyupdated- the updated entity to replace the existing one withhomeMetadataCollectionId- the metadataCollectionId of the repository where the transaction is running- Throws:
Exception- on any error
-
-
Method Details
-
transact
public static void transact(XTDBOMRSRepositoryConnector xtdb, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail toSave) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityConflictException, org.odpi.openmetadata.repositoryservices.ffdc.exception.HomeEntityException, 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- connectivitytoSave- the entity reference copy to persist- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityConflictException- the new entity conflicts with an existing entityorg.odpi.openmetadata.repositoryservices.ffdc.exception.HomeEntityException- if the entity belongs to the local repository so cannot be a reference copyorg.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException- one of the parameters is invalid or nullorg.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
-