use of org.finos.waltz.schema.tables.RatingScheme.RATING_SCHEME in project waltz by khartec.
the class RatingSchemeDAO method save.
public Boolean save(RatingScheme scheme) {
RatingSchemeRecord r = dsl.newRecord(RATING_SCHEME);
r.setName(scheme.name());
r.setDescription(scheme.description());
return scheme.id().map(id -> {
r.setId(id);
r.changed(RATING_SCHEME.ID, false);
return r.update() == 1;
}).orElseGet(() -> r.insert() == 1);
}
Aggregations