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
public abstract class ReHomeInstance extends AbstractTransactionFunction
Base transaction function for updating an instance's home metadata repository.
-
-
Constructor Summary
Constructors Constructor Description ReHomeInstance()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected 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
-
-
-
-
Method Detail
-
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.InvalidParameterExceptionValidate 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
-
-