|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.org.bryanray.testtoys.loader.Loader
public class Loader
A class that generates a SQL script to load test data, from a SQL template and CSV data describing the entities.
Constructor Summary | |
---|---|
Loader()
|
Method Summary | |
---|---|
void |
configureValueFormatters()
Reads the data types from the header and selects the appropriate formatter for the column. |
java.lang.String |
generateTestData()
|
static void |
main(java.lang.String[] args)
|
void |
setTemplate(java.io.InputStream inputStream)
The SQL template. |
void |
setTestDataEntities(java.io.InputStream inputStream)
An iterator, which supplies a Map for each iteration. |
java.lang.String[] |
stripParameters(java.lang.String[] header)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Loader()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- The command line arguments.public java.lang.String[] stripParameters(java.lang.String[] header)
header
- The header from which to remove the data types.
public void configureValueFormatters()
public java.lang.String generateTestData()
template
- The SQL template.entities
- An iterator, which supplies a Map
for each
iteration. The map represents a single entity, with the place
holder value in the map value.
public void setTestDataEntities(java.io.InputStream inputStream)
Map
for each iteration.
The map represents a single entity, with the place holder value in the
map value.
inputStream
- The input stream to parse as CSV data.public void setTemplate(java.io.InputStream inputStream)
The
- input stream that holds the template.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |