Bonjour
voial mon probleme
Mon JSF:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58 RAVE: "Servlet.service()" pour la servlet Faces Servlet a g�n�r� une exception org.apache.jasper.el.JspPropertyNotFoundException: /sommaire.jsp(53,18) '#{besoins.libelle}' Property 'libelle' not found on type org.hibernate.collection.PersistentSet at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:104) at org.richfaces.model.impl.expressive.ValueBindingExpression.evaluate(ValueBindingExpression.java:79) at org.richfaces.model.impl.expressive.ObjectWrapperFactory.wrapObject(ObjectWrapperFactory.java:189) at org.richfaces.model.ModifiableModel$RowKeyWrapperFactory.wrapObject(ModifiableModel.java:75) at org.richfaces.model.impl.expressive.ObjectWrapperFactory$2.convert(ObjectWrapperFactory.java:177) at org.richfaces.model.impl.expressive.ObjectWrapperFactory.convertList(ObjectWrapperFactory.java:138) at org.richfaces.model.impl.expressive.ObjectWrapperFactory.wrapList(ObjectWrapperFactory.java:175) at org.richfaces.model.ModifiableModel.sort(ModifiableModel.java:265) at org.richfaces.model.ModifiableModel.modify(ModifiableModel.java:234) at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:145) at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621) at org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339) at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:124) at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:206) at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:194) at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:802) at javax.faces.component.UIData.encodeBegin(UIData.java:950) at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1220) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934) at javax.faces.render.Renderer.encodeChildren(Renderer.java:148) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826) at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282) at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215) at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942) at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:273) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:204) at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)
voila mon managerBean:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <h:form style="width: 40%; margin: auto;"> <rich:dataTable value="#{connexionBean.utilisateur.besoins}" var="besoins" id="listeBesoins"> <f:facet name="header"> <h:outputText value="Liste des Besoins" /> </f:facet> <rich:column sortBy="#{besoins.libelle}"> <f:facet name="header"> <h:outputText value="Affaire" /> </f:facet> <h:outputText value="#{besoins.libelle}" /> </rich:column> </h:form>
Voila ma classe Utilisateur (hibernate):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87 /** * */ package util.connexion; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; import org.apache.tomcat.util.modeler.ManagedBean; import hibernate.Utilisateur; import hibernate.DAO.UtilisateurDAO; /** * @author b304265 * */ public class ConnexionBean extends ManagedBean{ /** * */ private Utilisateur user = new Utilisateur(); public String getLogin() { return user.getLogin(); } public void setLogin(String login) { user.setLogin(login); } public String getMdp() { return user.getMotdepasse(); } public void setMdp(String mdp) { user.setMotdepasse(mdp); } public Utilisateur getUtilisateur() { return user; } public String connexion() { FacesContext context = FacesContext.getCurrentInstance(); if (getLogin().isEmpty() || getMdp().isEmpty()) { FacesMessage message = new FacesMessage(); message.setSeverity(FacesMessage.SEVERITY_ERROR); message.setSummary("Un des champs est vide"); message.setDetail("Un des champs est vide"); context.addMessage("connexionForm:cBconnecion", message); return "error"; } UtilisateurDAO unUtilisateurDAO = new UtilisateurDAO(); Utilisateur unUser = unUtilisateurDAO.connexion(getLogin(),getMdp()); if(unUser != null){ user = unUser; return "connecte"; } else { FacesMessage message = new FacesMessage(); message.setSeverity(FacesMessage.SEVERITY_ERROR); message.setSummary("mot de passe et/ou login incorrect"); message.setDetail("mot de passe et/ou login incorrect "); context.addMessage("connexionForm:cBconnecion", message); return "error"; } } }
Et ma classe besoin(Hibernate):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390 package hibernate.base; import java.io.Serializable; /** * This is an object that contains data related to the UTILISATEUR table. * Do not modify this class because it will be overwritten if the configuration file * related to this class is modified. * * @hibernate.class * table="UTILISATEUR" */ public abstract class BaseUtilisateur implements Serializable { public static String REF = "Utilisateur"; public static String PROP_LOGIN = "login"; public static String PROP_NOM = "nom"; public static String PROP_UTILISATEUR_BY_UTILISATEUR_IDQUALITE = "utilisateurByUtilisateurIdqualite"; public static String PROP_IDUTILISATEUR = "idutilisateur"; public static String PROP_PRENOM = "prenom"; public static String PROP_MOTDEPASSE = "motdepasse"; public static String PROP_UTILISATEUR_BY_UTILISATEUR_IDASSISTANT = "utilisateurByUtilisateurIdassistant"; public static String PROP_GROUPUTILISATEUR = "grouputilisateur"; public static String PROP_UTILISATEUR_BY_UTILISATEUR_IDSUPERIEUR = "utilisateurByUtilisateurIdsuperieur"; // constructors public BaseUtilisateur () { initialize(); } /** * Constructor for primary key */ public BaseUtilisateur (java.lang.Integer idutilisateur) { this.setIdutilisateur(idutilisateur); initialize(); } protected void initialize () {} private int hashCode = Integer.MIN_VALUE; // primary key private java.lang.Integer idutilisateur; // fields private java.lang.String nom; private java.lang.String prenom; private java.lang.String login; private java.lang.String motdepasse; // many to one private hibernate.Utilisateur utilisateurByUtilisateurIdsuperieur; private hibernate.Grouputilisateur grouputilisateur; private hibernate.Utilisateur utilisateurByUtilisateurIdqualite; private hibernate.Utilisateur utilisateurByUtilisateurIdassistant; // collections private java.util.Set<hibernate.Utilisateur> utilisateursForUtilisateurIdassistant; private java.util.Set<hibernate.Utilisateur> utilisateursForUtilisateurIdsuperieur; private java.util.Set<hibernate.Besoin> besoins; private java.util.Set<hibernate.Produit> produits; private java.util.Set<hibernate.Livreblanc> livreblancs; private java.util.Set<hibernate.Utilisateur> utilisateursForUtilisateurIdqualite; /** * Return the unique identifier of this class * @hibernate.id * generator-class="assigned" * column="IDUTILISATEUR" */ public java.lang.Integer getIdutilisateur () { return idutilisateur; } /** * Set the unique identifier of this class * @param idutilisateur the new ID */ public void setIdutilisateur (java.lang.Integer idutilisateur) { this.idutilisateur = idutilisateur; this.hashCode = Integer.MIN_VALUE; } /** * Return the value associated with the column: NOM */ public java.lang.String getNom () { return nom; } /** * Set the value related to the column: NOM * @param nom the NOM value */ public void setNom (java.lang.String nom) { this.nom = nom; } /** * Return the value associated with the column: PRENOM */ public java.lang.String getPrenom () { return prenom; } /** * Set the value related to the column: PRENOM * @param prenom the PRENOM value */ public void setPrenom (java.lang.String prenom) { this.prenom = prenom; } /** * Return the value associated with the column: LOGIN */ public java.lang.String getLogin () { return login; } /** * Set the value related to the column: LOGIN * @param login the LOGIN value */ public void setLogin (java.lang.String login) { this.login = login; } /** * Return the value associated with the column: MOTDEPASSE */ public java.lang.String getMotdepasse () { return motdepasse; } /** * Set the value related to the column: MOTDEPASSE * @param motdepasse the MOTDEPASSE value */ public void setMotdepasse (java.lang.String motdepasse) { this.motdepasse = motdepasse; } /** * Return the value associated with the column: UTILISATEUR_IDSUPERIEUR */ public hibernate.Utilisateur getUtilisateurByUtilisateurIdsuperieur () { return utilisateurByUtilisateurIdsuperieur; } /** * Set the value related to the column: UTILISATEUR_IDSUPERIEUR * @param utilisateurByUtilisateurIdsuperieur the UTILISATEUR_IDSUPERIEUR value */ public void setUtilisateurByUtilisateurIdsuperieur (hibernate.Utilisateur utilisateurByUtilisateurIdsuperieur) { this.utilisateurByUtilisateurIdsuperieur = utilisateurByUtilisateurIdsuperieur; } /** * Return the value associated with the column: GROUPUTILISATEUR_ID */ public hibernate.Grouputilisateur getGrouputilisateur () { return grouputilisateur; } /** * Set the value related to the column: GROUPUTILISATEUR_ID * @param grouputilisateur the GROUPUTILISATEUR_ID value */ public void setGrouputilisateur (hibernate.Grouputilisateur grouputilisateur) { this.grouputilisateur = grouputilisateur; } /** * Return the value associated with the column: UTILISATEUR_IDQUALITE */ public hibernate.Utilisateur getUtilisateurByUtilisateurIdqualite () { return utilisateurByUtilisateurIdqualite; } /** * Set the value related to the column: UTILISATEUR_IDQUALITE * @param utilisateurByUtilisateurIdqualite the UTILISATEUR_IDQUALITE value */ public void setUtilisateurByUtilisateurIdqualite (hibernate.Utilisateur utilisateurByUtilisateurIdqualite) { this.utilisateurByUtilisateurIdqualite = utilisateurByUtilisateurIdqualite; } /** * Return the value associated with the column: UTILISATEUR_IDASSISTANT */ public hibernate.Utilisateur getUtilisateurByUtilisateurIdassistant () { return utilisateurByUtilisateurIdassistant; } /** * Set the value related to the column: UTILISATEUR_IDASSISTANT * @param utilisateurByUtilisateurIdassistant the UTILISATEUR_IDASSISTANT value */ public void setUtilisateurByUtilisateurIdassistant (hibernate.Utilisateur utilisateurByUtilisateurIdassistant) { this.utilisateurByUtilisateurIdassistant = utilisateurByUtilisateurIdassistant; } /** * Return the value associated with the column: utilisateursForUtilisateurIdassistant */ public java.util.Set<hibernate.Utilisateur> getUtilisateursForUtilisateurIdassistant () { return utilisateursForUtilisateurIdassistant; } /** * Set the value related to the column: utilisateursForUtilisateurIdassistant * @param utilisateursForUtilisateurIdassistant the utilisateursForUtilisateurIdassistant value */ public void setUtilisateursForUtilisateurIdassistant (java.util.Set<hibernate.Utilisateur> utilisateursForUtilisateurIdassistant) { this.utilisateursForUtilisateurIdassistant = utilisateursForUtilisateurIdassistant; } public void addToutilisateursForUtilisateurIdassistant (hibernate.Utilisateur utilisateur) { if (null == getUtilisateursForUtilisateurIdassistant()) setUtilisateursForUtilisateurIdassistant(new java.util.TreeSet<hibernate.Utilisateur>()); getUtilisateursForUtilisateurIdassistant().add(utilisateur); } /** * Return the value associated with the column: utilisateursForUtilisateurIdsuperieur */ public java.util.Set<hibernate.Utilisateur> getUtilisateursForUtilisateurIdsuperieur () { return utilisateursForUtilisateurIdsuperieur; } /** * Set the value related to the column: utilisateursForUtilisateurIdsuperieur * @param utilisateursForUtilisateurIdsuperieur the utilisateursForUtilisateurIdsuperieur value */ public void setUtilisateursForUtilisateurIdsuperieur (java.util.Set<hibernate.Utilisateur> utilisateursForUtilisateurIdsuperieur) { this.utilisateursForUtilisateurIdsuperieur = utilisateursForUtilisateurIdsuperieur; } public void addToutilisateursForUtilisateurIdsuperieur (hibernate.Utilisateur utilisateur) { if (null == getUtilisateursForUtilisateurIdsuperieur()) setUtilisateursForUtilisateurIdsuperieur(new java.util.TreeSet<hibernate.Utilisateur>()); getUtilisateursForUtilisateurIdsuperieur().add(utilisateur); } /** * Return the value associated with the column: besoins */ public java.util.Set<hibernate.Besoin> getBesoins () { return besoins; } /** * Set the value related to the column: besoins * @param besoins the besoins value */ public void setBesoins (java.util.Set<hibernate.Besoin> besoins) { this.besoins = besoins; } /** * Return the value associated with the column: produits */ public java.util.Set<hibernate.Produit> getProduits () { return produits; } /** * Set the value related to the column: produits * @param produits the produits value */ public void setProduits (java.util.Set<hibernate.Produit> produits) { this.produits = produits; } public void addToproduits (hibernate.Produit produit) { if (null == getProduits()) setProduits(new java.util.TreeSet<hibernate.Produit>()); getProduits().add(produit); } /** * Return the value associated with the column: livreblancs */ public java.util.Set<hibernate.Livreblanc> getLivreblancs () { return livreblancs; } /** * Set the value related to the column: livreblancs * @param livreblancs the livreblancs value */ public void setLivreblancs (java.util.Set<hibernate.Livreblanc> livreblancs) { this.livreblancs = livreblancs; } public void addTolivreblancs (hibernate.Livreblanc livreblanc) { if (null == getLivreblancs()) setLivreblancs(new java.util.TreeSet<hibernate.Livreblanc>()); getLivreblancs().add(livreblanc); } /** * Return the value associated with the column: utilisateursForUtilisateurIdqualite */ public java.util.Set<hibernate.Utilisateur> getUtilisateursForUtilisateurIdqualite () { return utilisateursForUtilisateurIdqualite; } /** * Set the value related to the column: utilisateursForUtilisateurIdqualite * @param utilisateursForUtilisateurIdqualite the utilisateursForUtilisateurIdqualite value */ public void setUtilisateursForUtilisateurIdqualite (java.util.Set<hibernate.Utilisateur> utilisateursForUtilisateurIdqualite) { this.utilisateursForUtilisateurIdqualite = utilisateursForUtilisateurIdqualite; } public void addToutilisateursForUtilisateurIdqualite (hibernate.Utilisateur utilisateur) { if (null == getUtilisateursForUtilisateurIdqualite()) setUtilisateursForUtilisateurIdqualite(new java.util.TreeSet<hibernate.Utilisateur>()); getUtilisateursForUtilisateurIdqualite().add(utilisateur); } public boolean equals (Object obj) { if (null == obj) return false; if (!(obj instanceof hibernate.Utilisateur)) return false; else { hibernate.Utilisateur utilisateur = (hibernate.Utilisateur) obj; if (null == this.getIdutilisateur() || null == utilisateur.getIdutilisateur()) return false; else return (this.getIdutilisateur().equals(utilisateur.getIdutilisateur())); } } public int hashCode () { if (Integer.MIN_VALUE == this.hashCode) { if (null == this.getIdutilisateur()) return super.hashCode(); else { String hashStr = this.getClass().getName() + ":" + this.getIdutilisateur().hashCode(); this.hashCode = hashStr.hashCode(); } } return this.hashCode; } public String toString () { return super.toString(); } }
quand je le fait en mode console cela fonctionne.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466 package hibernate.base; import java.io.Serializable; /** * This is an object that contains data related to the BESOIN table. * Do not modify this class because it will be overwritten if the configuration file * related to this class is modified. * * @hibernate.class * table="BESOIN" */ public abstract class BaseBesoin implements Serializable { public static String REF = "Besoin"; public static String PROP_COMMENTAIRE = "commentaire"; public static String PROP_DATEURM = "dateurm"; public static String PROP_FI_FE_AT = "fiFeAt"; public static String PROP_SOW = "sow"; public static String PROP_DPI = "dpi"; public static String PROP_MONTANTEQUILIBRE = "montantequilibre"; public static String PROP_AFFAIRE = "affaire"; public static String PROP_MANDAT = "mandat"; public static String PROP_ID = "id"; public static String PROP_DATERAO = "daterao"; public static String PROP_LIBELLE = "libelle"; // constructors public BaseBesoin () { initialize(); } /** * Constructor for primary key */ public BaseBesoin (java.lang.Integer id) { this.setId(id); initialize(); } protected void initialize () {} private int hashCode = Integer.MIN_VALUE; // primary key private java.lang.Integer id; // fields private java.lang.String libelle; private java.lang.Integer fiFeAt; private java.util.Date daterao; private java.lang.Integer mandat; private java.util.Date dateurm; private java.lang.Integer montantequilibre; private java.lang.String commentaire; // many to one private hibernate.Dpi dpi; private hibernate.Sow sow; private hibernate.Affaire affaire; // collections private java.util.Set<hibernate.Avancer> avancers; private java.util.Set<hibernate.T> ts; private java.util.Set<hibernate.Presentir> presentirs; private java.util.Set<hibernate.Detailha> detailhas; private java.util.Set<hibernate.Entite> entites; private java.util.Set<hibernate.Prtc> prtcs; private java.util.Set<hibernate.Jalonpaiment> jalonpaiments; private java.util.Set<hibernate.Utilisateur> utilisateurs; /** * Return the unique identifier of this class * @hibernate.id * generator-class="assigned" * column="ID" */ public java.lang.Integer getId () { return id; } /** * Set the unique identifier of this class * @param id the new ID */ public void setId (java.lang.Integer id) { this.id = id; this.hashCode = Integer.MIN_VALUE; } /** * Return the value associated with the column: LIBELLE */ public java.lang.String getLibelle () { return libelle; } /** * Set the value related to the column: LIBELLE * @param libelle the LIBELLE value */ public void setLibelle (java.lang.String libelle) { this.libelle = libelle; } /** * Return the value associated with the column: FI_FE_AT */ public java.lang.Integer getFiFeAt () { return fiFeAt; } /** * Set the value related to the column: FI_FE_AT * @param fiFeAt the FI_FE_AT value */ public void setFiFeAt (java.lang.Integer fiFeAt) { this.fiFeAt = fiFeAt; } /** * Return the value associated with the column: DATERAO */ public java.util.Date getDaterao () { return daterao; } /** * Set the value related to the column: DATERAO * @param daterao the DATERAO value */ public void setDaterao (java.util.Date daterao) { this.daterao = daterao; } /** * Return the value associated with the column: MANDAT */ public java.lang.Integer getMandat () { return mandat; } /** * Set the value related to the column: MANDAT * @param mandat the MANDAT value */ public void setMandat (java.lang.Integer mandat) { this.mandat = mandat; } /** * Return the value associated with the column: DATEURM */ public java.util.Date getDateurm () { return dateurm; } /** * Set the value related to the column: DATEURM * @param dateurm the DATEURM value */ public void setDateurm (java.util.Date dateurm) { this.dateurm = dateurm; } /** * Return the value associated with the column: MONTANTEQUILIBRE */ public java.lang.Integer getMontantequilibre () { return montantequilibre; } /** * Set the value related to the column: MONTANTEQUILIBRE * @param montantequilibre the MONTANTEQUILIBRE value */ public void setMontantequilibre (java.lang.Integer montantequilibre) { this.montantequilibre = montantequilibre; } /** * Return the value associated with the column: COMMENTAIRE */ public java.lang.String getCommentaire () { return commentaire; } /** * Set the value related to the column: COMMENTAIRE * @param commentaire the COMMENTAIRE value */ public void setCommentaire (java.lang.String commentaire) { this.commentaire = commentaire; } /** * Return the value associated with the column: DPI_NUMDPI */ public hibernate.Dpi getDpi () { return dpi; } /** * Set the value related to the column: DPI_NUMDPI * @param dpi the DPI_NUMDPI value */ public void setDpi (hibernate.Dpi dpi) { this.dpi = dpi; } /** * Return the value associated with the column: SOW_NUMSOW */ public hibernate.Sow getSow () { return sow; } /** * Set the value related to the column: SOW_NUMSOW * @param sow the SOW_NUMSOW value */ public void setSow (hibernate.Sow sow) { this.sow = sow; } /** * Return the value associated with the column: AFFAIRE_IDAFFAIRE */ public hibernate.Affaire getAffaire () { return affaire; } /** * Set the value related to the column: AFFAIRE_IDAFFAIRE * @param affaire the AFFAIRE_IDAFFAIRE value */ public void setAffaire (hibernate.Affaire affaire) { this.affaire = affaire; } /** * Return the value associated with the column: avancers */ public java.util.Set<hibernate.Avancer> getAvancers () { return avancers; } /** * Set the value related to the column: avancers * @param avancers the avancers value */ public void setAvancers (java.util.Set<hibernate.Avancer> avancers) { this.avancers = avancers; } public void addToavancers (hibernate.Avancer avancer) { if (null == getAvancers()) setAvancers(new java.util.TreeSet<hibernate.Avancer>()); getAvancers().add(avancer); } /** * Return the value associated with the column: ts */ public java.util.Set<hibernate.T> getTs () { return ts; } /** * Set the value related to the column: ts * @param ts the ts value */ public void setTs (java.util.Set<hibernate.T> ts) { this.ts = ts; } public void addTots (hibernate.T t) { if (null == getTs()) setTs(new java.util.TreeSet<hibernate.T>()); getTs().add(t); } /** * Return the value associated with the column: presentirs */ public java.util.Set<hibernate.Presentir> getPresentirs () { return presentirs; } /** * Set the value related to the column: presentirs * @param presentirs the presentirs value */ public void setPresentirs (java.util.Set<hibernate.Presentir> presentirs) { this.presentirs = presentirs; } public void addTopresentirs (hibernate.Presentir presentir) { if (null == getPresentirs()) setPresentirs(new java.util.TreeSet<hibernate.Presentir>()); getPresentirs().add(presentir); } /** * Return the value associated with the column: detailhas */ public java.util.Set<hibernate.Detailha> getDetailhas () { return detailhas; } /** * Set the value related to the column: detailhas * @param detailhas the detailhas value */ public void setDetailhas (java.util.Set<hibernate.Detailha> detailhas) { this.detailhas = detailhas; } public void addTodetailhas (hibernate.Detailha detailha) { if (null == getDetailhas()) setDetailhas(new java.util.TreeSet<hibernate.Detailha>()); getDetailhas().add(detailha); } /** * Return the value associated with the column: entites */ public java.util.Set<hibernate.Entite> getEntites () { return entites; } /** * Set the value related to the column: entites * @param entites the entites value */ public void setEntites (java.util.Set<hibernate.Entite> entites) { this.entites = entites; } public void addToentites (hibernate.Entite entite) { if (null == getEntites()) setEntites(new java.util.TreeSet<hibernate.Entite>()); getEntites().add(entite); } /** * Return the value associated with the column: prtcs */ public java.util.Set<hibernate.Prtc> getPrtcs () { return prtcs; } /** * Set the value related to the column: prtcs * @param prtcs the prtcs value */ public void setPrtcs (java.util.Set<hibernate.Prtc> prtcs) { this.prtcs = prtcs; } /** * Return the value associated with the column: jalonpaiments */ public java.util.Set<hibernate.Jalonpaiment> getJalonpaiments () { return jalonpaiments; } /** * Set the value related to the column: jalonpaiments * @param jalonpaiments the jalonpaiments value */ public void setJalonpaiments (java.util.Set<hibernate.Jalonpaiment> jalonpaiments) { this.jalonpaiments = jalonpaiments; } public void addTojalonpaiments (hibernate.Jalonpaiment jalonpaiment) { if (null == getJalonpaiments()) setJalonpaiments(new java.util.TreeSet<hibernate.Jalonpaiment>()); getJalonpaiments().add(jalonpaiment); } /** * Return the value associated with the column: utilisateurs */ public java.util.Set<hibernate.Utilisateur> getUtilisateurs () { return utilisateurs; } /** * Set the value related to the column: utilisateurs * @param utilisateurs the utilisateurs value */ public void setUtilisateurs (java.util.Set<hibernate.Utilisateur> utilisateurs) { this.utilisateurs = utilisateurs; } public boolean equals (Object obj) { if (null == obj) return false; if (!(obj instanceof hibernate.Besoin)) return false; else { hibernate.Besoin besoin = (hibernate.Besoin) obj; if (null == this.getId() || null == besoin.getId()) return false; else return (this.getId().equals(besoin.getId())); } } public int hashCode () { if (Integer.MIN_VALUE == this.hashCode) { if (null == this.getId()) return super.hashCode(); else { String hashStr = this.getClass().getName() + ":" + this.getId().hashCode(); this.hashCode = hashStr.hashCode(); } } return this.hashCode; } public String toString () { return super.toString(); } }
Pouvais vous m'aider?
Partager