1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.appointment.web.dto;
35
36 import java.util.Objects;
37
38 import fr.paris.lutece.plugins.genericattributes.business.Entry;
39 import fr.paris.lutece.plugins.genericattributes.business.Field;
40 import fr.paris.lutece.plugins.genericattributes.business.Response;
41 import fr.paris.lutece.portal.business.file.File;
42
43
44
45
46
47
48
49 public final class ResponseRecapDTO extends Response implements Comparable<ResponseRecapDTO>
50 {
51
52
53
54 private static final long serialVersionUID = -248405445729375667L;
55
56
57
58
59 private String _strRecapValue;
60
61
62
63
64 private Response _response;
65
66
67
68
69
70
71
72 public ResponseRecapDTO( Response response )
73 {
74 this._response = response;
75 }
76
77
78
79
80
81
82
83
84
85 public ResponseRecapDTO( Response response, String strRecapValue )
86 {
87 this._response = response;
88 this._strRecapValue = strRecapValue;
89 }
90
91
92
93
94
95
96 public String getRecapValue( )
97 {
98 return this._strRecapValue;
99 }
100
101
102
103
104
105
106
107 public void setRecapValue( String strRecapValue )
108 {
109 this._strRecapValue = strRecapValue;
110 }
111
112
113
114
115 @Override
116 public Entry getEntry( )
117 {
118 return _response.getEntry( );
119 }
120
121
122
123
124 @Override
125 public int getIdResponse( )
126 {
127 return _response.getIdResponse( );
128 }
129
130
131
132
133 @Override
134 public Field getField( )
135 {
136 return _response.getField( );
137 }
138
139
140
141
142 @Override
143 public String getToStringValueResponse( )
144 {
145 return _response.getToStringValueResponse( );
146 }
147
148
149
150
151 @Override
152 public String getResponseValue( )
153 {
154 return _response.getResponseValue( );
155 }
156
157
158
159
160 @Override
161 public int getStatus( )
162 {
163 return _response.getStatus( );
164 }
165
166
167
168
169 @Override
170 public File getFile( )
171 {
172 return _response.getFile( );
173 }
174
175 @Override
176 public int compareTo( ResponseRecapDTO o )
177 {
178
179 if ( this._response.getEntry( ) != null && o._response.getEntry( ) != null )
180 {
181 return ( this._response.getEntry( ).getPosition( ) - o._response.getEntry( ).getPosition( ) );
182 }
183 return 0;
184 }
185
186 @Override
187 public boolean equals( Object o )
188 {
189 if ( o == this )
190 {
191 return true;
192 }
193 if ( !( o instanceof ResponseRecapDTO ) )
194 {
195 return false;
196 }
197 ResponseRecapDTOfr/paris/lutece/plugins/appointment/web/dto/ResponseRecapDTO.html#ResponseRecapDTO">ResponseRecapDTO responseToCompare = (ResponseRecapDTO) o;
198 return Objects.equals( _strRecapValue, responseToCompare._strRecapValue ) && Objects.equals( _response, responseToCompare._response );
199 }
200
201 @Override
202 public int hashCode( )
203 {
204 return Objects.hash( _strRecapValue, _response );
205 }
206
207 }