use of org.openforis.collect.persistence.jooq.tables.records.OfcConfigRecord in project collect by openforis.
the class ConfigurationDao method load.
public Configuration load() {
Configuration c = new Configuration();
CollectDSLContext dsl = dsl();
Result<OfcConfigRecord> result = dsl.selectFrom(OFC_CONFIG).fetch();
for (OfcConfigRecord record : result) {
String key = record.getValue(OFC_CONFIG.NAME);
String value = record.getValue(OFC_CONFIG.VALUE);
ConfigurationItem configurationItem = ConfigurationItem.fromKey(key);
c.put(configurationItem, value);
}
return c;
}
Aggregations