Class ConnectionDetailsUtils

java.lang.Object
org.pentaho.di.connections.utils.ConnectionDetailsUtils

public class ConnectionDetailsUtils extends Object
  • Method Details

    • cloneMeta

      public static <T extends ConnectionDetails> T cloneMeta(T instance) throws org.pentaho.metastore.api.exceptions.MetaStoreException
      Clones a given connection details instance.

      Cloning is done by according to the meta store metadata from present meta store annotations in the connection details type. Essentially, behaving as a save followed by a load from an in-memory meta-store. As such any information not stored in the meta store is not preserved in the cloned instance.

      The given connection details must have a name set or the operation fails.

      Parameters:
      instance - The connection details instance to clone.
      Returns:
      The cloned connection details.
      Throws:
      org.pentaho.metastore.api.exceptions.MetaStoreException