Class ReTypeInstance
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.ReTypeInstance
- Direct Known Subclasses:
ReTypeEntity
,ReTypeRelationship
Base transaction function for changing an instance's type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static clojure.lang.IPersistentMap
reTypeInstance
(String userId, clojure.lang.IPersistentMap existing, TypeDef newTypeDef) Makes the necessary changes to an instance's type.protected static void
validate
(clojure.lang.IPersistentMap existing, String instanceGUID, TypeDef newTypeDef, String metadataCollectionId, String className, String methodName) Validate the type change.Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
createTransactionFunction, getGUID, getInstanceProvenanceType, getMetadataCollectionId, getTxnTimeCalculation, getTypeDefForInstance, getTypeDefGUID, incrementVersion, incrementVersion
-
Constructor Details
-
ReTypeInstance
public ReTypeInstance()
-
-
Method Details
-
reTypeInstance
protected static clojure.lang.IPersistentMap reTypeInstance(String userId, clojure.lang.IPersistentMap existing, TypeDef newTypeDef) throws TypeErrorException, IOException Makes the necessary changes to an instance's type.- Parameters:
userId
- doing the updateexisting
- metadata instancenewTypeDef
- new type for the instance- Returns:
- IPersistentMap giving the updated instance representation
- Throws:
TypeErrorException
- the requested type is not known or supported by the repositoryIOException
- on any error serializing values
-
validate
protected static void validate(clojure.lang.IPersistentMap existing, String instanceGUID, TypeDef newTypeDef, String metadataCollectionId, String className, String methodName) throws InvalidParameterException, RepositoryErrorException, IOException, PropertyErrorException Validate the type change.- Parameters:
existing
- metadata instanceinstanceGUID
- unique identifier of the metadata instancenewTypeDef
- new type for the instancemetadataCollectionId
- of the metadata instanceclassName
- calling classmethodName
- calling method- Throws:
InvalidParameterException
- on any null or invalid parametersIOException
- on any error deserializing valuesPropertyErrorException
- the properties in the instance are incompatible with the requested typeRepositoryErrorException
- on any other error
-