liquibase.change.core
Class LoadDataChange

java.lang.Object
  extended by liquibase.change.AbstractChange
      extended by liquibase.change.core.LoadDataChange
All Implemented Interfaces:
Change, ChangeWithColumns
Direct Known Subclasses:
LoadUpdateDataChange

public class LoadDataChange
extends AbstractChange
implements ChangeWithColumns


Constructor Summary
  LoadDataChange()
           
protected LoadDataChange(String changeName, String changeDescription)
           
 
Method Summary
 void addColumn(ColumnConfig column)
           
protected  InsertStatement createStatement(String schemaName, String tableName)
           
 CheckSum generateCheckSum()
          Calculates the checksum (currently MD5 hash) for the current configuration of this change.
 SqlStatement[] generateStatements(Database database)
          Generates the SQL statements required to run the change
protected  ColumnConfig getColumnConfig(int index, String header)
           
 List<ColumnConfig> getColumns()
           
 String getConfirmationMessage()
           
protected  CSVReader getCSVReader()
           
 String getEncoding()
           
 String getFile()
           
 String getQuotchar()
           
 String getSchemaName()
           
 String getSeparator()
           
 String getTableName()
           
 void setEncoding(String encoding)
           
 void setFile(String file)
           
 void setQuotchar(String quotchar)
           
 void setSchemaName(String schemaName)
           
 void setSeparator(String separator)
           
 void setTableName(String tableName)
           
 
Methods inherited from class liquibase.change.AbstractChange
createInverses, generateRollbackStatements, getAffectedDatabaseObjects, getChangeMetaData, getChangeSet, getResourceAccessor, init, requiresUpdatedDatabaseMetadata, setChangeSet, setPriority, setResourceAccessor, supports, supportsRollback, validate, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadDataChange

public LoadDataChange()

LoadDataChange

protected LoadDataChange(String changeName,
                         String changeDescription)
Method Detail

getSchemaName

public String getSchemaName()

setSchemaName

public void setSchemaName(String schemaName)

getTableName

public String getTableName()

setTableName

public void setTableName(String tableName)

getFile

public String getFile()

setFile

public void setFile(String file)

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)

getSeparator

public String getSeparator()

setSeparator

public void setSeparator(String separator)

getQuotchar

public String getQuotchar()

setQuotchar

public void setQuotchar(String quotchar)

addColumn

public void addColumn(ColumnConfig column)
Specified by:
addColumn in interface ChangeWithColumns

getColumns

public List<ColumnConfig> getColumns()
Specified by:
getColumns in interface ChangeWithColumns

generateStatements

public SqlStatement[] generateStatements(Database database)
Description copied from interface: Change
Generates the SQL statements required to run the change

Specified by:
generateStatements in interface Change
Parameters:
database - databasethe target Database associated to this change's statements
Returns:
an array of Strings with the statements

getCSVReader

protected CSVReader getCSVReader()
                          throws IOException
Throws:
IOException

createStatement

protected InsertStatement createStatement(String schemaName,
                                          String tableName)

getColumnConfig

protected ColumnConfig getColumnConfig(int index,
                                       String header)

getConfirmationMessage

public String getConfirmationMessage()
Specified by:
getConfirmationMessage in interface Change
Returns:
Confirmation message to be displayed after the change is executed

generateCheckSum

public CheckSum generateCheckSum()
Description copied from interface: Change
Calculates the checksum (currently MD5 hash) for the current configuration of this change.

Specified by:
generateCheckSum in interface Change
Overrides:
generateCheckSum in class AbstractChange
See Also:
Change.generateCheckSum()


Copyright © 2004-2011 Liquibase.org. All Rights Reserved.