Commit 6e41dfc4 authored by Alexander Prendetskiy's avatar Alexander Prendetskiy
Browse files

extend Institutefilter with new field "accessions"

parent a1928cab
......@@ -42,6 +42,9 @@ public class InstituteFilter extends BasicModelFilter {
/** The name. */
public StringFilter name;
/** The accessions. */
public Boolean accessions;
/**
* Builds the query.
*
......@@ -70,6 +73,13 @@ public class InstituteFilter extends BasicModelFilter {
if (name != null) {
and.and(name.buildQuery(institute.fullName));
}
if (accessions != null) {
if (accessions) {
and.and(institute.accessionCount.gt(0));
} else {
and.and(institute.accessionCount.eq(0L));
}
}
return and;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment