use of org.jmesa.limit.FilterSet in project OpenClinica by OpenClinica.
the class ListStudySubjectTableFactory method getSubjectFilter.
protected FindSubjectsFilter getSubjectFilter(Limit limit) {
FindSubjectsFilter auditUserLoginFilter = new FindSubjectsFilter();
FilterSet filterSet = limit.getFilterSet();
Collection<Filter> filters = filterSet.getFilters();
for (Filter filter : filters) {
String property = filter.getProperty();
String value = filter.getValue();
if ("studySubject.status".equalsIgnoreCase(property)) {
value = Status.getByName(value).getId() + "";
} else if (property.startsWith("sgc_")) {
int studyGroupClassId = property.endsWith("_") ? 0 : Integer.valueOf(property.split("_")[1]);
value = studyGroupDAO.findByNameAndGroupClassID(value, studyGroupClassId).getId() + "";
}
auditUserLoginFilter.addFilter(property, value);
}
return auditUserLoginFilter;
}
use of org.jmesa.limit.FilterSet in project OpenClinica by OpenClinica.
the class SDVUtil method getEventCRFSDVFilter.
protected EventCRFSDVFilter getEventCRFSDVFilter(Limit limit, Integer studyId) {
EventCRFSDVFilter eventCRFSDVFilter = new EventCRFSDVFilter(studyId);
FilterSet filterSet = limit.getFilterSet();
Collection<Filter> filters = filterSet.getFilters();
for (Filter filter : filters) {
String property = filter.getProperty();
String value = filter.getValue();
eventCRFSDVFilter.addFilter(property, value);
}
return eventCRFSDVFilter;
}
use of org.jmesa.limit.FilterSet in project OpenClinica by OpenClinica.
the class ListSubjectTableFactory method getListSubjectFilter.
/**
* A very custom way to filter the items. The AuditUserLoginFilter acts as a
* command for the Hibernate criteria object. Take the Limit information and
* filter the rows.
*
* @param limit
* The Limit to use.
*/
protected ListSubjectFilter getListSubjectFilter(Limit limit) {
ListSubjectFilter listSubjectFilter = new ListSubjectFilter(getDateFormat());
FilterSet filterSet = limit.getFilterSet();
Collection<Filter> filters = filterSet.getFilters();
for (Filter filter : filters) {
String property = filter.getProperty();
String value = filter.getValue();
listSubjectFilter.addFilter(property, value);
}
return listSubjectFilter;
}
use of org.jmesa.limit.FilterSet in project OpenClinica by OpenClinica.
the class DiscNotesSubjectStatisticsFactory method getSubjectFilter.
protected ListDiscNotesSubjectFilter getSubjectFilter(Limit limit) {
ListDiscNotesSubjectFilter listDiscNotesSubjectFilter = new ListDiscNotesSubjectFilter();
FilterSet filterSet = limit.getFilterSet();
Collection<Filter> filters = filterSet.getFilters();
for (Filter filter : filters) {
String property = filter.getProperty();
String value = filter.getValue();
listDiscNotesSubjectFilter.addFilter(property, value);
}
return listDiscNotesSubjectFilter;
}
Aggregations