if (!validate(settings)) {
System.exit(1);
}
ExportConfiguration config = null;
if (configFile != null) {
JAXBContext c = ExportConfiguration.getJAXBContext();
Unmarshaller um = c.createUnmarshaller();
config = (ExportConfiguration) um.unmarshal(new FileReader(configFile));
}
if (config == null) {
config = new ExportConfiguration();
//only use the entities from the command line if no config file
//was specified.
for(String entity : entities) {
Entity e = new Entity();
e.setName(entity);
e.setIncludeAllFields(true);
e.setFilter("SELECT * FROM " + MappingTranslator.getTableName(config.getClassForEntity(e)));
config.getEntities().add(e);
}
}
config.setSettings(settings);
if (doExport) {
Output output = Settings.getOutputObject(format, ioFileName);
try {