1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.model;
21  
22  import java.io.Serializable;
23  
24  import java.util.ArrayList;
25  import java.util.Date;
26  import java.util.List;
27  
28  /**
29   * <a href="PasswordPolicySoap.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This class is used by
38   * <code>com.liferay.portal.service.http.PasswordPolicyServiceSoap</code>.
39   * </p>
40   *
41   * @author Brian Wing Shun Chan
42   *
43   * @see com.liferay.portal.service.http.PasswordPolicyServiceSoap
44   *
45   */
46  public class PasswordPolicySoap implements Serializable {
47      public static PasswordPolicySoap toSoapModel(PasswordPolicy model) {
48          PasswordPolicySoap soapModel = new PasswordPolicySoap();
49  
50          soapModel.setPasswordPolicyId(model.getPasswordPolicyId());
51          soapModel.setCompanyId(model.getCompanyId());
52          soapModel.setUserId(model.getUserId());
53          soapModel.setUserName(model.getUserName());
54          soapModel.setCreateDate(model.getCreateDate());
55          soapModel.setModifiedDate(model.getModifiedDate());
56          soapModel.setDefaultPolicy(model.getDefaultPolicy());
57          soapModel.setName(model.getName());
58          soapModel.setDescription(model.getDescription());
59          soapModel.setChangeable(model.getChangeable());
60          soapModel.setChangeRequired(model.getChangeRequired());
61          soapModel.setMinAge(model.getMinAge());
62          soapModel.setCheckSyntax(model.getCheckSyntax());
63          soapModel.setAllowDictionaryWords(model.getAllowDictionaryWords());
64          soapModel.setMinLength(model.getMinLength());
65          soapModel.setHistory(model.getHistory());
66          soapModel.setHistoryCount(model.getHistoryCount());
67          soapModel.setExpireable(model.getExpireable());
68          soapModel.setMaxAge(model.getMaxAge());
69          soapModel.setWarningTime(model.getWarningTime());
70          soapModel.setGraceLimit(model.getGraceLimit());
71          soapModel.setLockout(model.getLockout());
72          soapModel.setMaxFailure(model.getMaxFailure());
73          soapModel.setLockoutDuration(model.getLockoutDuration());
74          soapModel.setRequireUnlock(model.getRequireUnlock());
75          soapModel.setResetFailureCount(model.getResetFailureCount());
76  
77          return soapModel;
78      }
79  
80      public static PasswordPolicySoap[] toSoapModels(PasswordPolicy[] models) {
81          PasswordPolicySoap[] soapModels = new PasswordPolicySoap[models.length];
82  
83          for (int i = 0; i < models.length; i++) {
84              soapModels[i] = toSoapModel(models[i]);
85          }
86  
87          return soapModels;
88      }
89  
90      public static PasswordPolicySoap[][] toSoapModels(PasswordPolicy[][] models) {
91          PasswordPolicySoap[][] soapModels = null;
92  
93          if (models.length > 0) {
94              soapModels = new PasswordPolicySoap[models.length][models[0].length];
95          }
96          else {
97              soapModels = new PasswordPolicySoap[0][0];
98          }
99  
100         for (int i = 0; i < models.length; i++) {
101             soapModels[i] = toSoapModels(models[i]);
102         }
103 
104         return soapModels;
105     }
106 
107     public static PasswordPolicySoap[] toSoapModels(List<PasswordPolicy> models) {
108         List<PasswordPolicySoap> soapModels = new ArrayList<PasswordPolicySoap>(models.size());
109 
110         for (PasswordPolicy model : models) {
111             soapModels.add(toSoapModel(model));
112         }
113 
114         return soapModels.toArray(new PasswordPolicySoap[soapModels.size()]);
115     }
116 
117     public PasswordPolicySoap() {
118     }
119 
120     public long getPrimaryKey() {
121         return _passwordPolicyId;
122     }
123 
124     public void setPrimaryKey(long pk) {
125         setPasswordPolicyId(pk);
126     }
127 
128     public long getPasswordPolicyId() {
129         return _passwordPolicyId;
130     }
131 
132     public void setPasswordPolicyId(long passwordPolicyId) {
133         _passwordPolicyId = passwordPolicyId;
134     }
135 
136     public long getCompanyId() {
137         return _companyId;
138     }
139 
140     public void setCompanyId(long companyId) {
141         _companyId = companyId;
142     }
143 
144     public long getUserId() {
145         return _userId;
146     }
147 
148     public void setUserId(long userId) {
149         _userId = userId;
150     }
151 
152     public String getUserName() {
153         return _userName;
154     }
155 
156     public void setUserName(String userName) {
157         _userName = userName;
158     }
159 
160     public Date getCreateDate() {
161         return _createDate;
162     }
163 
164     public void setCreateDate(Date createDate) {
165         _createDate = createDate;
166     }
167 
168     public Date getModifiedDate() {
169         return _modifiedDate;
170     }
171 
172     public void setModifiedDate(Date modifiedDate) {
173         _modifiedDate = modifiedDate;
174     }
175 
176     public boolean getDefaultPolicy() {
177         return _defaultPolicy;
178     }
179 
180     public boolean isDefaultPolicy() {
181         return _defaultPolicy;
182     }
183 
184     public void setDefaultPolicy(boolean defaultPolicy) {
185         _defaultPolicy = defaultPolicy;
186     }
187 
188     public String getName() {
189         return _name;
190     }
191 
192     public void setName(String name) {
193         _name = name;
194     }
195 
196     public String getDescription() {
197         return _description;
198     }
199 
200     public void setDescription(String description) {
201         _description = description;
202     }
203 
204     public boolean getChangeable() {
205         return _changeable;
206     }
207 
208     public boolean isChangeable() {
209         return _changeable;
210     }
211 
212     public void setChangeable(boolean changeable) {
213         _changeable = changeable;
214     }
215 
216     public boolean getChangeRequired() {
217         return _changeRequired;
218     }
219 
220     public boolean isChangeRequired() {
221         return _changeRequired;
222     }
223 
224     public void setChangeRequired(boolean changeRequired) {
225         _changeRequired = changeRequired;
226     }
227 
228     public long getMinAge() {
229         return _minAge;
230     }
231 
232     public void setMinAge(long minAge) {
233         _minAge = minAge;
234     }
235 
236     public boolean getCheckSyntax() {
237         return _checkSyntax;
238     }
239 
240     public boolean isCheckSyntax() {
241         return _checkSyntax;
242     }
243 
244     public void setCheckSyntax(boolean checkSyntax) {
245         _checkSyntax = checkSyntax;
246     }
247 
248     public boolean getAllowDictionaryWords() {
249         return _allowDictionaryWords;
250     }
251 
252     public boolean isAllowDictionaryWords() {
253         return _allowDictionaryWords;
254     }
255 
256     public void setAllowDictionaryWords(boolean allowDictionaryWords) {
257         _allowDictionaryWords = allowDictionaryWords;
258     }
259 
260     public int getMinLength() {
261         return _minLength;
262     }
263 
264     public void setMinLength(int minLength) {
265         _minLength = minLength;
266     }
267 
268     public boolean getHistory() {
269         return _history;
270     }
271 
272     public boolean isHistory() {
273         return _history;
274     }
275 
276     public void setHistory(boolean history) {
277         _history = history;
278     }
279 
280     public int getHistoryCount() {
281         return _historyCount;
282     }
283 
284     public void setHistoryCount(int historyCount) {
285         _historyCount = historyCount;
286     }
287 
288     public boolean getExpireable() {
289         return _expireable;
290     }
291 
292     public boolean isExpireable() {
293         return _expireable;
294     }
295 
296     public void setExpireable(boolean expireable) {
297         _expireable = expireable;
298     }
299 
300     public long getMaxAge() {
301         return _maxAge;
302     }
303 
304     public void setMaxAge(long maxAge) {
305         _maxAge = maxAge;
306     }
307 
308     public long getWarningTime() {
309         return _warningTime;
310     }
311 
312     public void setWarningTime(long warningTime) {
313         _warningTime = warningTime;
314     }
315 
316     public int getGraceLimit() {
317         return _graceLimit;
318     }
319 
320     public void setGraceLimit(int graceLimit) {
321         _graceLimit = graceLimit;
322     }
323 
324     public boolean getLockout() {
325         return _lockout;
326     }
327 
328     public boolean isLockout() {
329         return _lockout;
330     }
331 
332     public void setLockout(boolean lockout) {
333         _lockout = lockout;
334     }
335 
336     public int getMaxFailure() {
337         return _maxFailure;
338     }
339 
340     public void setMaxFailure(int maxFailure) {
341         _maxFailure = maxFailure;
342     }
343 
344     public long getLockoutDuration() {
345         return _lockoutDuration;
346     }
347 
348     public void setLockoutDuration(long lockoutDuration) {
349         _lockoutDuration = lockoutDuration;
350     }
351 
352     public boolean getRequireUnlock() {
353         return _requireUnlock;
354     }
355 
356     public boolean isRequireUnlock() {
357         return _requireUnlock;
358     }
359 
360     public void setRequireUnlock(boolean requireUnlock) {
361         _requireUnlock = requireUnlock;
362     }
363 
364     public long getResetFailureCount() {
365         return _resetFailureCount;
366     }
367 
368     public void setResetFailureCount(long resetFailureCount) {
369         _resetFailureCount = resetFailureCount;
370     }
371 
372     private long _passwordPolicyId;
373     private long _companyId;
374     private long _userId;
375     private String _userName;
376     private Date _createDate;
377     private Date _modifiedDate;
378     private boolean _defaultPolicy;
379     private String _name;
380     private String _description;
381     private boolean _changeable;
382     private boolean _changeRequired;
383     private long _minAge;
384     private boolean _checkSyntax;
385     private boolean _allowDictionaryWords;
386     private int _minLength;
387     private boolean _history;
388     private int _historyCount;
389     private boolean _expireable;
390     private long _maxAge;
391     private long _warningTime;
392     private int _graceLimit;
393     private boolean _lockout;
394     private int _maxFailure;
395     private long _lockoutDuration;
396     private boolean _requireUnlock;
397     private long _resetFailureCount;
398 }