Class RunSQLScript

  • All Implemented Interfaces:
    DBHostable, Referenceable

    public final class RunSQLScript
    extends Action
    implements DBHostable
    Runs an SQL script on a database server.

    The RunSQLScript action allows you to specify separate SQL scripts (Install Script and Uninstall Script) to run during installation and uninstallation. You can specify an Install Script, an Uninstall Script, or both.

    The action parses the SQL scripts using the specified delimiters and then sends each statement to the database driver for execution.

    The action can only be added to a DBHost.
    • Constructor Detail

      • RunSQLScript

        public RunSQLScript()
    • Method Detail

      • getInstallScriptDelimiter

        public java.lang.String getInstallScriptDelimiter()
        The string that separates SQL statements in the uninstall script.
      • setInstallScriptDelimiter

        public void setInstallScriptDelimiter​(java.lang.String delimiter)
        The string that separates SQL statements in the install script. The action parses the SQL script and then sends each statement to the database driver for execution. The default delimiter is a semicolon.
      • getUninstallScriptDelimiter

        public java.lang.String getUninstallScriptDelimiter()
        The string that separates SQL statements in the uninstall script.
      • setUninstallScriptDelimiter

        public void setUninstallScriptDelimiter​(java.lang.String uninstallScriptDelimiter)
        The string that separates SQL statements in the uninstall script. The action parses the SQL script and then sends each statement to the database driver for execution. The default delimiter is a semicolon.
      • getInstallScriptExistingFile

        public java.lang.String getInstallScriptExistingFile()
        The path to the existing SQL script to execute at install time.
      • setInstallScriptExistingFile

        public void setInstallScriptExistingFile​(java.lang.String existingFile)
        The path to the SQL script to execute at install time. The file should already exist in the end user's machine.
      • getInstallScriptType

        public FileType getInstallScriptType()
        Returns whether the install SQL script should be bundled in to installer or already exists on the end user's machine.
      • setInstallScriptType

        public void setInstallScriptType​(FileType installScriptType)
        Defines whether the install SQL script should be bundled in to installer or already exists on the end user's machine.
      • getUninstallScriptExistingFile

        public java.lang.String getUninstallScriptExistingFile()
        The path to the existing SQL script to execute at uninstall time.
      • setUninstallScriptExistingFile

        public void setUninstallScriptExistingFile​(java.lang.String uninstallScriptExistingFilePath)
        The path to the SQL script to execute at uninstall time. The file should already exist in the end user's machine.
      • getUninstallScriptType

        public FileType getUninstallScriptType()
        Returns whether the uninstall SQL script should be bundled in to installer or already exists on the end user's machine.
      • setUninstallScriptType

        public void setUninstallScriptType​(FileType uninstallScriptType)
        Defines whether the uninstall SQL script should be bundled in to installer or already exists on the end user's machine.
      • getCustomConnectionString

        public java.lang.String getCustomConnectionString()
        The custom connection string to use when the serverType is GENERIC_JDBC.
        See Also:
        #getServerType
      • setCustomConnectionString

        public void setCustomConnectionString​(java.lang.String customConnectionString)
        The custom connection string to use when the serverType is GENERIC_JDBC.
        See Also:
        #setServerType
      • setPort

        public void setPort​(java.lang.String serverPort)
        The port number on which the database server should operate.
      • getDatabaseNameOrSIDName

        public java.lang.String getDatabaseNameOrSIDName()
        The name of the database/sid with which the installer should interact.
      • getPort

        public java.lang.String getPort()
        The port number on which the database server should operate
      • setDatabaseNameOrSIDName

        public void setDatabaseNameOrSIDName​(java.lang.String databaseName)
        The name of the database/SID with which the installer should interact.
      • getServerPath

        public java.lang.String getServerPath()
        The name of the database with which the installer should interact.
      • setServerPath

        public void setServerPath​(java.lang.String serverPath)
        The name of the database with which the installer should interact.
      • getUsername

        public java.lang.String getUsername()
        The username to autenticate to the server.
      • setUsername

        public void setUsername​(java.lang.String username)
        The username to autenticate to the server.
      • getPassword

        public java.lang.String getPassword()
        The password to autenticate to the server.
      • setPassword

        public void setPassword​(java.lang.String password)
        The password to autenticate to the server.
      • isCreateDatabase

        public boolean isCreateDatabase()
        gets the status whether to create a database
        Returns:
        the createDatabase
      • setCreateDatabase

        public void setCreateDatabase​(boolean createDatabase)
        Set true to create a database , defaults to false
        Parameters:
        createDatabase - the createDatabase to set