public class WriteDataToDatabaseCommand extends ConvertingDatabaseCommand
ensureForeignKeyOrder attribute._addIdentityUsingAlterTable, _isolationLevel, _platformConf| Constructor and Description |
|---|
WriteDataToDatabaseCommand() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfiguredFileset(org.apache.tools.ant.types.FileSet fileset)
Adds a fileset.
|
void |
execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
setBatchSize(int batchSize)
The maximum number of insert statements to combine in one batch.
|
void |
setDataFile(File dataFile)
Specifies the name of the single XML file that contains the data to insert into the database.
|
void |
setEnsureForeignKeyOrder(boolean ensureFKOrder)
Specifies whether the foreign key order shall be honored when inserting data into the database.
|
void |
setUseBatchMode(boolean useBatchMode)
Specifies whether batch mode shall be used for inserting the data.
|
void |
setUseExplicitIdentityValues(boolean useExplicitIdentityValues)
Defines whether values for identity columns in the data XML shall be used instead of
letting the database define the value.
|
protected void |
writeAddIdentityUsingAlterTable(Platform platform,
Database model) |
addConfiguredConverter, getDataIOgetCatalogPattern, getDatabaseType, getDataSource, getIsolationLevel, getPlatform, getSchemaPattern, isAddIdentityUsingAlterTable, isRequiringModel, setAddIdentityUsingAlterTable, setIsolationLevel, setPlatformConfigurationhandleException, isFailOnError, setFailOnErrorpublic void setUseExplicitIdentityValues(boolean useExplicitIdentityValues)
ensureForeignKeyOrder is
set to false, setting this to false (the default) does not affect foreign
keys as DdlUtils will automatically update the values of the columns of foreign keys
pointing to the inserted row with the database-created values.useExplicitIdentityValues - true if explicitly specified identity
column values should be inserted instead of letting
the database define the values for these columnspublic void addConfiguredFileset(org.apache.tools.ant.types.FileSet fileset)
fileset - The additional input filespublic void setDataFile(File dataFile)
dataFile - The data filepublic void setBatchSize(int batchSize)
useBatchMode is true.batchSize - The number of objectspublic void setUseBatchMode(boolean useBatchMode)
useBatchMode - true if batch mode shall be usedpublic void setEnsureForeignKeyOrder(boolean ensureFKOrder)
ensureFKOrder - true if the foreign key order shall be followedpublic void execute(DatabaseTaskBase task, Database model) throws org.apache.tools.ant.BuildException
protected void writeAddIdentityUsingAlterTable(Platform platform, Database model) throws DataSinkException
DataSinkExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.