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.filegenerator.business;
35
36 import java.io.Serializable;
37 import java.sql.Timestamp;
38 import java.util.Optional;
39
40 import fr.paris.lutece.portal.business.user.AdminUser;
41
42
43
44
45
46
47 public class TemporaryFile implements Serializable
48 {
49 private static final long serialVersionUID = -5789366144218904989L;
50
51 private int _nIdFile;
52 private String _idPhysicalFile;
53 private String _strTitle;
54 private int _nSize;
55 private String _strExtension;
56 private String _strMimeType;
57 private Timestamp _dateCreation;
58 private AdminUser _user;
59 private String _description;
60
61
62
63
64
65 public int getIdFile( )
66 {
67 return _nIdFile;
68 }
69
70
71
72
73
74
75
76 public void setIdFile( int idFile )
77 {
78 _nIdFile = idFile;
79 }
80
81
82
83
84
85 public String getTitle( )
86 {
87 return _strTitle;
88 }
89
90
91
92
93
94
95
96 public void setTitle( String title )
97 {
98 _strTitle = title;
99 }
100
101
102
103
104
105 public int getSize( )
106 {
107 return _nSize;
108 }
109
110
111
112
113
114
115
116 public void setSize( int size )
117 {
118 _nSize = size;
119 }
120
121
122
123
124
125 public String getExtension( )
126 {
127 return _strExtension;
128 }
129
130
131
132
133
134
135
136 public void setExtension( String extension )
137 {
138 _strExtension = extension;
139 }
140
141
142
143
144
145 public String getMimeType( )
146 {
147 return _strMimeType;
148 }
149
150
151
152
153
154
155
156 public void setMimeType( String mimeType )
157 {
158 _strMimeType = mimeType;
159 }
160
161
162
163
164
165 public Timestamp getDateCreation( )
166 {
167 return Optional.ofNullable( _dateCreation ).map( Timestamp::toInstant ).map( Timestamp::from ).orElse( null );
168 }
169
170
171
172
173
174
175
176 public void setDateCreation( Timestamp dateCreation )
177 {
178
179 _dateCreation = Optional.ofNullable( dateCreation ).map( Timestamp::toInstant ).map( Timestamp::from ).orElse( null );
180 }
181
182
183
184
185 public AdminUser getUser( )
186 {
187 return _user;
188 }
189
190
191
192
193
194 public void setUser( AdminUser user )
195 {
196 _user = user;
197 }
198
199
200
201
202 public String getDescription( )
203 {
204 return _description;
205 }
206
207
208
209
210
211 public void setDescription( String description )
212 {
213 _description = description;
214 }
215
216
217
218
219 public String getIdPhysicalFile( )
220 {
221 return _idPhysicalFile;
222 }
223
224
225
226
227
228 public void setIdPhysicalFile( String idPhysicalFile )
229 {
230 _idPhysicalFile = idPhysicalFile;
231 }
232 }