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

public abstract class UpdateInstanceProperties extends AbstractTransactionFunction
Base transaction function for updating an instance's properties.
  • 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 update
      existing - metadata instance
      properties - full set of properties for the instance
      Returns:
      IPersistentMap giving the updated instance representation
      Throws:
      InvalidParameterException - if any of the properties cannot be persisted
      IOException - on any error serializing the properties
      ClassificationErrorException - 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 update
      existing - metadata instance
      properties - full set of properties for the instance
      classificationName - 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 persisted
      IOException - on any error serializing the properties
      ClassificationErrorException - 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 instance
      instanceGUID - unique identifier of the metadata instance
      metadataCollectionId - of the metadata instance
      properties - new properties for the metadata instance
      className - calling class
      methodName - calling method
      Throws:
      InvalidParameterException - on any null or invalid parameters
      IOException - on any error deserializing values
      PropertyErrorException - one or more of the requested properties are not defined, or have different characteristics in the TypeDef for this instance's type
      RepositoryErrorException - on any other error