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.participatorybudget.business.campaign;
35
36 import java.io.Serializable;
37
38 import javax.validation.constraints.Min;
39 import javax.validation.constraints.Pattern;
40 import javax.validation.constraints.Size;
41
42 import org.hibernate.validator.constraints.NotEmpty;
43
44
45
46
47 public class CampaignArea implements Serializable
48 {
49 private static final long serialVersionUID = 1L;
50
51
52 private int _nId;
53
54 @NotEmpty( message = "#i18n{participatorybudget.validation.campaignarea.CodeCampaign.notEmpty}" )
55 @Size( max = 50, message = "#i18n{participatorybudget.validation.campaignarea.CodeCampaign.size}" )
56 private String _strCodeCampaign;
57
58 @NotEmpty( message = "#i18n{participatorybudget.validation.campaignarea.Title.notEmpty}" )
59 @Size( max = 50, message = "#i18n{participatorybudget.validation.campaignarea.Title.size}" )
60 private String _strTitle;
61
62 @Pattern( regexp = "(whole|localized)", message = "#i18n{participatorybudget.validation.campaignarea.Type.pattern}" )
63 @NotEmpty( message = "#i18n{participatorybudget.validation.campaignarea.Type.notEmpty}" )
64 @Size( max = 50, message = "#i18n{participatorybudget.validation.campaignarea.Type.size}" )
65 private String _strType;
66
67 @Min( value = 0, message = "#i18n{participatorybudget.validation.campaignarea.NumberVotes.min}" )
68 private int _nNumberVotes;
69
70 private boolean _bActive;
71
72
73
74
75
76
77 public int getId( )
78 {
79 return _nId;
80 }
81
82
83
84
85
86
87
88 public void setId( int nId )
89 {
90 _nId = nId;
91 }
92
93
94
95
96
97
98 public int getNumberVotes( )
99 {
100 return _nNumberVotes;
101 }
102
103
104
105
106
107
108
109 public void setNumberVotes( int numberVotes )
110 {
111 _nNumberVotes = numberVotes;
112 }
113
114
115
116
117
118
119 public String getCodeCampaign( )
120 {
121 return _strCodeCampaign;
122 }
123
124
125
126
127
128
129
130 public void setCodeCampaign( String strCodeCampaign )
131 {
132 _strCodeCampaign = strCodeCampaign;
133 }
134
135
136
137
138
139
140 public String getTitle( )
141 {
142 return _strTitle;
143 }
144
145
146
147
148
149
150
151 public void setTitle( String strTitle )
152 {
153 _strTitle = strTitle;
154 }
155
156 public boolean getActive( )
157 {
158 return _bActive;
159 }
160
161
162
163
164
165
166
167 public void setActive( boolean bActive )
168 {
169 _bActive = bActive;
170 }
171
172 public String getType( )
173 {
174 return _strType;
175 }
176
177
178
179
180
181
182
183 public void setType( String strType )
184 {
185 _strType = strType;
186 }
187 }