|
| 1 | +/******************************************************************************* |
| 2 | + * SORMAS® - Surveillance Outbreak Response Management & Analysis System |
| 3 | + * Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) |
| 4 | + * |
| 5 | + * This program is free software: you can redistribute it and/or modify |
| 6 | + * it under the terms of the GNU General Public License as published by |
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
| 8 | + * (at your option) any later version. |
| 9 | + * |
| 10 | + * This program is distributed in the hope that it will be useful, |
| 11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | + * GNU General Public License for more details. |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU General Public License |
| 16 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 17 | + *******************************************************************************/ |
| 18 | +package de.symeda.sormas.api.action; |
| 19 | + |
| 20 | +import java.io.Serializable; |
| 21 | + |
| 22 | +import de.symeda.sormas.api.BaseCriteria; |
| 23 | +import de.symeda.sormas.api.event.EventReferenceDto; |
| 24 | +import de.symeda.sormas.api.utils.IgnoreForUrl; |
| 25 | + |
| 26 | +public class ActionCriteria extends BaseCriteria implements Serializable { |
| 27 | + |
| 28 | + private static final long serialVersionUID = -9174165215694877624L; |
| 29 | + |
| 30 | + private ActionStatus actionStatus; |
| 31 | + private EventReferenceDto event; |
| 32 | + |
| 33 | + public ActionStatus getActionStatus() { |
| 34 | + return actionStatus; |
| 35 | + } |
| 36 | + |
| 37 | + public void setActionStatus(ActionStatus actionStatus) { |
| 38 | + this.actionStatus = actionStatus; |
| 39 | + } |
| 40 | + |
| 41 | + public ActionCriteria actionStatus(ActionStatus actionStatus) { |
| 42 | + setActionStatus(actionStatus); |
| 43 | + return this; |
| 44 | + } |
| 45 | + |
| 46 | + public ActionCriteria event(EventReferenceDto event) { |
| 47 | + this.event = event; |
| 48 | + return this; |
| 49 | + } |
| 50 | + |
| 51 | + @IgnoreForUrl |
| 52 | + public EventReferenceDto getEvent() { |
| 53 | + return event; |
| 54 | + } |
| 55 | + |
| 56 | + public boolean hasContextCriteria() { |
| 57 | + return getEvent() != null; |
| 58 | + } |
| 59 | +} |
0 commit comments