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 void
buildDependentColumnValues
(List<Table> tables) protected void
buildForeignKeyReferences
(List<Table> tables) protected void
buildForeignTables
(List<Table> tables) protected int
For the table and column passed in, traverse all the foreign key references to find the smallest size defined for the column.protected void
buildMinColumnSizes
(List<Table> tables) createDeleteDmlStatement
(Table table) createInsertDmlStatement
(Table table) createUpdateDmlStatement
(Table table) void
fillTables
(String... tableNames) void
fillTables
(String[] tableNames, Map<String, DmlWeight> tableProperties) protected Table
filterColumns
(Table table) protected Table
getDbTable
(String catalogName, String schemaName, String tableName) int
getForeignKeyTables
(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[]
int
int
getLocalFkRefColumns
(Table table) long
int
String[]
boolean
getPrint()
getRand()
int
int
boolean
boolean
boolean
removeSymTables
(List<Table> tables) void
setCascading
(boolean cascading) void
setCascadingSelect
(boolean cascadingSelect) void
setCatalog
(String catalog) void
setCommitDelay
(int commitDelay) void
setContinueOnError
(boolean continueOnError) void
setDebug
(boolean debug) void
setDmlWeight
(DmlWeight dmlWeight) void
void
setInterval
(int interval) void
setMaxByteSize
(int maxByteSize) void
setMaxRowsCommit
(int maxRowsCommit) void
setMaxTextSize
(int maxTextSize) void
setPercentRollback
(int percentRollback) void
setPlatform
(IDatabasePlatform platform) void
setPrefixed
(String[] prefixed) void
setPrint
(boolean print) void
setRecordCount
(int recordCount) void
setRepeat
(int repeat) void
void
setTextColumnExpression
(String textColumnExpression) void
setTruncate
(boolean truncate) void
setUseRandomCount
(boolean useRandomCount) void
setVerbose
(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)
-