| /******************************************************************************** |
| * Copyright (c) 2018 Mettenmeier GmbH |
| * |
| * See the NOTICE file(s) distributed with this work for additional |
| * information regarding copyright ownership. |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0 |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| ********************************************************************************/ |
| package org.eclipse.openk.sp.dto.report; |
| |
| import java.util.Date; |
| |
| import javax.validation.constraints.NotNull; |
| import javax.xml.bind.annotation.XmlRootElement; |
| |
| import org.eclipse.openk.sp.abstracts.AbstractDto; |
| import org.eclipse.openk.sp.db.model.StandbyGroup; |
| import org.eclipse.openk.sp.db.model.StandbyList; |
| |
| import com.fasterxml.jackson.annotation.JsonInclude; |
| import com.fasterxml.jackson.annotation.JsonInclude.Include; |
| |
| /** |
| * The "Report" Data Transfer Object (DTO) |
| */ |
| @XmlRootElement(name = "ReportDto") |
| @JsonInclude(Include.NON_NULL) |
| public class ReportDto extends AbstractDto { |
| |
| /** |
| * |
| */ |
| private static final long serialVersionUID = 1L; |
| |
| @NotNull(message = "Planart muss angegeben werden") |
| private String reportName; |
| @NotNull(message = "Format muss angegeben werden") |
| private String printFormat; |
| private Long groupId; |
| private StandbyGroup standByGroup; |
| private Long standByListId; |
| private StandbyList standByList; |
| private Long userId; |
| private Long statusId; |
| private Date validFrom; |
| private Date validTo; |
| private Integer defaultDayRange; |
| @NotNull(message = "Ebene muss angegeben werden") |
| private String reportLevel; |
| private int groupPosition; |
| |
| public String getReportName() { |
| return reportName; |
| } |
| |
| public void setReportName(String reportName) { |
| this.reportName = reportName; |
| } |
| |
| public String getPrintFormat() { |
| return printFormat; |
| } |
| |
| public void setPrintFormat(String format) { |
| if (format != null) { |
| this.printFormat = format.toLowerCase(); |
| } |
| } |
| |
| public Date getValidFrom() { |
| return validFrom; |
| } |
| |
| public void setValidFrom(Date from) { |
| this.validFrom = from; |
| } |
| |
| public Date getValidTo() { |
| return validTo; |
| } |
| |
| // public void setValidTo(String to) throws ParseException { |
| // this.validTo = DateHelper.getDateFromString(to, "yyyy-MM-dd HH:mm:ss"); |
| // } |
| |
| public void setValidTo(Date to) { |
| this.validTo = to; |
| } |
| |
| public Long getUserId() { |
| return userId; |
| } |
| |
| public void setUserId(Long userId) { |
| this.userId = userId; |
| } |
| |
| public StandbyList getStandByList() { |
| return standByList; |
| } |
| |
| public void setStandByList(StandbyList standByList) { |
| this.standByList = standByList; |
| } |
| |
| public StandbyGroup getStandByGroup() { |
| return standByGroup; |
| } |
| |
| public void setStandByGroup(StandbyGroup standByGroup) { |
| this.standByGroup = standByGroup; |
| } |
| |
| public Integer getDefaultDayRange() { |
| return defaultDayRange; |
| } |
| |
| public void setDefaultDayRange(Integer defaultDayRange) { |
| this.defaultDayRange = defaultDayRange; |
| } |
| |
| public String getReportLevel() { |
| return reportLevel; |
| } |
| |
| public void setReportLevel(String reportLevel) { |
| this.reportLevel = reportLevel; |
| } |
| |
| public int getGroupPosition() { |
| return groupPosition; |
| } |
| |
| public void setGroupPosition(int groupPosition) { |
| this.groupPosition = groupPosition; |
| } |
| |
| /** |
| * @return the groupId |
| */ |
| public Long getGroupId() { |
| return groupId; |
| } |
| |
| /** |
| * @param groupId the groupId to set |
| */ |
| public void setGroupId(Long groupId) { |
| this.groupId = groupId; |
| } |
| |
| /** |
| * @return the listId |
| */ |
| public Long getStandByListId() { |
| return standByListId; |
| } |
| |
| /** |
| * @param listId the listId to set |
| */ |
| public void setStandByListId(Long listId) { |
| this.standByListId = listId; |
| } |
| |
| /** |
| * @return the statusId |
| */ |
| public Long getStatusId() { |
| return statusId; |
| } |
| |
| /** |
| * @param statusId the statusId to set |
| */ |
| public void setStatusId(Long statusId) { |
| this.statusId = statusId; |
| } |
| |
| } |