Search in sources :

Example 11 with FilterSet

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;
}
Also used : FilterSet(org.jmesa.limit.FilterSet) FindSubjectsFilter(org.akaza.openclinica.dao.managestudy.FindSubjectsFilter) Filter(org.jmesa.limit.Filter) FindSubjectsFilter(org.akaza.openclinica.dao.managestudy.FindSubjectsFilter)

Example 12 with FilterSet

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;
}
Also used : FilterSet(org.jmesa.limit.FilterSet) EventCRFSDVFilter(org.akaza.openclinica.dao.EventCRFSDVFilter) Filter(org.jmesa.limit.Filter) EventCRFSDVFilter(org.akaza.openclinica.dao.EventCRFSDVFilter)

Example 13 with FilterSet

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;
}
Also used : ListSubjectFilter(org.akaza.openclinica.dao.submit.ListSubjectFilter) FilterSet(org.jmesa.limit.FilterSet) ListSubjectFilter(org.akaza.openclinica.dao.submit.ListSubjectFilter) Filter(org.jmesa.limit.Filter)

Example 14 with FilterSet

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;
}
Also used : ListDiscNotesSubjectFilter(org.akaza.openclinica.dao.managestudy.ListDiscNotesSubjectFilter) FilterSet(org.jmesa.limit.FilterSet) ListDiscNotesSubjectFilter(org.akaza.openclinica.dao.managestudy.ListDiscNotesSubjectFilter) Filter(org.jmesa.limit.Filter)

Aggregations

FilterSet (org.jmesa.limit.FilterSet)14 Filter (org.jmesa.limit.Filter)13 ListDiscNotesSubjectFilter (org.akaza.openclinica.dao.managestudy.ListDiscNotesSubjectFilter)2 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1 MissingResourceException (java.util.MissingResourceException)1 ResourceBundle (java.util.ResourceBundle)1 DropdownFilter (org.akaza.openclinica.control.DropdownFilter)1 SubjectSDVContainer (org.akaza.openclinica.controller.helper.table.SubjectSDVContainer)1 EventCRFSDVFilter (org.akaza.openclinica.dao.EventCRFSDVFilter)1 StudySubjectSDVFilter (org.akaza.openclinica.dao.StudySubjectSDVFilter)1 AuditUserLoginFilter (org.akaza.openclinica.dao.hibernate.AuditUserLoginFilter)1 ViewRuleAssignmentFilter (org.akaza.openclinica.dao.hibernate.ViewRuleAssignmentFilter)1 FindSubjectsFilter (org.akaza.openclinica.dao.managestudy.FindSubjectsFilter)1 ListDiscNotesForCRFFilter (org.akaza.openclinica.dao.managestudy.ListDiscNotesForCRFFilter)1 ListEventsForSubjectFilter (org.akaza.openclinica.dao.managestudy.ListEventsForSubjectFilter)1 ListNotesFilter (org.akaza.openclinica.dao.managestudy.ListNotesFilter)1 StudyAuditLogFilter (org.akaza.openclinica.dao.managestudy.StudyAuditLogFilter)1 ListSubjectFilter (org.akaza.openclinica.dao.submit.ListSubjectFilter)1