Remove useless migrator task generics (#1687)
* Remove useless migrator task generics * Clean a couple of compile errors * Try to fix intermittent
This commit is contained in:
parent
80139f4800
commit
9305bef4ef
|
@ -27,7 +27,9 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -160,7 +162,6 @@ public class SearchCoordinatorSvcImplTest {
|
|||
|
||||
}
|
||||
|
||||
// TODO INTERMITTENT this test fails intermittently
|
||||
@Test
|
||||
public void testAsyncSearchLargeResultSetBigCountSameCoordinator() {
|
||||
List<ResourcePersistentId> allResults = new ArrayList<>();
|
||||
|
@ -188,6 +189,8 @@ public class SearchCoordinatorSvcImplTest {
|
|||
return search;
|
||||
});
|
||||
|
||||
// Do all the stubbing before starting any work, since we want to avoid threading issues
|
||||
|
||||
IBundleProvider result = mySvc.registerSearch(myCallingDao, params, "Patient", new CacheControlDirective(), null);
|
||||
assertNotNull(result.getUuid());
|
||||
assertEquals(null, result.size());
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
|
|||
import java.sql.SQLException;
|
||||
import java.util.Set;
|
||||
|
||||
public class AddColumnTask extends BaseTableColumnTypeTask<AddColumnTask> {
|
||||
public class AddColumnTask extends BaseTableColumnTypeTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(AddColumnTask.class);
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class AddColumnTask extends BaseTableColumnTypeTask<AddColumnTask> {
|
|||
|
||||
String typeStatement = getTypeStatement();
|
||||
|
||||
String sql = "";
|
||||
String sql;
|
||||
switch (getDriverType()) {
|
||||
case DERBY_EMBEDDED:
|
||||
case MARIADB_10_1:
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.Set;
|
|||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
|
||||
public class AddForeignKeyTask extends BaseTableColumnTask<AddForeignKeyTask> {
|
||||
public class AddForeignKeyTask extends BaseTableColumnTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(AddForeignKeyTask.class);
|
||||
private String myConstraintName;
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
|
||||
public class AddIdGeneratorTask extends BaseTask<AddIdGeneratorTask> {
|
||||
public class AddIdGeneratorTask extends BaseTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(AddIdGeneratorTask.class);
|
||||
private final String myGeneratorName;
|
||||
|
@ -103,7 +103,7 @@ public class AddIdGeneratorTask extends BaseTask<AddIdGeneratorTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<AddIdGeneratorTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
AddIdGeneratorTask otherObject = (AddIdGeneratorTask) theOtherObject;
|
||||
theBuilder.append(myGeneratorName, otherObject.myGeneratorName);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
public class AddIndexTask extends BaseTableTask<AddIndexTask> {
|
||||
public class AddIndexTask extends BaseTableTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(AddIndexTask.class);
|
||||
private String myIndexName;
|
||||
|
@ -97,7 +97,7 @@ public class AddIndexTask extends BaseTableTask<AddIndexTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<AddIndexTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
super.generateEquals(theBuilder, theOtherObject);
|
||||
|
||||
AddIndexTask otherObject = (AddIndexTask) theOtherObject;
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.sql.SQLException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AddTableByColumnTask extends BaseTableTask<AddTableByColumnTask> {
|
||||
public class AddTableByColumnTask extends BaseTableTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(AddTableByColumnTask.class);
|
||||
|
||||
|
@ -110,7 +110,7 @@ public class AddTableByColumnTask extends BaseTableTask<AddTableByColumnTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<AddTableByColumnTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
super.generateEquals(theBuilder, theOtherObject);
|
||||
AddTableByColumnTask otherObject = (AddTableByColumnTask) theOtherObject;
|
||||
theBuilder.append(myAddColumnTasks, otherObject.myAddColumnTasks);
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class AddTableRawSqlTask extends BaseTableTask<AddTableRawSqlTask> {
|
||||
public class AddTableRawSqlTask extends BaseTableTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(AddTableRawSqlTask.class);
|
||||
private Map<DriverTypeEnum, List<String>> myDriverToSqls = new HashMap<>();
|
||||
|
@ -91,7 +91,7 @@ public class AddTableRawSqlTask extends BaseTableTask<AddTableRawSqlTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<AddTableRawSqlTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
super.generateEquals(theBuilder, theOtherObject);
|
||||
AddTableRawSqlTask otherObject = (AddTableRawSqlTask) theOtherObject;
|
||||
theBuilder.append(myDriverNeutralSqls, otherObject.myDriverNeutralSqls);
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class ArbitrarySqlTask extends BaseTask<ArbitrarySqlTask> {
|
||||
public class ArbitrarySqlTask extends BaseTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(ArbitrarySqlTask.class);
|
||||
private final String myDescription;
|
||||
|
@ -104,7 +104,7 @@ public class ArbitrarySqlTask extends BaseTask<ArbitrarySqlTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<ArbitrarySqlTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
ArbitrarySqlTask otherObject = (ArbitrarySqlTask) theOtherObject;
|
||||
theBuilder.append(myTableName, otherObject.myTableName);
|
||||
}
|
||||
|
@ -124,12 +124,10 @@ public class ArbitrarySqlTask extends BaseTask<ArbitrarySqlTask> {
|
|||
|
||||
private class QueryTask extends Task {
|
||||
private final String mySql;
|
||||
private final QueryModeEnum myMode;
|
||||
private final Consumer<Map<String, Object>> myConsumer;
|
||||
|
||||
public QueryTask(String theSql, QueryModeEnum theMode, Consumer<Map<String, Object>> theConsumer) {
|
||||
mySql = theSql;
|
||||
myMode = theMode;
|
||||
myConsumer = theConsumer;
|
||||
setDescription("Execute raw sql");
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.thymeleaf.util.StringUtils;
|
|||
|
||||
import java.util.Locale;
|
||||
|
||||
public abstract class BaseTableColumnTask<T extends BaseTableTask<T>> extends BaseTableTask<T> {
|
||||
public abstract class BaseTableColumnTask extends BaseTableTask {
|
||||
|
||||
private String myColumnName;
|
||||
|
||||
|
@ -35,10 +35,9 @@ public abstract class BaseTableColumnTask<T extends BaseTableTask<T>> extends Ba
|
|||
super(theProductVersion, theSchemaVersion);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T setColumnName(String theColumnName) {
|
||||
public BaseTableColumnTask setColumnName(String theColumnName) {
|
||||
myColumnName = StringUtils.toUpperCase(theColumnName, Locale.US);
|
||||
return (T) this;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,8 +52,8 @@ public abstract class BaseTableColumnTask<T extends BaseTableTask<T>> extends Ba
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<T> theOtherObject) {
|
||||
BaseTableColumnTask<T> otherObject = (BaseTableColumnTask<T>) theOtherObject;
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
BaseTableColumnTask otherObject = (BaseTableColumnTask) theOtherObject;
|
||||
super.generateEquals(theBuilder, otherObject);
|
||||
theBuilder.append(myColumnName, otherObject.myColumnName);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class BaseTableColumnTypeTask<T extends BaseTableColumnTypeTask<T>> extends BaseTableColumnTask<T> {
|
||||
public abstract class BaseTableColumnTypeTask extends BaseTableColumnTask {
|
||||
private ColumnTypeEnum myColumnType;
|
||||
private Map<ColumnTypeEnum, Map<DriverTypeEnum, String>> myColumnTypeToDriverTypeToSqlType = new HashMap<>();
|
||||
private Boolean myNullable;
|
||||
|
@ -111,10 +111,9 @@ public abstract class BaseTableColumnTypeTask<T extends BaseTableColumnTypeTask<
|
|||
return myColumnType;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T setColumnType(ColumnTypeEnum theColumnType) {
|
||||
public BaseTableColumnTask setColumnType(ColumnTypeEnum theColumnType) {
|
||||
myColumnType = theColumnType;
|
||||
return (T) this;
|
||||
return this;
|
||||
}
|
||||
|
||||
private void setColumnType(ColumnTypeEnum theColumnType, DriverTypeEnum theDriverType, String theColumnTypeSql) {
|
||||
|
@ -157,9 +156,9 @@ public abstract class BaseTableColumnTypeTask<T extends BaseTableColumnTypeTask<
|
|||
return myNullable;
|
||||
}
|
||||
|
||||
public T setNullable(boolean theNullable) {
|
||||
public BaseTableColumnTask setNullable(boolean theNullable) {
|
||||
myNullable = theNullable;
|
||||
return (T) this;
|
||||
return this;
|
||||
}
|
||||
|
||||
protected String getSqlNotNull() {
|
||||
|
@ -170,7 +169,7 @@ public abstract class BaseTableColumnTypeTask<T extends BaseTableColumnTypeTask<
|
|||
return myColumnLength;
|
||||
}
|
||||
|
||||
public BaseTableColumnTypeTask<T> setColumnLength(long theColumnLength) {
|
||||
public BaseTableColumnTypeTask setColumnLength(long theColumnLength) {
|
||||
myColumnLength = theColumnLength;
|
||||
return this;
|
||||
}
|
||||
|
@ -184,7 +183,7 @@ public abstract class BaseTableColumnTypeTask<T extends BaseTableColumnTypeTask<
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<T> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
BaseTableColumnTypeTask otherObject = (BaseTableColumnTypeTask) theOtherObject;
|
||||
super.generateEquals(theBuilder, otherObject);
|
||||
theBuilder.append(getColumnTypeName(myColumnType), getColumnTypeName(otherObject.myColumnType));
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.commons.lang3.Validate;
|
|||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
public abstract class BaseTableTask<T extends BaseTableTask<T>> extends BaseTask<T> {
|
||||
public abstract class BaseTableTask extends BaseTask {
|
||||
private String myTableName;
|
||||
|
||||
public BaseTableTask(String theProductVersion, String theSchemaVersion) {
|
||||
|
@ -35,11 +35,10 @@ public abstract class BaseTableTask<T extends BaseTableTask<T>> extends BaseTask
|
|||
return myTableName;
|
||||
}
|
||||
|
||||
public T setTableName(String theTableName) {
|
||||
public BaseTableTask setTableName(String theTableName) {
|
||||
Validate.notBlank(theTableName);
|
||||
myTableName = theTableName;
|
||||
//noinspection unchecked
|
||||
return (T) this;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,8 +47,8 @@ public abstract class BaseTableTask<T extends BaseTableTask<T>> extends BaseTask
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<T> theOtherObject) {
|
||||
BaseTableTask<T> otherObject = (BaseTableTask<T>) theOtherObject;
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
BaseTableTask otherObject = (BaseTableTask) theOtherObject;
|
||||
theBuilder.append(myTableName, otherObject.myTableName);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import java.util.List;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public abstract class BaseTask<T extends BaseTask> {
|
||||
public abstract class BaseTask {
|
||||
|
||||
public static final String MIGRATION_VERSION_PATTERN = "\\d{8}\\.\\d+";
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(BaseTask.class);
|
||||
|
@ -84,9 +84,9 @@ public abstract class BaseTask<T extends BaseTask> {
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public T setDescription(String theDescription) {
|
||||
public BaseTask setDescription(String theDescription) {
|
||||
myDescription = theDescription;
|
||||
return (T) this;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<ExecutedStatement> getExecutedStatements() {
|
||||
|
@ -196,7 +196,7 @@ public abstract class BaseTask<T extends BaseTask> {
|
|||
return myDoNothing;
|
||||
}
|
||||
|
||||
public BaseTask<T> setDoNothing(boolean theDoNothing) {
|
||||
public BaseTask setDoNothing(boolean theDoNothing) {
|
||||
myDoNothing = theDoNothing;
|
||||
return this;
|
||||
}
|
||||
|
@ -216,14 +216,14 @@ public abstract class BaseTask<T extends BaseTask> {
|
|||
return false;
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
T otherObject = (T) theObject;
|
||||
BaseTask otherObject = (BaseTask) theObject;
|
||||
|
||||
EqualsBuilder b = new EqualsBuilder();
|
||||
generateEquals(b, otherObject);
|
||||
return b.isEquals();
|
||||
}
|
||||
|
||||
protected abstract void generateEquals(EqualsBuilder theBuilder, BaseTask<T> theOtherObject);
|
||||
protected abstract void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject);
|
||||
|
||||
public static class ExecutedStatement {
|
||||
private final String mySql;
|
||||
|
|
|
@ -34,21 +34,26 @@ import org.springframework.jdbc.core.RowCallbackHandler;
|
|||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
import java.util.concurrent.RejectedExecutionHandler;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class CalculateHashesTask extends BaseTableColumnTask<CalculateHashesTask> {
|
||||
public class CalculateHashesTask extends BaseTableColumnTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(CalculateHashesTask.class);
|
||||
private int myBatchSize = 10000;
|
||||
private Map<String, Function<MandatoryKeyMap<String, Object>, Long>> myCalculators = new HashMap<>();
|
||||
private ThreadPoolExecutor myExecutor;
|
||||
|
||||
public void setBatchSize(int theBatchSize) {
|
||||
myBatchSize = theBatchSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -57,6 +62,16 @@ public class CalculateHashesTask extends BaseTableColumnTask<CalculateHashesTask
|
|||
setDescription("Calculate resource search parameter index hashes");
|
||||
}
|
||||
|
||||
public void setBatchSize(int theBatchSize) {
|
||||
myBatchSize = theBatchSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CalculateHashesTask setColumnName(String theColumnName) {
|
||||
super.setColumnName(theColumnName);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void doExecute() throws SQLException {
|
||||
if (isDryRun()) {
|
||||
|
@ -74,7 +89,7 @@ public class CalculateHashesTask extends BaseTableColumnTask<CalculateHashesTask
|
|||
initializeExecutor();
|
||||
try {
|
||||
|
||||
while(true) {
|
||||
while (true) {
|
||||
MyRowCallbackHandler rch = new MyRowCallbackHandler();
|
||||
getTxTemplate().execute(t -> {
|
||||
JdbcTemplate jdbcTemplate = newJdbcTemplate();
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
|
|||
import java.sql.SQLException;
|
||||
import java.util.Set;
|
||||
|
||||
public class DropColumnTask extends BaseTableColumnTask<DropColumnTask> {
|
||||
public class DropColumnTask extends BaseTableColumnTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(DropColumnTask.class);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.Set;
|
|||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
|
||||
public class DropForeignKeyTask extends BaseTableTask<DropForeignKeyTask> {
|
||||
public class DropForeignKeyTask extends BaseTableTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(DropForeignKeyTask.class);
|
||||
private String myConstraintName;
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
|
||||
public class DropIdGeneratorTask extends BaseTask<DropIdGeneratorTask> {
|
||||
public class DropIdGeneratorTask extends BaseTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(DropIdGeneratorTask.class);
|
||||
private final String myGeneratorName;
|
||||
|
@ -103,7 +103,7 @@ public class DropIdGeneratorTask extends BaseTask<DropIdGeneratorTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<DropIdGeneratorTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
DropIdGeneratorTask otherObject = (DropIdGeneratorTask) theOtherObject;
|
||||
theBuilder.append(myGeneratorName, otherObject.myGeneratorName);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class DropIndexTask extends BaseTableTask<DropIndexTask> {
|
||||
public class DropIndexTask extends BaseTableTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(DropIndexTask.class);
|
||||
private String myIndexName;
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.sql.SQLException;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class DropTableTask extends BaseTableTask<DropTableTask> {
|
||||
public class DropTableTask extends BaseTableTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(DropTableTask.class);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ExecuteRawSqlTask extends BaseTask<ExecuteRawSqlTask> {
|
||||
public class ExecuteRawSqlTask extends BaseTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(ExecuteRawSqlTask.class);
|
||||
private Map<DriverTypeEnum, List<String>> myDriverToSqls = new HashMap<>();
|
||||
|
@ -80,7 +80,7 @@ public class ExecuteRawSqlTask extends BaseTask<ExecuteRawSqlTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<ExecuteRawSqlTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
ExecuteRawSqlTask otherObject = (ExecuteRawSqlTask) theOtherObject;
|
||||
theBuilder.append(myDriverNeutralSqls, otherObject.myDriverNeutralSqls);
|
||||
theBuilder.append(myDriverToSqls, otherObject.myDriverToSqls);
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.sql.SQLException;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class InitializeSchemaTask extends BaseTask<InitializeSchemaTask> {
|
||||
public class InitializeSchemaTask extends BaseTask {
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(InitializeSchemaTask.class);
|
||||
|
||||
private final ISchemaInitializationProvider mySchemaInitializationProvider;
|
||||
|
@ -71,7 +71,7 @@ public class InitializeSchemaTask extends BaseTask<InitializeSchemaTask> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask<InitializeSchemaTask> theOtherObject) {
|
||||
protected void generateEquals(EqualsBuilder theBuilder, BaseTask theOtherObject) {
|
||||
InitializeSchemaTask otherObject = (InitializeSchemaTask) theOtherObject;
|
||||
theBuilder.append(mySchemaInitializationProvider, otherObject.mySchemaInitializationProvider);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
|
|||
import java.sql.SQLException;
|
||||
import java.util.Set;
|
||||
|
||||
public class ModifyColumnTask extends BaseTableColumnTypeTask<ModifyColumnTask> {
|
||||
public class ModifyColumnTask extends BaseTableColumnTypeTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(ModifyColumnTask.class);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
|||
import java.sql.SQLException;
|
||||
import java.util.Set;
|
||||
|
||||
public class RenameColumnTask extends BaseTableTask<RenameColumnTask> {
|
||||
public class RenameColumnTask extends BaseTableTask {
|
||||
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(RenameColumnTask.class);
|
||||
private String myOldName;
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class RenameIndexTask extends BaseTableTask<RenameIndexTask> {
|
||||
public class RenameIndexTask extends BaseTableTask {
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(RenameIndexTask.class);
|
||||
private String myOldIndexName;
|
||||
private String myNewIndexName;
|
||||
|
|
|
@ -61,13 +61,6 @@ public class Builder {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder initializeSchema(String theVersion, String theSchemaName, ISchemaInitializationProvider theSchemaInitializationProvider) {
|
||||
InitializeSchemaTask task = new InitializeSchemaTask(myRelease, theVersion, theSchemaInitializationProvider);
|
||||
task.setDescription("Initialize " + theSchemaName + " schema");
|
||||
mySink.addTask(task);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder executeRawSql(String theVersion, DriverTypeEnum theDriver, @Language("SQL") String theSql) {
|
||||
mySink.addTask(new ExecuteRawSqlTask(myRelease, theVersion).addSql(theDriver, theSql));
|
||||
return this;
|
||||
|
@ -217,7 +210,7 @@ public class Builder {
|
|||
|
||||
@Override
|
||||
public void addTask(BaseTask theTask) {
|
||||
((BaseTableTask<?>) theTask).setTableName(myTableName);
|
||||
((BaseTableTask) theTask).setTableName(myTableName);
|
||||
mySink.addTask(theTask);
|
||||
}
|
||||
|
||||
|
@ -457,9 +450,9 @@ public class Builder {
|
|||
|
||||
public static class BuilderCompleteTask {
|
||||
|
||||
private final BaseTask<?> myTask;
|
||||
private final BaseTask myTask;
|
||||
|
||||
public BuilderCompleteTask(BaseTask<?> theTask) {
|
||||
public BuilderCompleteTask(BaseTask theTask) {
|
||||
myTask = theTask;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue