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.StringgetCustomConnectionString()The custom connection string to use when the serverType is GENERIC_JDBC.java.lang.StringgetDatabaseNameOrSIDName()The name of the database/sid with which the installer should interact.java.lang.StringgetInstallScriptDelimiter()The string that separates SQL statements in the uninstall script.java.lang.StringgetInstallScriptExistingFile()The path to the existing SQL script to execute at install time.java.lang.StringgetInstallScriptInstalledFile()The path to the SQL script to bundle in to the installer and execute at install time.FileTypegetInstallScriptType()Returns whether the install SQL script should be bundled in to installer or already exists on the end user's machine.java.lang.StringgetPassword()The password to autenticate to the server.java.lang.StringgetPort()The port number on which the database server should operatejava.lang.StringgetServerPath()The name of the database with which the installer should interact.java.lang.StringgetUninstallScriptDelimiter()The string that separates SQL statements in the uninstall script.java.lang.StringgetUninstallScriptExistingFile()The path to the existing SQL script to execute at uninstall time.java.lang.StringgetUninstallScriptInstalledFile()The path to the SQL script to bundle in to the installer and execute at uninstall time.FileTypegetUninstallScriptType()Returns whether the uninstall SQL script should be bundled in to installer or already exists on the end user's machine.java.lang.StringgetUsername()The username to autenticate to the server.booleanisCreateDatabase()gets the status whether to create a databasevoidsetCreateDatabase(boolean createDatabase)Set true to create a database , defaults to falsevoidsetCustomConnectionString(java.lang.String customConnectionString)The custom connection string to use when the serverType is GENERIC_JDBC.voidsetDatabaseNameOrSIDName(java.lang.String databaseName)The name of the database/SID with which the installer should interact.voidsetInstallScriptDelimiter(java.lang.String delimiter)The string that separates SQL statements in the install script.voidsetInstallScriptExistingFile(java.lang.String existingFile)The path to the SQL script to execute at install time.voidsetInstallScriptInstalledFile(java.lang.String path)The path to the SQL script to bundle in to the installer and execute at install time.voidsetInstallScriptType(FileType installScriptType)Defines whether the install SQL script should be bundled in to installer or already exists on the end user's machine.voidsetPassword(java.lang.String password)The password to autenticate to the server.voidsetPort(java.lang.String serverPort)The port number on which the database server should operate.voidsetServerPath(java.lang.String serverPath)The name of the database with which the installer should interact.voidsetUninstallScriptDelimiter(java.lang.String uninstallScriptDelimiter)The string that separates SQL statements in the uninstall script.voidsetUninstallScriptExistingFile(java.lang.String uninstallScriptExistingFilePath)The path to the SQL script to execute at uninstall time.voidsetUninstallScriptInstalledFile(java.lang.String path)The path to the SQL script to bundle in to the installer and execute at uninstall time.voidsetUninstallScriptType(FileType uninstallScriptType)Defines whether the uninstall SQL script should be bundled in to installer or already exists on the end user's machine.voidsetUsername(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.
-
-