Package ca.uhn.fhir.jpa.migrate.taskdef
Class BaseTask
java.lang.Object
ca.uhn.fhir.jpa.migrate.taskdef.BaseTask
- Direct Known Subclasses:
AddIdGeneratorTask,ArbitrarySqlTask,BaseTableTask,DropIdGeneratorTask,ExecuteRawSqlTask,InitializeSchemaTask,NopTask
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcaptureExecutedStatement(String theTableName, String theSql, Object[] theArguments) protected abstract voidfinal booleanvoidexecute()voidexecuteSql(String theTableName, String theSql, Object... theArguments) protected abstract voidgenerateEquals(org.apache.commons.lang3.builder.EqualsBuilder theBuilder, BaseTask theOtherObject) protected abstract voidgenerateHashCode(org.apache.commons.lang3.builder.HashCodeBuilder theBuilder) intorg.springframework.transaction.support.TransactionTemplatefinal inthashCode()booleanbooleanbooleanisDryRun()protected booleanbooleanbooleanprotected voidorg.springframework.jdbc.core.JdbcTemplatesetConnectionProperties(DriverTypeEnum.ConnectionProperties theConnectionProperties) setDescription(String theDescription) setDoNothing(boolean theDoNothing) setDriverType(DriverTypeEnum theDriverType) voidsetDryRun(boolean theDryRun) voidsetFailureAllowed(boolean theFailureAllowed) voidsetNoColumnShrink(boolean theNoColumnShrink) voidsetOnlyAppliesToPlatforms(Set<DriverTypeEnum> theOnlyAppliesToPlatforms) voidsetRunDuringSchemaInitialization(boolean theRunDuringSchemaInitialization) Should this task run even if we're doing the very first initialization of an empty schema.abstract voidvalidate()void
-
Field Details
-
MIGRATION_VERSION_PATTERN
- See Also:
-
-
Constructor Details
-
BaseTask
-
-
Method Details
-
isRunDuringSchemaInitialization
-
setRunDuringSchemaInitialization
Should this task run even if we're doing the very first initialization of an empty schema. By default we skip most tasks during that pass, since they just take up time and the schema should be fully initialized by theInitializeSchemaTask -
setOnlyAppliesToPlatforms
-
getProductVersion
-
getSchemaVersion
-
isNoColumnShrink
-
setNoColumnShrink
-
isDryRun
-
setDryRun
-
getDescription
-
setDescription
-
getExecutedStatements
-
getChangesCount
-
executeSql
- Parameters:
theTableName- This is only used for logging currentlytheSql- The SQL statementtheArguments- The SQL statement arguments
-
captureExecutedStatement
-
getConnectionProperties
-
setConnectionProperties
public BaseTask setConnectionProperties(DriverTypeEnum.ConnectionProperties theConnectionProperties) -
getDriverType
-
setDriverType
-
validate
-
getTxTemplate
-
newJdbcTemplate
-
execute
- Throws:
SQLException
-
doExecute
- Throws:
SQLException
-
isFailureAllowed
-
setFailureAllowed
-
getFlywayVersion
-
logInfo
-
validateVersion
-
isDoNothing
-
setDoNothing
-
hashCode
-
generateHashCode
protected abstract void generateHashCode(org.apache.commons.lang3.builder.HashCodeBuilder theBuilder) -
equals
-
generateEquals
protected abstract void generateEquals(org.apache.commons.lang3.builder.EqualsBuilder theBuilder, BaseTask theOtherObject) -
initializedSchema
-