Package org.jumpmind.symmetric.io.data
Class DbFill
java.lang.Object
org.jumpmind.symmetric.io.data.DbFill
Generate data for populating databases.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildDependentColumnValues(List<Table> tables) protected voidbuildForeignKeyReferences(List<Table> tables) protected voidbuildForeignTables(List<Table> tables) protected intFor the table and column passed in, traverse all the foreign key references to find the smallest size defined for the column.protected voidbuildMinColumnSizes(List<Table> tables) createDeleteDmlStatement(Table table) createInsertDmlStatement(Table table) createUpdateDmlStatement(Table table) voidfillTables(String... tableNames) voidfillTables(String[] tableNames, Map<String, DmlWeight> tableProperties) protected TablefilterColumns(Table table) protected TablegetDbTable(String catalogName, String schemaName, String tableName) intgetForeignKeyTables(List<Table> tables, Set<Table> visited) Identify the tables not included in the given list that the initial tables have FK relationships to.getForeignKeyTablesReversed(List<Table> tables, Set<Table> visited) String[]intintgetLocalFkRefColumns(Table table) longintString[]booleangetPrint()getRand()intintbooleanbooleanbooleanremoveSymTables(List<Table> tables) voidsetCascading(boolean cascading) voidsetCascadingSelect(boolean cascadingSelect) voidsetCatalog(String catalog) voidsetCommitDelay(int commitDelay) voidsetContinueOnError(boolean continueOnError) voidsetDebug(boolean debug) voidsetDmlWeight(DmlWeight dmlWeight) voidvoidsetInterval(int interval) voidsetMaxByteSize(int maxByteSize) voidsetMaxRowsCommit(int maxRowsCommit) voidsetMaxTextSize(int maxTextSize) voidsetPercentRollback(int percentRollback) voidsetPlatform(IDatabasePlatform platform) voidsetPrefixed(String[] prefixed) voidsetPrint(boolean print) voidsetRecordCount(int recordCount) voidsetRepeat(int repeat) voidvoidsetTextColumnExpression(String textColumnExpression) voidsetTruncate(boolean truncate) voidsetUseRandomCount(boolean useRandomCount) voidsetVerbose(boolean verbose) protected String
-
Field Details
-
INSERT
public static final int INSERT- See Also:
-
UPDATE
public static final int UPDATE- See Also:
-
DELETE
public static final int DELETE- See Also:
-
-
Constructor Details
-
DbFill
public DbFill() -
DbFill
-
-
Method Details
-
fillTables
-
fillTables
-
removeSymTables
-
toString
-
buildForeignTables
-
buildForeignKeyReferences
-
buildDependentColumnValues
-
buildMinColumnSizes
-
buildMinColumnSize
protected int buildMinColumnSize(Table table, Column column, Set<String> relatedTableColumns, Integer minSize) For the table and column passed in, traverse all the foreign key references to find the smallest size defined for the column. -
getForeignKeyTables
Identify the tables not included in the given list that the initial tables have FK relationships to.- Parameters:
tables-- Returns:
- The table array argument and the tables that the initial table array argument depend on.
-
getForeignKeyTablesReversed
-
createDynamicRandomInsertSql
-
createDynamicRandomUpdateSql
-
createDynamicRandomDeleteSql
-
getSchemaToUse
-
getCatalogToUse
-
getLocalFkRefColumns
-
getAllDbTables
-
getDbTable
-
filterColumns
-
createInsertDmlStatement
-
createUpdateDmlStatement
-
createDeleteDmlStatement
-
setPlatform
-
getRecordCount
public int getRecordCount() -
setRecordCount
public void setRecordCount(int recordCount) -
setCatalog
-
setSchema
-
isCascading
public boolean isCascading() -
setCascading
public void setCascading(boolean cascading) -
isCascadingSelect
public boolean isCascadingSelect() -
setCascadingSelect
public void setCascadingSelect(boolean cascadingSelect) -
isTruncate
public boolean isTruncate() -
setTruncate
public void setTruncate(boolean truncate) -
getIgnore
-
setIgnore
-
getPrefixed
-
setPrefixed
-
getInterval
public int getInterval() -
setInterval
public void setInterval(int interval) -
getRand
-
setDebug
public void setDebug(boolean debug) -
setVerbose
public void setVerbose(boolean verbose) -
setDmlWeight
-
setContinueOnError
public void setContinueOnError(boolean continueOnError) -
setPrint
public void setPrint(boolean print) -
getPrint
public boolean getPrint() -
setUseRandomCount
public void setUseRandomCount(boolean useRandomCount) -
setRepeat
public void setRepeat(int repeat) -
setMaxRowsCommit
public void setMaxRowsCommit(int maxRowsCommit) -
setCommitDelay
public void setCommitDelay(int commitDelay) -
setPercentRollback
public void setPercentRollback(int percentRollback) -
getInsertWeight
public int getInsertWeight() -
getUpdateWeight
public int getUpdateWeight() -
getDeleteWeight
public int getDeleteWeight() -
setTextColumnExpression
-
getTextColumnExpression
-
getMaxByteSize
public long getMaxByteSize() -
setMaxByteSize
public void setMaxByteSize(int maxByteSize) -
getMaxTextSize
public int getMaxTextSize() -
setMaxTextSize
public void setMaxTextSize(int maxTextSize)
-