Class UpdateInstanceProperties
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.UpdateInstanceProperties
- Direct Known Subclasses:
UpdateEntityClassification
,UpdateEntityProperties
,UpdateRelationshipProperties
Base transaction function for updating an instance's properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static clojure.lang.IPersistentMap
updateInstanceProperties
(String userId, clojure.lang.IPersistentMap existing, InstanceProperties properties) Makes the necessary changes to update a metadata instance's properties.protected static clojure.lang.IPersistentMap
updateInstanceProperties
(String userId, clojure.lang.IPersistentMap existing, InstanceProperties properties, String classificationName) Makes the necessary changes to update a metadata instance's properties, or the classification's properties if a classification name is provided.protected static void
validate
(clojure.lang.IPersistentMap existing, String instanceGUID, String metadataCollectionId, InstanceProperties properties, String className, String methodName) Validate the properties to be changed.Methods inherited from class org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.txnfn.AbstractTransactionFunction
createTransactionFunction, getGUID, getInstanceProvenanceType, getMetadataCollectionId, getTxnTimeCalculation, getTypeDefForInstance, getTypeDefGUID, incrementVersion, incrementVersion
-
Constructor Details
-
UpdateInstanceProperties
public UpdateInstanceProperties()
-
-
Method Details
-
updateInstanceProperties
protected static clojure.lang.IPersistentMap updateInstanceProperties(String userId, clojure.lang.IPersistentMap existing, InstanceProperties properties) throws InvalidParameterException, IOException, ClassificationErrorException Makes the necessary changes to update a metadata instance's properties.- Parameters:
userId
- doing the updateexisting
- metadata instanceproperties
- full set of properties for the instance- Returns:
- IPersistentMap giving the updated instance representation
- Throws:
InvalidParameterException
- if any of the properties cannot be persistedIOException
- on any error serializing the propertiesClassificationErrorException
- if the requested classification cannot be found
-
updateInstanceProperties
protected static clojure.lang.IPersistentMap updateInstanceProperties(String userId, clojure.lang.IPersistentMap existing, InstanceProperties properties, String classificationName) throws InvalidParameterException, IOException, ClassificationErrorException Makes the necessary changes to update a metadata instance's properties, or the classification's properties if a classification name is provided.- Parameters:
userId
- doing the updateexisting
- metadata instanceproperties
- full set of properties for the instanceclassificationName
- of the classification whose properties should be updated (or null to update base instance's properties)- Returns:
- IPersistentMap giving the updated instance representation
- Throws:
InvalidParameterException
- if any of the properties cannot be persistedIOException
- on any error serializing the propertiesClassificationErrorException
- if the requested classification cannot be found
-
validate
protected static void validate(clojure.lang.IPersistentMap existing, String instanceGUID, String metadataCollectionId, InstanceProperties properties, String className, String methodName) throws InvalidParameterException, RepositoryErrorException, IOException, PropertyErrorException Validate the properties to be changed.- Parameters:
existing
- metadata instanceinstanceGUID
- unique identifier of the metadata instancemetadataCollectionId
- of the metadata instanceproperties
- new properties for the metadata instanceclassName
- calling classmethodName
- calling method- Throws:
InvalidParameterException
- on any null or invalid parametersIOException
- on any error deserializing valuesPropertyErrorException
- one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this instance's typeRepositoryErrorException
- on any other error
-