make defaults for groupBy configurable
We do not know which fields exist at compile time. But it is a great help to have some pre-selected fields in groupBy. Solved by adding a configuration option.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package org.lucares.pdbui.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class FilterDefaults {
|
||||
private Set<String> groupBy;
|
||||
|
||||
private List<String> fields;
|
||||
|
||||
public FilterDefaults(final List<String> fields, final Set<String> groupBy) {
|
||||
this.fields = new ArrayList<String>(fields);
|
||||
this.groupBy = new HashSet<String>(groupBy);
|
||||
}
|
||||
|
||||
public Set<String> getGroupBy() {
|
||||
return new HashSet<String>(groupBy);
|
||||
}
|
||||
|
||||
public void setGroupBy(Set<String> groupBy) {
|
||||
this.groupBy = new HashSet<String>(groupBy);
|
||||
}
|
||||
|
||||
public List<String> getFields() {
|
||||
return new ArrayList<String>(fields);
|
||||
}
|
||||
|
||||
public void setFields(List<String> fields) {
|
||||
this.fields = new ArrayList<String>(fields);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user