public void export(Exporter ex) throws SQLException, IOException {
		ex.start(settings.getName());
		
		String query = "SELECT entry_id FROM entry";
		EnumSet<ExporterSettings> expSetting = ex.getSettings();
		if (expSetting == null) {
			expSetting = EnumSet.noneOf(ExporterSettings.class);
		}
		if (expSetting.contains(ExporterSettings.ALPHABETICAL)) {
			query = query + " ORDER BY LOWER(word)";
		}
		query = query + ";";

		ResultSet res = connection.createStatement().executeQuery(query);
		while (res.next()) {
			ex.addEntry(getEntry(res.getLong("entry_id")));
		}

		ex.finish();
	}