|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.apache.torque.mojo.BaseMojo org.apache.torque.mojo.AbstractSQLExecutorMojo org.apache.torque.mojo.AbstractDBACommandMojo
public abstract class AbstractDBACommandMojo
Common logic for running SQL commands on a database
Field Summary | |
---|---|
(package private) String |
database
The name of the database to DROP/CREATE. |
static String |
DATABASE_PROPERTY
|
static String |
DATABASE_PW_PROPERTY
|
static String |
DATABASE_USERNAME_PROPERTY
|
(package private) String |
databasePassword
The password for the user that is DROPPED/CREATED. |
(package private) String |
databaseUser
The user to DROP/CREATE when issuing DBA commands for creating/dropping a user. |
(package private) String |
dbaSettingsKey
Lookup DBA credentials in settings.xml using this key. |
(package private) String |
serverUrl
URL to connect directly to the database server itself (ie: no database specified). |
Fields inherited from class org.apache.torque.mojo.AbstractSQLExecutorMojo |
---|
append, autocommit, conn, connectionHandler, credentials, delimiter, delimiterType, driver, DRIVER_INFO_PROPERTIES_PASSWORD, DRIVER_INFO_PROPERTIES_USER, driverProperties, enableAnonymousPassword, enableAnonymousUsername, escapeProcessing, FILE_SORTING_ASC, FILE_SORTING_DSC, fileFilter, jdbcUtils, keepFormat, onError, password, platform, settingsKey, showheaders, showPassword, skipOnConnectionError, sqlCommand, srcFiles, successfulStatements, targetDatabase, totalStatements, transactions, url, username, utils |
Fields inherited from class org.apache.torque.mojo.BaseMojo |
---|
FS, SKIP_PACKAGING_TYPE |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractDBACommandMojo()
|
Method Summary | |
---|---|
protected Properties |
getContextProperties()
|
String |
getDatabase()
|
String |
getDatabasePassword()
|
String |
getDatabaseUser()
|
String |
getDbaSettingsKey()
|
protected org.apache.maven.settings.Server |
getServerFromSettingsKey()
|
String |
getServerUrl()
|
protected String |
getTransactionDescription(DatabaseCommand command)
|
protected String |
getUpdatedPassword(org.apache.maven.settings.Server server,
String password)
|
protected String |
getUpdatedUsername(org.apache.maven.settings.Server server,
String username)
|
void |
setDatabase(String schema)
|
void |
setDatabasePassword(String databasePassword)
|
void |
setDatabaseUser(String databaseUsername)
|
void |
setDbaSettingsKey(String dbaSettingsKey)
|
void |
setServerUrl(String serverUrl)
|
protected void |
updateConfiguration()
Attempt to automatically detect the correct JDBC driver and database type (oracle, mysql, h2, derby, etc) given a JDBC url |
protected void |
validateConfiguration()
Validate that some essential configuration items are present |
Methods inherited from class org.apache.torque.mojo.BaseMojo |
---|
afterExecution, beforeExecution, execute, getEncoding, getMavenSession, getProject, getSettings, isForceMojoExecution, isSkip, isStartMavenLogger, setEncoding, setForceMojoExecution, setMavenSession, setProject, setSettings, setSkip, setStartMavenLogger, skipMojo |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DATABASE_PROPERTY
public static final String DATABASE_PW_PROPERTY
public static final String DATABASE_USERNAME_PROPERTY
String serverUrl
url
. If serverUrl
is explicitly
supplied it overrides the serverUrl
chosen by the automatic detection logic.
String database
String databaseUser
String databasePassword
String dbaSettingsKey
impex.dba.${project.artifactId}
a second attempt will be made to locate a set of credentials under
impex.dba.${url}
Constructor Detail |
---|
public AbstractDBACommandMojo()
Method Detail |
---|
protected String getTransactionDescription(DatabaseCommand command)
protected void updateConfiguration() throws org.apache.maven.plugin.MojoExecutionException
AbstractSQLExecutorMojo
updateConfiguration
in class AbstractSQLExecutorMojo
org.apache.maven.plugin.MojoExecutionException
protected String getUpdatedPassword(org.apache.maven.settings.Server server, String password)
getUpdatedPassword
in class AbstractSQLExecutorMojo
protected String getUpdatedUsername(org.apache.maven.settings.Server server, String username)
getUpdatedUsername
in class AbstractSQLExecutorMojo
protected Properties getContextProperties()
getContextProperties
in class AbstractSQLExecutorMojo
protected org.apache.maven.settings.Server getServerFromSettingsKey()
getServerFromSettingsKey
in class AbstractSQLExecutorMojo
protected void validateConfiguration() throws org.apache.maven.plugin.MojoExecutionException
AbstractSQLExecutorMojo
validateConfiguration
in class AbstractSQLExecutorMojo
org.apache.maven.plugin.MojoExecutionException
public String getDatabase()
public void setDatabase(String schema)
public String getDatabasePassword()
public void setDatabasePassword(String databasePassword)
public String getDatabaseUser()
public void setDatabaseUser(String databaseUsername)
public String getServerUrl()
public void setServerUrl(String serverUrl)
public String getDbaSettingsKey()
public void setDbaSettingsKey(String dbaSettingsKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |