クラス VersionUpCommand
- java.lang.Object
-
- com.sqlapp.data.db.command.AbstractCommand
-
- com.sqlapp.data.db.command.AbstractDataSourceCommand
-
- com.sqlapp.data.db.command.AbstractSqlCommand
-
- com.sqlapp.data.db.command.version.VersionUpCommand
-
- すべての実装されたインタフェース:
java.lang.Runnable
- 直系の既知のサブクラス:
SeriesVersionDownCommand,VersionDownCommand,VersionInsertCommand,VersionMergeCommand,VersionRepairCommand
public class VersionUpCommand extends AbstractSqlCommand
-
-
フィールドの概要
-
クラスから継承されたフィールド com.sqlapp.data.db.command.AbstractCommand
logger
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 VersionUpCommand()
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 protected voidcheckTable(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, DbVersionHandler dbVersionHandler)protected voiddeleteVersion(com.sqlapp.data.schemas.Table table, long id)protected voiddeleteVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, DbVersionHandler dbVersionHandler)protected voiddoRun()protected voiderrorVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, java.lang.Long id, DbVersionHandler dbVersionHandler)protected voidexecuteChangeVersion(com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, java.util.List<com.sqlapp.data.schemas.Row> rows, java.util.List<DbVersionFileHandler.SqlFile> sqlFiles, DbVersionHandler dbVersionHandler)protected voidexecuteEmptyVersion(com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, java.util.List<com.sqlapp.data.schemas.Row> rows, java.util.List<DbVersionFileHandler.SqlFile> sqlFiles, DbVersionHandler dbVersionHandler)protected voidexecuteSql(java.sql.Connection connection, com.sqlapp.jdbc.sql.SqlConverter sqlConverter, com.sqlapp.data.parameter.ParametersContext context, com.sqlapp.data.db.dialect.util.SqlSplitter.SplitResult splitResult)protected voidexecuteSql(java.sql.Connection connection, com.sqlapp.jdbc.sql.SqlConverter sqlConverter, com.sqlapp.data.parameter.ParametersContext context, java.util.List<com.sqlapp.data.db.dialect.util.SqlSplitter.SplitResult> splitResults)protected voidexecuteSql(java.sql.Connection connection, com.sqlapp.jdbc.sql.SqlConverter sqlConverter, java.lang.Long id, java.util.Map<java.lang.Long,DbVersionFileHandler.SqlFile> sqlFileMap)protected voidfinalizeVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, java.lang.Long id, DbVersionHandler dbVersionHandler)java.lang.StringgetAppliedAtColumnName()java.lang.StringgetAppliedByColumnName()java.lang.StringgetDescriptionColumnName()java.io.FilegetDownSqlDirectory()java.io.FilegetFinalizeSqlDirectory()java.lang.StringgetIdColumnName()java.lang.LonggetLastChangeToApply()java.lang.StringgetLastState()protected java.lang.StringgetName(com.sqlapp.data.schemas.Table table)java.lang.StringgetPreviousState()com.sqlapp.data.schemas.TablegetPreviousTable()java.lang.StringgetSchemaChangeLogTableName()java.lang.StringgetSeriesNumberColumnName()java.io.FilegetSetupSqlDirectory()java.io.FilegetSqlDirectory()protected java.util.List<com.sqlapp.data.db.dialect.util.SqlSplitter.SplitResult>getSqls(DbVersionFileHandler.SqlFile sqlFile)java.lang.StringgetStatusColumnName()com.sqlapp.data.schemas.TablegetTable()protected java.util.List<com.sqlapp.data.schemas.Row>getVersionRows(com.sqlapp.data.schemas.Table table, java.util.List<DbVersionFileHandler.SqlFile> sqlFiles, DbVersionHandler dbVersionHandler)booleanisShowVersionOnly()booleanisWithSeriesNumber()protected com.sqlapp.data.db.command.version.VersionUpCommand.DialectTableHolderlogCurrentState(DbVersionHandler dbVersionHandler, DbVersionFileHandler dbVersionFileHandler, boolean target)protected java.lang.StringoutputCurrent(com.sqlapp.data.schemas.Table table, DbVersionHandler dbVersionHandler)protected booleanpreCheck(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, java.lang.Long id, com.sqlapp.data.schemas.Row row, DbVersionHandler dbVersionHandler)voidsetAppliedAtColumnName(java.lang.String appliedAtColumnName)voidsetAppliedByColumnName(java.lang.String appliedByColumnName)voidsetDescriptionColumnName(java.lang.String descriptionColumnName)voidsetDownSqlDirectory(java.io.File downSqlDirectory)voidsetDownSqlDirectory(java.lang.String downSqlDirectory)voidsetFinalizeSqlDirectory(java.io.File finalizeSqlDirectory)voidsetIdColumnName(java.lang.String idColumnName)voidsetLastChangeToApply(java.lang.Long lastChangeToApply)voidsetSchemaChangeLogTableName(java.lang.String schemaChangeLogTableName)voidsetSeriesNumberColumnName(java.lang.String seriesNumberColumnName)voidsetSetupSqlDirectory(java.io.File setupSqlDirectory)voidsetShowVersionOnly(boolean showVersionOnly)voidsetSqlDirectory(java.io.File sqlDirectory)voidsetSqlDirectory(java.lang.String sqlDirectory)voidsetStatusColumnName(java.lang.String statusColumnName)voidsetWithSeriesNumber(boolean withSeriesNumber)protected booleanstartVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, java.lang.Long seriesNumber, DbVersionHandler dbVersionHandler)-
クラスから継承されたメソッド com.sqlapp.data.db.command.AbstractSqlCommand
getEncoding, getFileDirectory, getPlaceholderPrefix, getPlaceholderSuffix, getSqlConverter, initialize, isPlaceholders, rollback, setEncoding, setFileDirectory, setPlaceholderPrefix, setPlaceholders, setPlaceholderSuffix
-
クラスから継承されたメソッド com.sqlapp.data.db.command.AbstractDataSourceCommand
createOutputTextBuilder, getConnection, getConnectionHandler, getCurrentCatalogName, getCurrentSchemaName, getDataSource, getDialect, newConverters, releaseConnection, setConnection, setConnectionHandler, setDataSource, setDialect
-
クラスから継承されたメソッド com.sqlapp.data.db.command.AbstractCommand
createJsonConverter, createYamlConverter, getContext, getConvertHandler, getErr, getExceptionHandler, initializeContext, println, run, setConvertHandler, setExceptionHandler
-
-
-
-
メソッドの詳細
-
doRun
protected void doRun()
- 定義:
doRunクラス内AbstractCommand
-
executeEmptyVersion
protected void executeEmptyVersion(com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, java.util.List<com.sqlapp.data.schemas.Row> rows, java.util.List<DbVersionFileHandler.SqlFile> sqlFiles, DbVersionHandler dbVersionHandler)
-
logCurrentState
protected com.sqlapp.data.db.command.version.VersionUpCommand.DialectTableHolder logCurrentState(DbVersionHandler dbVersionHandler, DbVersionFileHandler dbVersionFileHandler, boolean target)
-
checkTable
protected void checkTable(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, DbVersionHandler dbVersionHandler) throws java.sql.SQLException- 例外:
java.sql.SQLException
-
outputCurrent
protected java.lang.String outputCurrent(com.sqlapp.data.schemas.Table table, DbVersionHandler dbVersionHandler)
-
getVersionRows
protected java.util.List<com.sqlapp.data.schemas.Row> getVersionRows(com.sqlapp.data.schemas.Table table, java.util.List<DbVersionFileHandler.SqlFile> sqlFiles, DbVersionHandler dbVersionHandler)
-
executeChangeVersion
protected void executeChangeVersion(com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, java.util.List<com.sqlapp.data.schemas.Row> rows, java.util.List<DbVersionFileHandler.SqlFile> sqlFiles, DbVersionHandler dbVersionHandler)
-
executeSql
protected void executeSql(java.sql.Connection connection, com.sqlapp.jdbc.sql.SqlConverter sqlConverter, java.lang.Long id, java.util.Map<java.lang.Long,DbVersionFileHandler.SqlFile> sqlFileMap)
-
executeSql
protected void executeSql(java.sql.Connection connection, com.sqlapp.jdbc.sql.SqlConverter sqlConverter, com.sqlapp.data.parameter.ParametersContext context, java.util.List<com.sqlapp.data.db.dialect.util.SqlSplitter.SplitResult> splitResults)
-
executeSql
protected void executeSql(java.sql.Connection connection, com.sqlapp.jdbc.sql.SqlConverter sqlConverter, com.sqlapp.data.parameter.ParametersContext context, com.sqlapp.data.db.dialect.util.SqlSplitter.SplitResult splitResult)
-
getSqls
protected java.util.List<com.sqlapp.data.db.dialect.util.SqlSplitter.SplitResult> getSqls(DbVersionFileHandler.SqlFile sqlFile)
-
preCheck
protected boolean preCheck(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, java.lang.Long id, com.sqlapp.data.schemas.Row row, DbVersionHandler dbVersionHandler) throws java.sql.SQLException- 例外:
java.sql.SQLException
-
startVersion
protected boolean startVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, java.lang.Long seriesNumber, DbVersionHandler dbVersionHandler) throws java.sql.SQLException- 例外:
java.sql.SQLException
-
finalizeVersion
protected void finalizeVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, java.lang.Long id, DbVersionHandler dbVersionHandler) throws java.sql.SQLException- 例外:
java.sql.SQLException
-
errorVersion
protected void errorVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, java.lang.Long id, DbVersionHandler dbVersionHandler) throws java.sql.SQLException- 例外:
java.sql.SQLException
-
deleteVersion
protected void deleteVersion(java.sql.Connection connection, com.sqlapp.data.db.dialect.Dialect dialect, com.sqlapp.data.schemas.Table table, com.sqlapp.data.schemas.Row row, DbVersionHandler dbVersionHandler) throws java.sql.SQLException- 例外:
java.sql.SQLException
-
deleteVersion
protected void deleteVersion(com.sqlapp.data.schemas.Table table, long id) throws java.sql.SQLException- 例外:
java.sql.SQLException
-
getName
protected java.lang.String getName(com.sqlapp.data.schemas.Table table)
-
getSqlDirectory
public java.io.File getSqlDirectory()
- 戻り値:
- the sqlDirectory
-
setSqlDirectory
public void setSqlDirectory(java.io.File sqlDirectory)
- パラメータ:
sqlDirectory- the sqlDirectory to set
-
setSqlDirectory
public void setSqlDirectory(java.lang.String sqlDirectory)
- パラメータ:
sqlDirectory- the sqlDirectory to set
-
getPreviousState
public java.lang.String getPreviousState()
- 戻り値:
- the previousState
-
getPreviousTable
public com.sqlapp.data.schemas.Table getPreviousTable()
- 戻り値:
- the previousTable
-
getLastState
public java.lang.String getLastState()
- 戻り値:
- the lastState
-
isWithSeriesNumber
public boolean isWithSeriesNumber()
- 戻り値:
- the withSeriesNumber
-
setWithSeriesNumber
public void setWithSeriesNumber(boolean withSeriesNumber)
- パラメータ:
withSeriesNumber- the withSeriesNumber to set
-
getTable
public com.sqlapp.data.schemas.Table getTable()
- 戻り値:
- the table
-
getDownSqlDirectory
public java.io.File getDownSqlDirectory()
- 戻り値:
- the downSqlDirectory
-
setDownSqlDirectory
public void setDownSqlDirectory(java.io.File downSqlDirectory)
- パラメータ:
downSqlDirectory- the downSqlDirectory to set
-
setDownSqlDirectory
public void setDownSqlDirectory(java.lang.String downSqlDirectory)
- パラメータ:
downSqlDirectory- the downSqlDirectory to set
-
isShowVersionOnly
public boolean isShowVersionOnly()
- 戻り値:
- the showVersionOnly
-
setShowVersionOnly
public void setShowVersionOnly(boolean showVersionOnly)
- パラメータ:
showVersionOnly- the showVersionOnly to set
-
getSchemaChangeLogTableName
public java.lang.String getSchemaChangeLogTableName()
- 戻り値:
- the schemaChangeLogTableName
-
setSchemaChangeLogTableName
public void setSchemaChangeLogTableName(java.lang.String schemaChangeLogTableName)
- パラメータ:
schemaChangeLogTableName- the schemaChangeLogTableName to set
-
getIdColumnName
public java.lang.String getIdColumnName()
- 戻り値:
- the idColumnName
-
setIdColumnName
public void setIdColumnName(java.lang.String idColumnName)
- パラメータ:
idColumnName- the idColumnName to set
-
getStatusColumnName
public java.lang.String getStatusColumnName()
- 戻り値:
- the statusColumnName
-
setStatusColumnName
public void setStatusColumnName(java.lang.String statusColumnName)
- パラメータ:
statusColumnName- the statusColumnName to set
-
getAppliedByColumnName
public java.lang.String getAppliedByColumnName()
- 戻り値:
- the appliedByColumnName
-
setAppliedByColumnName
public void setAppliedByColumnName(java.lang.String appliedByColumnName)
- パラメータ:
appliedByColumnName- the appliedByColumnName to set
-
getAppliedAtColumnName
public java.lang.String getAppliedAtColumnName()
- 戻り値:
- the appliedAtColumnName
-
setAppliedAtColumnName
public void setAppliedAtColumnName(java.lang.String appliedAtColumnName)
- パラメータ:
appliedAtColumnName- the appliedAtColumnName to set
-
getDescriptionColumnName
public java.lang.String getDescriptionColumnName()
- 戻り値:
- the descriptionColumnName
-
setDescriptionColumnName
public void setDescriptionColumnName(java.lang.String descriptionColumnName)
- パラメータ:
descriptionColumnName- the descriptionColumnName to set
-
getSeriesNumberColumnName
public java.lang.String getSeriesNumberColumnName()
- 戻り値:
- the seriesNumberColumnName
-
setSeriesNumberColumnName
public void setSeriesNumberColumnName(java.lang.String seriesNumberColumnName)
- パラメータ:
seriesNumberColumnName- the seriesNumberColumnName to set
-
getLastChangeToApply
public java.lang.Long getLastChangeToApply()
- 戻り値:
- the lastChangeToApply
-
setLastChangeToApply
public void setLastChangeToApply(java.lang.Long lastChangeToApply)
- パラメータ:
lastChangeToApply- the lastChangeToApply to set
-
getSetupSqlDirectory
public java.io.File getSetupSqlDirectory()
- 戻り値:
- the setupSqlDirectory
-
setSetupSqlDirectory
public void setSetupSqlDirectory(java.io.File setupSqlDirectory)
- パラメータ:
setupSqlDirectory- the setupSqlDirectory to set
-
getFinalizeSqlDirectory
public java.io.File getFinalizeSqlDirectory()
- 戻り値:
- the finalizeSqlDirectory
-
setFinalizeSqlDirectory
public void setFinalizeSqlDirectory(java.io.File finalizeSqlDirectory)
- パラメータ:
finalizeSqlDirectory- the finalizeSqlDirectory to set
-
-