gICS_2.8.6
SignerIdDTO.java
1 package org.emau.icmvc.ganimed.ttp.cm2.dto;
2 
3 /*
4  * ###license-information-start###
5  * gICS - a Generic Informed Consent Service
6  * __
7  * Copyright (C) 2014 - 2018 The MOSAIC Project - Institut fuer Community
8  * Medicine of the University Medicine Greifswald -
9  * mosaic-projekt@uni-greifswald.de
10  *
11  * concept and implementation
12  * l.geidel
13  * web client
14  * a.blumentritt, m.bialke
15  *
16  * Selected functionalities of gICS were developed as part of the MAGIC Project (funded by the DFG HO 1937/5-1).
17  *
18  * please cite our publications
19  * http://dx.doi.org/10.3414/ME14-01-0133
20  * http://dx.doi.org/10.1186/s12967-015-0545-6
21  * http://dx.doi.org/10.3205/17gmds146
22  * __
23  * This program is free software: you can redistribute it and/or modify
24  * it under the terms of the GNU Affero General Public License as published by
25  * the Free Software Foundation, either version 3 of the License, or
26  * (at your option) any later version.
27  *
28  * This program is distributed in the hope that it will be useful,
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31  * GNU General Public License for more details.
32  *
33  * You should have received a copy of the GNU Affero General Public License
34  * along with this program. If not, see <http://www.gnu.org/licenses/>.
35  * ###license-information-end###
36  */
37 
38 
39 import java.io.Serializable;
40 
47 public class SignerIdDTO implements Serializable {
48 
49  private static final long serialVersionUID = -2817299816782087509L;
50  private String idType;
51  private String id;
52 
53  public SignerIdDTO() {
54  }
55 
56  public SignerIdDTO(String idType, String id) {
57  super();
58  this.idType = idType;
59  this.id = id;
60  }
61 
62  public String getIdType() {
63  return idType;
64  }
65 
66  public void setIdType(String idType) {
67  this.idType = idType;
68  }
69 
70  public String getId() {
71  return id;
72  }
73 
74  public void setId(String id) {
75  this.id = id;
76  }
77 
78  @Override
79  public int hashCode() {
80  final int prime = 31;
81  int result = 1;
82  result = prime * result + ((id == null) ? 0 : id.hashCode());
83  result = prime * result + ((idType == null) ? 0 : idType.hashCode());
84  return result;
85  }
86 
87  @Override
88  public boolean equals(Object obj) {
89  if (this == obj)
90  return true;
91  if (obj == null)
92  return false;
93  if (getClass() != obj.getClass())
94  return false;
95  SignerIdDTO other = (SignerIdDTO) obj;
96  if (id == null) {
97  if (other.id != null)
98  return false;
99  } else if (!id.equals(other.id))
100  return false;
101  if (idType == null) {
102  if (other.idType != null)
103  return false;
104  } else if (!idType.equals(other.idType))
105  return false;
106  return true;
107  }
108 
109  @Override
110  public String toString() {
111  StringBuilder sb = new StringBuilder();
112  sb.append("SignerIdDTO with id '");
113  sb.append(id);
114  sb.append("' and id type '");
115  sb.append(idType);
116  sb.append("'");
117  return sb.toString();
118  }
119 }
signer id - combination of id and id type