|
||||||||||
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 |
Constructor Summary | |
---|---|
SQLFileChange()
|
Method Summary | |
---|---|
void |
finishInitialization()
Default implementation is a no-op |
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 |
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 |
---|
generateCheckSum, generateRollbackStatementsVolatile, generateStatements, generateStatementsVolatile, 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, toString, wait, wait, wait |
Constructor Detail |
---|
public SQLFileChange()
Method Detail |
---|
public 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 Change
finishInitialization
in class AbstractChange
SetupException
public InputStream openSqlStream() throws IOException
openSqlStream
in class AbstractSQLChange
IOException
public ValidationErrors validate(Database database)
AbstractChange
SqlGenerator.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 Change
validate
in class AbstractSQLChange
public String getConfirmationMessage()
Change
public String getSql()
AbstractSQLChange
getSql
in class AbstractSQLChange
public void setSql(String sql)
AbstractSQLChange
setSql
in class AbstractSQLChange
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |