|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectliquibase.change.AbstractChange
liquibase.change.AbstractSQLChange
liquibase.change.core.SQLFileChange
public class SQLFileChange
Represents a Change for custom SQL stored in a File.
To create an instance call the constructor as normal and then call
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class liquibase.change.AbstractSQLChange |
|---|
AbstractSQLChange.NormalizingStream |
| Nested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable |
|---|
LiquibaseSerializable.SerializationType |
| Field Summary |
|---|
| Fields inherited from class liquibase.change.AbstractSQLChange |
|---|
encoding |
| Fields inherited from interface liquibase.serializer.LiquibaseSerializable |
|---|
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE |
| Constructor Summary | |
|---|---|
SQLFileChange()
|
|
| Method Summary | |
|---|---|
void |
finishInitialization()
Default implementation is a no-op |
boolean |
generateRollbackStatementsVolatile(Database database)
Implementation delegates logic to the SqlGenerator.generateRollbackStatementsIsVolatile(Database) method on the SqlStatement objects returned by Change.generateStatements(liquibase.database.Database)
If no or null SqlStatements are returned by generateRollbackStatements then this method returns false. |
boolean |
generateStatementsVolatile(Database database)
Implementation delegates logic to the SqlGenerator.generateStatementsIsVolatile(Database) method on the SqlStatement objects returned by Change.generateStatements(liquibase.database.Database). |
String |
getConfirmationMessage()
Confirmation message to be displayed after the change is executed. |
String |
getEncoding()
The encoding of the file containing SQL statements |
String |
getPath()
|
String |
getSerializedObjectNamespace()
|
String |
getSql()
Return the raw SQL managed by this Change |
Boolean |
isRelativeToChangelogFile()
|
InputStream |
openSqlStream()
|
void |
setEncoding(String encoding)
|
void |
setPath(String fileName)
Sets the file name but setUp must be called for the change to have impact. |
void |
setRelativeToChangelogFile(Boolean relativeToChangelogFile)
|
void |
setSql(String sql)
Set the raw SQL managed by this Change. |
ValidationErrors |
validate(Database database)
Implementation checks the ChangeParameterMetaData for declared required fields and also delegates logic to the SqlGenerator.validate(liquibase.statement.SqlStatement, liquibase.database.Database, liquibase.sqlgenerator.SqlGeneratorChain) method on the SqlStatement objects returned by Change.generateStatements(liquibase.database.Database). |
| Methods inherited from class liquibase.change.AbstractSQLChange |
|---|
checkStatus, generateCheckSum, generateStatements, getDbms, getEndDelimiter, isSplitStatements, isStripComments, normalizeLineEndings, setDbms, setEndDelimiter, setSplitStatements, setStripComments, supports, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SQLFileChange()
| Method Detail |
|---|
public boolean generateStatementsVolatile(Database database)
AbstractChangeSqlGenerator.generateStatementsIsVolatile(Database) method on the SqlStatement objects returned by Change.generateStatements(liquibase.database.Database).
If zero or null SqlStatements are returned by generateStatements then this method returns false.
generateStatementsVolatile in interface ChangegenerateStatementsVolatile in class AbstractSQLChangepublic boolean generateRollbackStatementsVolatile(Database database)
AbstractChangeSqlGenerator.generateRollbackStatementsIsVolatile(Database) method on the SqlStatement objects returned by Change.generateStatements(liquibase.database.Database)
If no or null SqlStatements are returned by generateRollbackStatements then this method returns false.
generateRollbackStatementsVolatile in interface ChangegenerateRollbackStatementsVolatile in class AbstractSQLChangepublic String getPath()
public void setPath(String fileName)
fileName - The file to usepublic String getEncoding()
public void setEncoding(String encoding)
encoding - the encoding to setpublic Boolean isRelativeToChangelogFile()
public void setRelativeToChangelogFile(Boolean relativeToChangelogFile)
public void finishInitialization()
throws SetupException
AbstractChange
finishInitialization in interface ChangefinishInitialization in class AbstractChangeSetupException
public InputStream openSqlStream()
throws IOException
openSqlStream in class AbstractSQLChangeIOExceptionpublic ValidationErrors validate(Database database)
AbstractChangeSqlGenerator.validate(liquibase.statement.SqlStatement, liquibase.database.Database, liquibase.sqlgenerator.SqlGeneratorChain) method on the SqlStatement objects returned by Change.generateStatements(liquibase.database.Database).
If no or null SqlStatements are returned by generateStatements then this method returns no errors.
If there are no parameters than this method returns no errors
validate in interface Changevalidate in class AbstractSQLChangepublic String getConfirmationMessage()
Change
public String getSql()
AbstractSQLChange
getSql in class AbstractSQLChangepublic void setSql(String sql)
AbstractSQLChange
setSql in class AbstractSQLChangepublic String getSerializedObjectNamespace()
getSerializedObjectNamespace in interface LiquibaseSerializablegetSerializedObjectNamespace in class AbstractChange
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||