Class RunSQLScript
- java.lang.Object
-
- com.zerog.ia.auto.project.ProjectObject
-
- com.zerog.ia.auto.project.InstallableObject
-
- com.zerog.ia.auto.project.actions.Action
-
- com.zerog.ia.auto.project.actions.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 aDBHost
.
-
-
Constructor Summary
Constructors Constructor Description RunSQLScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCustomConnectionString()
The custom connection string to use when the serverType is GENERIC_JDBC.java.lang.String
getDatabaseNameOrSIDName()
The name of the database/sid with which the installer should interact.java.lang.String
getInstallScriptDelimiter()
The string that separates SQL statements in the uninstall script.java.lang.String
getInstallScriptExistingFile()
The path to the existing SQL script to execute at install time.java.lang.String
getInstallScriptInstalledFile()
The path to the SQL script to bundle in to the installer and execute at install time.FileType
getInstallScriptType()
Returns whether the install SQL script should be bundled in to installer or already exists on the end user's machine.java.lang.String
getPassword()
The password to autenticate to the server.java.lang.String
getPort()
The port number on which the database server should operatejava.lang.String
getServerPath()
The name of the database with which the installer should interact.java.lang.String
getUninstallScriptDelimiter()
The string that separates SQL statements in the uninstall script.java.lang.String
getUninstallScriptExistingFile()
The path to the existing SQL script to execute at uninstall time.java.lang.String
getUninstallScriptInstalledFile()
The path to the SQL script to bundle in to the installer and execute at uninstall time.FileType
getUninstallScriptType()
Returns whether the uninstall SQL script should be bundled in to installer or already exists on the end user's machine.java.lang.String
getUsername()
The username to autenticate to the server.boolean
isCreateDatabase()
gets the status whether to create a databasevoid
setCreateDatabase(boolean createDatabase)
Set true to create a database , defaults to falsevoid
setCustomConnectionString(java.lang.String customConnectionString)
The custom connection string to use when the serverType is GENERIC_JDBC.void
setDatabaseNameOrSIDName(java.lang.String databaseName)
The name of the database/SID with which the installer should interact.void
setInstallScriptDelimiter(java.lang.String delimiter)
The string that separates SQL statements in the install script.void
setInstallScriptExistingFile(java.lang.String existingFile)
The path to the SQL script to execute at install time.void
setInstallScriptInstalledFile(java.lang.String path)
The path to the SQL script to bundle in to the installer and execute at install time.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.void
setPassword(java.lang.String password)
The password to autenticate to the server.void
setPort(java.lang.String serverPort)
The port number on which the database server should operate.void
setServerPath(java.lang.String serverPath)
The name of the database with which the installer should interact.void
setUninstallScriptDelimiter(java.lang.String uninstallScriptDelimiter)
The string that separates SQL statements in the uninstall script.void
setUninstallScriptExistingFile(java.lang.String uninstallScriptExistingFilePath)
The path to the SQL script to execute at uninstall time.void
setUninstallScriptInstalledFile(java.lang.String path)
The path to the SQL script to bundle in to the installer and execute at uninstall time.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.void
setUsername(java.lang.String username)
The username to autenticate to the server.-
Methods inherited from class com.zerog.ia.auto.project.InstallableObject
getBelongsToUninstallPhase, getRollbackEnabledCancel, getRollbackEnabledError, getRuleExpression, getRules, getRulesLogicalOperation, getTagsInInstallPiece, setBelongsToUninstallPhase, setRollbackEnabledCancel, setRollbackEnabledError, setRuleExpression, setRulesLogicalOperation, setTagsInInstallPiece
-
Methods inherited from class com.zerog.ia.auto.project.ProjectObject
equals, getReferenceID, hashCode, setReferenceID
-
-
-
-
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
-
setInstallScriptInstalledFile
public void setInstallScriptInstalledFile(java.lang.String path)
The path to the SQL script to bundle in to the installer and execute at install time.
-
getInstallScriptInstalledFile
public java.lang.String getInstallScriptInstalledFile()
The path to the SQL script to bundle in to the installer and execute at install time.
-
setUninstallScriptInstalledFile
public void setUninstallScriptInstalledFile(java.lang.String path)
The path to the SQL script to bundle in to the installer and execute at uninstall time.
-
getUninstallScriptInstalledFile
public java.lang.String getUninstallScriptInstalledFile()
The path to the SQL script to bundle in to the installer and execute at uninstall time.
-
-