public class DtdDataSetStructureGenerator extends BaseDatabaseAccessor implements DataSetStructureGenerator
DataSetStructureGenerator for the DbUnit FlatXmlDataSet XML test data files format
todo test and fix for hsqldb (see sample project)| Modifier and Type | Field and Description |
|---|---|
static String |
PROPKEY_DTD_FILENAME |
configuration, dbSupports, defaultDbSupport, dialect, sqlHandler| Constructor and Description |
|---|
DtdDataSetStructureGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit(Properties configuration)
Initializes the generator by retrieving the name for the DTD file.
|
void |
generateDataSetStructure()
Generates the DTD, and writes it to the file specified by the property
PROPKEY_DTD_FILENAME. |
protected String |
generateDtdContent()
Generates the actual content of the DTD file as an in-memory string.
|
getDbSupport, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic static final String PROPKEY_DTD_FILENAME
protected void doInit(Properties configuration)
doInit in class BaseDatabaseAccessorconfiguration - The config, not nullpublic void generateDataSetStructure()
PROPKEY_DTD_FILENAME.
The DTD will contain the structure of the database. All tables will be written as optional elements and
all columns will be optional attributes.generateDataSetStructure in interface DataSetStructureGeneratorprotected String generateDtdContent()
Copyright © 2016. All Rights Reserved.