Search in sources :

Example 1 with EventActionIndexDto

use of de.symeda.sormas.api.event.EventActionIndexDto in project SORMAS-Project by hzi-braunschweig.

the class EventActionsGrid method setLazyDataProvider.

public void setLazyDataProvider() {
    DataProvider<EventActionIndexDto, EventCriteria> dataProvider = DataProvider.fromFilteringCallbacks(query -> FacadeProvider.getActionFacade().getEventActionList(query.getFilter().orElse(null), query.getOffset(), query.getLimit(), query.getSortOrders().stream().map(sortOrder -> new SortProperty(sortOrder.getSorted(), sortOrder.getDirection() == SortDirection.ASCENDING)).collect(Collectors.toList())).stream(), query -> (int) FacadeProvider.getActionFacade().countEventActions(query.getFilter().orElse(null)));
    setDataProvider(dataProvider);
    setSelectionMode(SelectionMode.NONE);
}
Also used : EventActionIndexDto(de.symeda.sormas.api.event.EventActionIndexDto) SortProperty(de.symeda.sormas.api.utils.SortProperty) EventCriteria(de.symeda.sormas.api.event.EventCriteria)

Example 2 with EventActionIndexDto

use of de.symeda.sormas.api.event.EventActionIndexDto in project SORMAS-Project by hzi-braunschweig.

the class EventActionIndexDtoReasultTransformer method transformTuple.

@Override
public Object transformTuple(Object[] objects, String[] strings) {
    UserReferenceDto eventReportingUser = new UserReferenceDto((String) objects[12], (String) objects[13], (String) objects[14], null);
    UserReferenceDto eventResponsibleUser = new UserReferenceDto((String) objects[15], (String) objects[16], (String) objects[17], null);
    String actionTitle = EventHelper.buildEventActionTitleString((ActionMeasure) objects[18], (String) objects[20]);
    UserReferenceDto actionLastModifiedBy = new UserReferenceDto((String) objects[26], (String) objects[27], (String) objects[28], null);
    UserReferenceDto actionCreatorUser = new UserReferenceDto((String) objects[29], (String) objects[30], (String) objects[31], null);
    return new EventActionIndexDto((String) objects[0], (String) objects[1], (Disease) objects[2], (DiseaseVariant) objects[3], (String) objects[4], (EventIdentificationSource) objects[5], (Date) objects[6], (Date) objects[7], (EventStatus) objects[8], (RiskLevel) objects[9], (EventInvestigationStatus) objects[10], (EventManagementStatus) objects[11], eventReportingUser, eventResponsibleUser, actionTitle, (Date) objects[19], (Date) objects[21], (Date) objects[22], (Date) objects[23], (ActionStatus) objects[24], (ActionPriority) objects[25], actionLastModifiedBy, actionCreatorUser);
}
Also used : UserReferenceDto(de.symeda.sormas.api.user.UserReferenceDto) EventActionIndexDto(de.symeda.sormas.api.event.EventActionIndexDto)

Aggregations

EventActionIndexDto (de.symeda.sormas.api.event.EventActionIndexDto)2 EventCriteria (de.symeda.sormas.api.event.EventCriteria)1 UserReferenceDto (de.symeda.sormas.api.user.UserReferenceDto)1 SortProperty (de.symeda.sormas.api.utils.SortProperty)1