Class ReHomeInstance
java.lang.Object
org.odpi.egeria.connectors.juxt.xtdb.txnfn.AbstractTransactionFunction
org.odpi.egeria.connectors.juxt.xtdb.txnfn.ReHomeInstance
- Direct Known Subclasses:
ReHomeEntity,ReHomeRelationship
Base transaction function for updating an instance's home metadata repository.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static clojure.lang.IPersistentMapreHomeInstance(String userId, clojure.lang.IPersistentMap existing, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Makes the necessary changes to update a metadata instance's home metadata repository.protected static voidvalidate(clojure.lang.IPersistentMap existing, String metadataCollectionId, String className, String methodName) Validate the re-home.Methods inherited from class org.odpi.egeria.connectors.juxt.xtdb.txnfn.AbstractTransactionFunction
createTransactionFunction, getGUID, getInstanceProvenanceType, getMetadataCollectionId, getTxnTimeCalculation, getTypeDefForInstance, getTypeDefGUID, incrementVersion, incrementVersion
-
Constructor Details
-
ReHomeInstance
public ReHomeInstance()
-
-
Method Details
-
reHomeInstance
protected static clojure.lang.IPersistentMap reHomeInstance(String userId, clojure.lang.IPersistentMap existing, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Makes the necessary changes to update a metadata instance's home metadata repository.- Parameters:
userId- doing the updateexisting- metadata instancenewHomeMetadataCollectionId- unique identifier of the instance's new homenewHomeMetadataCollectionName- name of the instance's new home- Returns:
- IPersistentMap giving the updated instance representation
-
validate
protected static void validate(clojure.lang.IPersistentMap existing, String metadataCollectionId, String className, String methodName) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException Validate the re-home. The instance must originate in the liocal cohort and NOT be locally homed already, or the entity must have an instanceProvenanceType set to external and a replicatedBy that is NOT the local metadataCollectionId. Any other combination indicates a non-reference copy, and therefore cannot be re-homed.- Parameters:
existing- metadata instancemetadataCollectionId- of the metadata instanceclassName- calling classmethodName- calling method- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException- if the instance cannot be re-homed
-