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

public abstract class ReTypeInstance extends AbstractTransactionFunction
Base transaction function for changing an instance's type.
  • 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 update
      existing - metadata instance
      newTypeDef - new type for the instance
      Returns:
      IPersistentMap giving the updated instance representation
      Throws:
      TypeErrorException - the requested type is not known or supported by the repository
      IOException - 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 instance
      instanceGUID - unique identifier of the metadata instance
      newTypeDef - new type for the instance
      metadataCollectionId - of the metadata instance
      className - calling class
      methodName - calling method
      Throws:
      InvalidParameterException - on any null or invalid parameters
      IOException - on any error deserializing values
      PropertyErrorException - the properties in the instance are incompatible with the requested type
      RepositoryErrorException - on any other error