1 | package com.medias.database.objects; |
---|
2 | |
---|
3 | // Generated 5 févr. 2007 11:07:11 by Hibernate Tools 3.2.0.b9 |
---|
4 | |
---|
5 | import java.util.HashSet; |
---|
6 | import java.util.Set; |
---|
7 | |
---|
8 | /** |
---|
9 | * CategorieParam generated by hbm2java |
---|
10 | */ |
---|
11 | public class CategorieParam implements java.io.Serializable { |
---|
12 | |
---|
13 | /** |
---|
14 | * |
---|
15 | */ |
---|
16 | private static final long serialVersionUID = 1L; |
---|
17 | |
---|
18 | private int categorieParamId; |
---|
19 | |
---|
20 | private String categorieParamNom; |
---|
21 | |
---|
22 | private String categorieParamDomaine; |
---|
23 | |
---|
24 | private Set<Parametre> parametres = new HashSet<Parametre>(0); |
---|
25 | |
---|
26 | public CategorieParam() { |
---|
27 | } |
---|
28 | |
---|
29 | public CategorieParam(int categorieParamId, String categorieParamNom, |
---|
30 | String categorieParamDomaine) { |
---|
31 | this.categorieParamId = categorieParamId; |
---|
32 | this.categorieParamNom = categorieParamNom; |
---|
33 | this.categorieParamDomaine = categorieParamDomaine; |
---|
34 | } |
---|
35 | |
---|
36 | public CategorieParam(int categorieParamId, String categorieParamNom, |
---|
37 | String categorieParamDomaine, Set<Parametre> parametres) { |
---|
38 | this.categorieParamId = categorieParamId; |
---|
39 | this.categorieParamNom = categorieParamNom; |
---|
40 | this.categorieParamDomaine = categorieParamDomaine; |
---|
41 | this.parametres = parametres; |
---|
42 | } |
---|
43 | |
---|
44 | public int getCategorieParamId() { |
---|
45 | return this.categorieParamId; |
---|
46 | } |
---|
47 | |
---|
48 | public void setCategorieParamId(int categorieParamId) { |
---|
49 | this.categorieParamId = categorieParamId; |
---|
50 | } |
---|
51 | |
---|
52 | public String getCategorieParamNom() { |
---|
53 | return this.categorieParamNom; |
---|
54 | } |
---|
55 | |
---|
56 | public void setCategorieParamNom(String categorieParamNom) { |
---|
57 | this.categorieParamNom = categorieParamNom; |
---|
58 | } |
---|
59 | |
---|
60 | public String getCategorieParamDomaine() { |
---|
61 | return this.categorieParamDomaine; |
---|
62 | } |
---|
63 | |
---|
64 | public void setCategorieParamDomaine(String categorieParamDomaine) { |
---|
65 | this.categorieParamDomaine = categorieParamDomaine; |
---|
66 | } |
---|
67 | |
---|
68 | public Set<Parametre> getParametres() { |
---|
69 | return this.parametres; |
---|
70 | } |
---|
71 | |
---|
72 | public void setParametres(Set<Parametre> parametres) { |
---|
73 | this.parametres = parametres; |
---|
74 | } |
---|
75 | |
---|
76 | public String getCat1() { |
---|
77 | return categorieParamNom.split(" > ")[0]; |
---|
78 | } |
---|
79 | |
---|
80 | public String getCat2() { |
---|
81 | String[] listCat = categorieParamNom.split(" > "); |
---|
82 | if (listCat.length > 1) |
---|
83 | return listCat[1]; |
---|
84 | else |
---|
85 | return ""; |
---|
86 | } |
---|
87 | |
---|
88 | public String getCat3() { |
---|
89 | String[] listCat = categorieParamNom.split(" > "); |
---|
90 | if (listCat.length > 2) |
---|
91 | return listCat[2]; |
---|
92 | else |
---|
93 | return ""; |
---|
94 | } |
---|
95 | |
---|
96 | public String getCat4() { |
---|
97 | String[] listCat = categorieParamNom.split(" > "); |
---|
98 | if (listCat.length > 3) |
---|
99 | return listCat[3]; |
---|
100 | else |
---|
101 | return ""; |
---|
102 | } |
---|
103 | } |
---|