protected class UpgradeCompanyId.TableUpdater
extends Object
implements Callable<Void>
Constructor and Description |
---|
TableUpdater(String tableName,
String foreignTableName,
String foreignColumnName) |
TableUpdater(String tableName,
String columnName,
String[][] foreignNamesArray) |
Modifier and Type | Method and Description |
---|---|
Void |
call() |
protected List<Long> |
getCompanyIds(Connection connection) |
protected String |
getSelectSQL(Connection connection,
String foreignTableName,
String foreignColumnName) |
String |
getTableName() |
protected String |
getUpdateSQL(Connection connection,
String foreignTableName,
String foreignColumnName) |
protected String |
getUpdateSQL(String selectSQL) |
void |
setCreateCompanyIdColumn(boolean createCompanyIdColumn) |
void |
update(Connection connection) |
public TableUpdater(String tableName, String foreignTableName, String foreignColumnName)
public TableUpdater(String tableName, String columnName, String[][] foreignNamesArray)
public final Void call() throws Exception
call
in interface Callable<Void>
Exception
public String getTableName()
public void setCreateCompanyIdColumn(boolean createCompanyIdColumn)
public void update(Connection connection) throws IOException, SQLException
IOException
SQLException
protected List<Long> getCompanyIds(Connection connection) throws SQLException
SQLException
protected String getSelectSQL(Connection connection, String foreignTableName, String foreignColumnName) throws SQLException
SQLException
protected String getUpdateSQL(Connection connection, String foreignTableName, String foreignColumnName) throws SQLException
SQLException
protected String getUpdateSQL(String selectSQL)