001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model.impl;
016    
017    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.json.JSON;
020    import com.liferay.portal.kernel.lar.StagedModelType;
021    import com.liferay.portal.kernel.util.GetterUtil;
022    import com.liferay.portal.kernel.util.ProxyUtil;
023    import com.liferay.portal.kernel.util.StringBundler;
024    import com.liferay.portal.kernel.util.StringPool;
025    import com.liferay.portal.model.CacheModel;
026    import com.liferay.portal.model.PasswordPolicy;
027    import com.liferay.portal.model.PasswordPolicyModel;
028    import com.liferay.portal.model.PasswordPolicySoap;
029    import com.liferay.portal.service.ServiceContext;
030    import com.liferay.portal.util.PortalUtil;
031    
032    import com.liferay.portlet.expando.model.ExpandoBridge;
033    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
034    
035    import java.io.Serializable;
036    
037    import java.sql.Types;
038    
039    import java.util.ArrayList;
040    import java.util.Date;
041    import java.util.HashMap;
042    import java.util.List;
043    import java.util.Map;
044    
045    /**
046     * The base model implementation for the PasswordPolicy service. Represents a row in the "PasswordPolicy" database table, with each column mapped to a property of this class.
047     *
048     * <p>
049     * This implementation and its corresponding interface {@link com.liferay.portal.model.PasswordPolicyModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link PasswordPolicyImpl}.
050     * </p>
051     *
052     * @author Brian Wing Shun Chan
053     * @see PasswordPolicyImpl
054     * @see com.liferay.portal.model.PasswordPolicy
055     * @see com.liferay.portal.model.PasswordPolicyModel
056     * @generated
057     */
058    @JSON(strict = true)
059    public class PasswordPolicyModelImpl extends BaseModelImpl<PasswordPolicy>
060            implements PasswordPolicyModel {
061            /*
062             * NOTE FOR DEVELOPERS:
063             *
064             * Never modify or reference this class directly. All methods that expect a password policy model instance should use the {@link com.liferay.portal.model.PasswordPolicy} interface instead.
065             */
066            public static final String TABLE_NAME = "PasswordPolicy";
067            public static final Object[][] TABLE_COLUMNS = {
068                            { "uuid_", Types.VARCHAR },
069                            { "passwordPolicyId", Types.BIGINT },
070                            { "companyId", Types.BIGINT },
071                            { "userId", Types.BIGINT },
072                            { "userName", Types.VARCHAR },
073                            { "createDate", Types.TIMESTAMP },
074                            { "modifiedDate", Types.TIMESTAMP },
075                            { "defaultPolicy", Types.BOOLEAN },
076                            { "name", Types.VARCHAR },
077                            { "description", Types.VARCHAR },
078                            { "changeable", Types.BOOLEAN },
079                            { "changeRequired", Types.BOOLEAN },
080                            { "minAge", Types.BIGINT },
081                            { "checkSyntax", Types.BOOLEAN },
082                            { "allowDictionaryWords", Types.BOOLEAN },
083                            { "minAlphanumeric", Types.INTEGER },
084                            { "minLength", Types.INTEGER },
085                            { "minLowerCase", Types.INTEGER },
086                            { "minNumbers", Types.INTEGER },
087                            { "minSymbols", Types.INTEGER },
088                            { "minUpperCase", Types.INTEGER },
089                            { "regex", Types.VARCHAR },
090                            { "history", Types.BOOLEAN },
091                            { "historyCount", Types.INTEGER },
092                            { "expireable", Types.BOOLEAN },
093                            { "maxAge", Types.BIGINT },
094                            { "warningTime", Types.BIGINT },
095                            { "graceLimit", Types.INTEGER },
096                            { "lockout", Types.BOOLEAN },
097                            { "maxFailure", Types.INTEGER },
098                            { "lockoutDuration", Types.BIGINT },
099                            { "requireUnlock", Types.BOOLEAN },
100                            { "resetFailureCount", Types.BIGINT },
101                            { "resetTicketMaxAge", Types.BIGINT }
102                    };
103            public static final String TABLE_SQL_CREATE = "create table PasswordPolicy (uuid_ VARCHAR(75) null,passwordPolicyId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,defaultPolicy BOOLEAN,name VARCHAR(75) null,description STRING null,changeable BOOLEAN,changeRequired BOOLEAN,minAge LONG,checkSyntax BOOLEAN,allowDictionaryWords BOOLEAN,minAlphanumeric INTEGER,minLength INTEGER,minLowerCase INTEGER,minNumbers INTEGER,minSymbols INTEGER,minUpperCase INTEGER,regex VARCHAR(75) null,history BOOLEAN,historyCount INTEGER,expireable BOOLEAN,maxAge LONG,warningTime LONG,graceLimit INTEGER,lockout BOOLEAN,maxFailure INTEGER,lockoutDuration LONG,requireUnlock BOOLEAN,resetFailureCount LONG,resetTicketMaxAge LONG)";
104            public static final String TABLE_SQL_DROP = "drop table PasswordPolicy";
105            public static final String ORDER_BY_JPQL = " ORDER BY passwordPolicy.passwordPolicyId ASC";
106            public static final String ORDER_BY_SQL = " ORDER BY PasswordPolicy.passwordPolicyId ASC";
107            public static final String DATA_SOURCE = "liferayDataSource";
108            public static final String SESSION_FACTORY = "liferaySessionFactory";
109            public static final String TX_MANAGER = "liferayTransactionManager";
110            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
111                                    "value.object.entity.cache.enabled.com.liferay.portal.model.PasswordPolicy"),
112                            true);
113            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
114                                    "value.object.finder.cache.enabled.com.liferay.portal.model.PasswordPolicy"),
115                            true);
116            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
117                                    "value.object.column.bitmask.enabled.com.liferay.portal.model.PasswordPolicy"),
118                            true);
119            public static long COMPANYID_COLUMN_BITMASK = 1L;
120            public static long DEFAULTPOLICY_COLUMN_BITMASK = 2L;
121            public static long NAME_COLUMN_BITMASK = 4L;
122            public static long UUID_COLUMN_BITMASK = 8L;
123            public static long PASSWORDPOLICYID_COLUMN_BITMASK = 16L;
124    
125            /**
126             * Converts the soap model instance into a normal model instance.
127             *
128             * @param soapModel the soap model instance to convert
129             * @return the normal model instance
130             */
131            public static PasswordPolicy toModel(PasswordPolicySoap soapModel) {
132                    if (soapModel == null) {
133                            return null;
134                    }
135    
136                    PasswordPolicy model = new PasswordPolicyImpl();
137    
138                    model.setUuid(soapModel.getUuid());
139                    model.setPasswordPolicyId(soapModel.getPasswordPolicyId());
140                    model.setCompanyId(soapModel.getCompanyId());
141                    model.setUserId(soapModel.getUserId());
142                    model.setUserName(soapModel.getUserName());
143                    model.setCreateDate(soapModel.getCreateDate());
144                    model.setModifiedDate(soapModel.getModifiedDate());
145                    model.setDefaultPolicy(soapModel.getDefaultPolicy());
146                    model.setName(soapModel.getName());
147                    model.setDescription(soapModel.getDescription());
148                    model.setChangeable(soapModel.getChangeable());
149                    model.setChangeRequired(soapModel.getChangeRequired());
150                    model.setMinAge(soapModel.getMinAge());
151                    model.setCheckSyntax(soapModel.getCheckSyntax());
152                    model.setAllowDictionaryWords(soapModel.getAllowDictionaryWords());
153                    model.setMinAlphanumeric(soapModel.getMinAlphanumeric());
154                    model.setMinLength(soapModel.getMinLength());
155                    model.setMinLowerCase(soapModel.getMinLowerCase());
156                    model.setMinNumbers(soapModel.getMinNumbers());
157                    model.setMinSymbols(soapModel.getMinSymbols());
158                    model.setMinUpperCase(soapModel.getMinUpperCase());
159                    model.setRegex(soapModel.getRegex());
160                    model.setHistory(soapModel.getHistory());
161                    model.setHistoryCount(soapModel.getHistoryCount());
162                    model.setExpireable(soapModel.getExpireable());
163                    model.setMaxAge(soapModel.getMaxAge());
164                    model.setWarningTime(soapModel.getWarningTime());
165                    model.setGraceLimit(soapModel.getGraceLimit());
166                    model.setLockout(soapModel.getLockout());
167                    model.setMaxFailure(soapModel.getMaxFailure());
168                    model.setLockoutDuration(soapModel.getLockoutDuration());
169                    model.setRequireUnlock(soapModel.getRequireUnlock());
170                    model.setResetFailureCount(soapModel.getResetFailureCount());
171                    model.setResetTicketMaxAge(soapModel.getResetTicketMaxAge());
172    
173                    return model;
174            }
175    
176            /**
177             * Converts the soap model instances into normal model instances.
178             *
179             * @param soapModels the soap model instances to convert
180             * @return the normal model instances
181             */
182            public static List<PasswordPolicy> toModels(PasswordPolicySoap[] soapModels) {
183                    if (soapModels == null) {
184                            return null;
185                    }
186    
187                    List<PasswordPolicy> models = new ArrayList<PasswordPolicy>(soapModels.length);
188    
189                    for (PasswordPolicySoap soapModel : soapModels) {
190                            models.add(toModel(soapModel));
191                    }
192    
193                    return models;
194            }
195    
196            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
197                                    "lock.expiration.time.com.liferay.portal.model.PasswordPolicy"));
198    
199            public PasswordPolicyModelImpl() {
200            }
201    
202            @Override
203            public long getPrimaryKey() {
204                    return _passwordPolicyId;
205            }
206    
207            @Override
208            public void setPrimaryKey(long primaryKey) {
209                    setPasswordPolicyId(primaryKey);
210            }
211    
212            @Override
213            public Serializable getPrimaryKeyObj() {
214                    return _passwordPolicyId;
215            }
216    
217            @Override
218            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
219                    setPrimaryKey(((Long)primaryKeyObj).longValue());
220            }
221    
222            @Override
223            public Class<?> getModelClass() {
224                    return PasswordPolicy.class;
225            }
226    
227            @Override
228            public String getModelClassName() {
229                    return PasswordPolicy.class.getName();
230            }
231    
232            @Override
233            public Map<String, Object> getModelAttributes() {
234                    Map<String, Object> attributes = new HashMap<String, Object>();
235    
236                    attributes.put("uuid", getUuid());
237                    attributes.put("passwordPolicyId", getPasswordPolicyId());
238                    attributes.put("companyId", getCompanyId());
239                    attributes.put("userId", getUserId());
240                    attributes.put("userName", getUserName());
241                    attributes.put("createDate", getCreateDate());
242                    attributes.put("modifiedDate", getModifiedDate());
243                    attributes.put("defaultPolicy", getDefaultPolicy());
244                    attributes.put("name", getName());
245                    attributes.put("description", getDescription());
246                    attributes.put("changeable", getChangeable());
247                    attributes.put("changeRequired", getChangeRequired());
248                    attributes.put("minAge", getMinAge());
249                    attributes.put("checkSyntax", getCheckSyntax());
250                    attributes.put("allowDictionaryWords", getAllowDictionaryWords());
251                    attributes.put("minAlphanumeric", getMinAlphanumeric());
252                    attributes.put("minLength", getMinLength());
253                    attributes.put("minLowerCase", getMinLowerCase());
254                    attributes.put("minNumbers", getMinNumbers());
255                    attributes.put("minSymbols", getMinSymbols());
256                    attributes.put("minUpperCase", getMinUpperCase());
257                    attributes.put("regex", getRegex());
258                    attributes.put("history", getHistory());
259                    attributes.put("historyCount", getHistoryCount());
260                    attributes.put("expireable", getExpireable());
261                    attributes.put("maxAge", getMaxAge());
262                    attributes.put("warningTime", getWarningTime());
263                    attributes.put("graceLimit", getGraceLimit());
264                    attributes.put("lockout", getLockout());
265                    attributes.put("maxFailure", getMaxFailure());
266                    attributes.put("lockoutDuration", getLockoutDuration());
267                    attributes.put("requireUnlock", getRequireUnlock());
268                    attributes.put("resetFailureCount", getResetFailureCount());
269                    attributes.put("resetTicketMaxAge", getResetTicketMaxAge());
270    
271                    return attributes;
272            }
273    
274            @Override
275            public void setModelAttributes(Map<String, Object> attributes) {
276                    String uuid = (String)attributes.get("uuid");
277    
278                    if (uuid != null) {
279                            setUuid(uuid);
280                    }
281    
282                    Long passwordPolicyId = (Long)attributes.get("passwordPolicyId");
283    
284                    if (passwordPolicyId != null) {
285                            setPasswordPolicyId(passwordPolicyId);
286                    }
287    
288                    Long companyId = (Long)attributes.get("companyId");
289    
290                    if (companyId != null) {
291                            setCompanyId(companyId);
292                    }
293    
294                    Long userId = (Long)attributes.get("userId");
295    
296                    if (userId != null) {
297                            setUserId(userId);
298                    }
299    
300                    String userName = (String)attributes.get("userName");
301    
302                    if (userName != null) {
303                            setUserName(userName);
304                    }
305    
306                    Date createDate = (Date)attributes.get("createDate");
307    
308                    if (createDate != null) {
309                            setCreateDate(createDate);
310                    }
311    
312                    Date modifiedDate = (Date)attributes.get("modifiedDate");
313    
314                    if (modifiedDate != null) {
315                            setModifiedDate(modifiedDate);
316                    }
317    
318                    Boolean defaultPolicy = (Boolean)attributes.get("defaultPolicy");
319    
320                    if (defaultPolicy != null) {
321                            setDefaultPolicy(defaultPolicy);
322                    }
323    
324                    String name = (String)attributes.get("name");
325    
326                    if (name != null) {
327                            setName(name);
328                    }
329    
330                    String description = (String)attributes.get("description");
331    
332                    if (description != null) {
333                            setDescription(description);
334                    }
335    
336                    Boolean changeable = (Boolean)attributes.get("changeable");
337    
338                    if (changeable != null) {
339                            setChangeable(changeable);
340                    }
341    
342                    Boolean changeRequired = (Boolean)attributes.get("changeRequired");
343    
344                    if (changeRequired != null) {
345                            setChangeRequired(changeRequired);
346                    }
347    
348                    Long minAge = (Long)attributes.get("minAge");
349    
350                    if (minAge != null) {
351                            setMinAge(minAge);
352                    }
353    
354                    Boolean checkSyntax = (Boolean)attributes.get("checkSyntax");
355    
356                    if (checkSyntax != null) {
357                            setCheckSyntax(checkSyntax);
358                    }
359    
360                    Boolean allowDictionaryWords = (Boolean)attributes.get(
361                                    "allowDictionaryWords");
362    
363                    if (allowDictionaryWords != null) {
364                            setAllowDictionaryWords(allowDictionaryWords);
365                    }
366    
367                    Integer minAlphanumeric = (Integer)attributes.get("minAlphanumeric");
368    
369                    if (minAlphanumeric != null) {
370                            setMinAlphanumeric(minAlphanumeric);
371                    }
372    
373                    Integer minLength = (Integer)attributes.get("minLength");
374    
375                    if (minLength != null) {
376                            setMinLength(minLength);
377                    }
378    
379                    Integer minLowerCase = (Integer)attributes.get("minLowerCase");
380    
381                    if (minLowerCase != null) {
382                            setMinLowerCase(minLowerCase);
383                    }
384    
385                    Integer minNumbers = (Integer)attributes.get("minNumbers");
386    
387                    if (minNumbers != null) {
388                            setMinNumbers(minNumbers);
389                    }
390    
391                    Integer minSymbols = (Integer)attributes.get("minSymbols");
392    
393                    if (minSymbols != null) {
394                            setMinSymbols(minSymbols);
395                    }
396    
397                    Integer minUpperCase = (Integer)attributes.get("minUpperCase");
398    
399                    if (minUpperCase != null) {
400                            setMinUpperCase(minUpperCase);
401                    }
402    
403                    String regex = (String)attributes.get("regex");
404    
405                    if (regex != null) {
406                            setRegex(regex);
407                    }
408    
409                    Boolean history = (Boolean)attributes.get("history");
410    
411                    if (history != null) {
412                            setHistory(history);
413                    }
414    
415                    Integer historyCount = (Integer)attributes.get("historyCount");
416    
417                    if (historyCount != null) {
418                            setHistoryCount(historyCount);
419                    }
420    
421                    Boolean expireable = (Boolean)attributes.get("expireable");
422    
423                    if (expireable != null) {
424                            setExpireable(expireable);
425                    }
426    
427                    Long maxAge = (Long)attributes.get("maxAge");
428    
429                    if (maxAge != null) {
430                            setMaxAge(maxAge);
431                    }
432    
433                    Long warningTime = (Long)attributes.get("warningTime");
434    
435                    if (warningTime != null) {
436                            setWarningTime(warningTime);
437                    }
438    
439                    Integer graceLimit = (Integer)attributes.get("graceLimit");
440    
441                    if (graceLimit != null) {
442                            setGraceLimit(graceLimit);
443                    }
444    
445                    Boolean lockout = (Boolean)attributes.get("lockout");
446    
447                    if (lockout != null) {
448                            setLockout(lockout);
449                    }
450    
451                    Integer maxFailure = (Integer)attributes.get("maxFailure");
452    
453                    if (maxFailure != null) {
454                            setMaxFailure(maxFailure);
455                    }
456    
457                    Long lockoutDuration = (Long)attributes.get("lockoutDuration");
458    
459                    if (lockoutDuration != null) {
460                            setLockoutDuration(lockoutDuration);
461                    }
462    
463                    Boolean requireUnlock = (Boolean)attributes.get("requireUnlock");
464    
465                    if (requireUnlock != null) {
466                            setRequireUnlock(requireUnlock);
467                    }
468    
469                    Long resetFailureCount = (Long)attributes.get("resetFailureCount");
470    
471                    if (resetFailureCount != null) {
472                            setResetFailureCount(resetFailureCount);
473                    }
474    
475                    Long resetTicketMaxAge = (Long)attributes.get("resetTicketMaxAge");
476    
477                    if (resetTicketMaxAge != null) {
478                            setResetTicketMaxAge(resetTicketMaxAge);
479                    }
480            }
481    
482            @JSON
483            @Override
484            public String getUuid() {
485                    if (_uuid == null) {
486                            return StringPool.BLANK;
487                    }
488                    else {
489                            return _uuid;
490                    }
491            }
492    
493            @Override
494            public void setUuid(String uuid) {
495                    if (_originalUuid == null) {
496                            _originalUuid = _uuid;
497                    }
498    
499                    _uuid = uuid;
500            }
501    
502            public String getOriginalUuid() {
503                    return GetterUtil.getString(_originalUuid);
504            }
505    
506            @JSON
507            @Override
508            public long getPasswordPolicyId() {
509                    return _passwordPolicyId;
510            }
511    
512            @Override
513            public void setPasswordPolicyId(long passwordPolicyId) {
514                    _passwordPolicyId = passwordPolicyId;
515            }
516    
517            @JSON
518            @Override
519            public long getCompanyId() {
520                    return _companyId;
521            }
522    
523            @Override
524            public void setCompanyId(long companyId) {
525                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
526    
527                    if (!_setOriginalCompanyId) {
528                            _setOriginalCompanyId = true;
529    
530                            _originalCompanyId = _companyId;
531                    }
532    
533                    _companyId = companyId;
534            }
535    
536            public long getOriginalCompanyId() {
537                    return _originalCompanyId;
538            }
539    
540            @JSON
541            @Override
542            public long getUserId() {
543                    return _userId;
544            }
545    
546            @Override
547            public void setUserId(long userId) {
548                    _userId = userId;
549            }
550    
551            @Override
552            public String getUserUuid() throws SystemException {
553                    return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
554            }
555    
556            @Override
557            public void setUserUuid(String userUuid) {
558                    _userUuid = userUuid;
559            }
560    
561            @JSON
562            @Override
563            public String getUserName() {
564                    if (_userName == null) {
565                            return StringPool.BLANK;
566                    }
567                    else {
568                            return _userName;
569                    }
570            }
571    
572            @Override
573            public void setUserName(String userName) {
574                    _userName = userName;
575            }
576    
577            @JSON
578            @Override
579            public Date getCreateDate() {
580                    return _createDate;
581            }
582    
583            @Override
584            public void setCreateDate(Date createDate) {
585                    _createDate = createDate;
586            }
587    
588            @JSON
589            @Override
590            public Date getModifiedDate() {
591                    return _modifiedDate;
592            }
593    
594            @Override
595            public void setModifiedDate(Date modifiedDate) {
596                    _modifiedDate = modifiedDate;
597            }
598    
599            @JSON
600            @Override
601            public boolean getDefaultPolicy() {
602                    return _defaultPolicy;
603            }
604    
605            @Override
606            public boolean isDefaultPolicy() {
607                    return _defaultPolicy;
608            }
609    
610            @Override
611            public void setDefaultPolicy(boolean defaultPolicy) {
612                    _columnBitmask |= DEFAULTPOLICY_COLUMN_BITMASK;
613    
614                    if (!_setOriginalDefaultPolicy) {
615                            _setOriginalDefaultPolicy = true;
616    
617                            _originalDefaultPolicy = _defaultPolicy;
618                    }
619    
620                    _defaultPolicy = defaultPolicy;
621            }
622    
623            public boolean getOriginalDefaultPolicy() {
624                    return _originalDefaultPolicy;
625            }
626    
627            @JSON
628            @Override
629            public String getName() {
630                    if (_name == null) {
631                            return StringPool.BLANK;
632                    }
633                    else {
634                            return _name;
635                    }
636            }
637    
638            @Override
639            public void setName(String name) {
640                    _columnBitmask |= NAME_COLUMN_BITMASK;
641    
642                    if (_originalName == null) {
643                            _originalName = _name;
644                    }
645    
646                    _name = name;
647            }
648    
649            public String getOriginalName() {
650                    return GetterUtil.getString(_originalName);
651            }
652    
653            @JSON
654            @Override
655            public String getDescription() {
656                    if (_description == null) {
657                            return StringPool.BLANK;
658                    }
659                    else {
660                            return _description;
661                    }
662            }
663    
664            @Override
665            public void setDescription(String description) {
666                    _description = description;
667            }
668    
669            @JSON
670            @Override
671            public boolean getChangeable() {
672                    return _changeable;
673            }
674    
675            @Override
676            public boolean isChangeable() {
677                    return _changeable;
678            }
679    
680            @Override
681            public void setChangeable(boolean changeable) {
682                    _changeable = changeable;
683            }
684    
685            @JSON
686            @Override
687            public boolean getChangeRequired() {
688                    return _changeRequired;
689            }
690    
691            @Override
692            public boolean isChangeRequired() {
693                    return _changeRequired;
694            }
695    
696            @Override
697            public void setChangeRequired(boolean changeRequired) {
698                    _changeRequired = changeRequired;
699            }
700    
701            @JSON
702            @Override
703            public long getMinAge() {
704                    return _minAge;
705            }
706    
707            @Override
708            public void setMinAge(long minAge) {
709                    _minAge = minAge;
710            }
711    
712            @JSON
713            @Override
714            public boolean getCheckSyntax() {
715                    return _checkSyntax;
716            }
717    
718            @Override
719            public boolean isCheckSyntax() {
720                    return _checkSyntax;
721            }
722    
723            @Override
724            public void setCheckSyntax(boolean checkSyntax) {
725                    _checkSyntax = checkSyntax;
726            }
727    
728            @JSON
729            @Override
730            public boolean getAllowDictionaryWords() {
731                    return _allowDictionaryWords;
732            }
733    
734            @Override
735            public boolean isAllowDictionaryWords() {
736                    return _allowDictionaryWords;
737            }
738    
739            @Override
740            public void setAllowDictionaryWords(boolean allowDictionaryWords) {
741                    _allowDictionaryWords = allowDictionaryWords;
742            }
743    
744            @JSON
745            @Override
746            public int getMinAlphanumeric() {
747                    return _minAlphanumeric;
748            }
749    
750            @Override
751            public void setMinAlphanumeric(int minAlphanumeric) {
752                    _minAlphanumeric = minAlphanumeric;
753            }
754    
755            @JSON
756            @Override
757            public int getMinLength() {
758                    return _minLength;
759            }
760    
761            @Override
762            public void setMinLength(int minLength) {
763                    _minLength = minLength;
764            }
765    
766            @JSON
767            @Override
768            public int getMinLowerCase() {
769                    return _minLowerCase;
770            }
771    
772            @Override
773            public void setMinLowerCase(int minLowerCase) {
774                    _minLowerCase = minLowerCase;
775            }
776    
777            @JSON
778            @Override
779            public int getMinNumbers() {
780                    return _minNumbers;
781            }
782    
783            @Override
784            public void setMinNumbers(int minNumbers) {
785                    _minNumbers = minNumbers;
786            }
787    
788            @JSON
789            @Override
790            public int getMinSymbols() {
791                    return _minSymbols;
792            }
793    
794            @Override
795            public void setMinSymbols(int minSymbols) {
796                    _minSymbols = minSymbols;
797            }
798    
799            @JSON
800            @Override
801            public int getMinUpperCase() {
802                    return _minUpperCase;
803            }
804    
805            @Override
806            public void setMinUpperCase(int minUpperCase) {
807                    _minUpperCase = minUpperCase;
808            }
809    
810            @JSON
811            @Override
812            public String getRegex() {
813                    if (_regex == null) {
814                            return StringPool.BLANK;
815                    }
816                    else {
817                            return _regex;
818                    }
819            }
820    
821            @Override
822            public void setRegex(String regex) {
823                    _regex = regex;
824            }
825    
826            @JSON
827            @Override
828            public boolean getHistory() {
829                    return _history;
830            }
831    
832            @Override
833            public boolean isHistory() {
834                    return _history;
835            }
836    
837            @Override
838            public void setHistory(boolean history) {
839                    _history = history;
840            }
841    
842            @JSON
843            @Override
844            public int getHistoryCount() {
845                    return _historyCount;
846            }
847    
848            @Override
849            public void setHistoryCount(int historyCount) {
850                    _historyCount = historyCount;
851            }
852    
853            @JSON
854            @Override
855            public boolean getExpireable() {
856                    return _expireable;
857            }
858    
859            @Override
860            public boolean isExpireable() {
861                    return _expireable;
862            }
863    
864            @Override
865            public void setExpireable(boolean expireable) {
866                    _expireable = expireable;
867            }
868    
869            @JSON
870            @Override
871            public long getMaxAge() {
872                    return _maxAge;
873            }
874    
875            @Override
876            public void setMaxAge(long maxAge) {
877                    _maxAge = maxAge;
878            }
879    
880            @JSON
881            @Override
882            public long getWarningTime() {
883                    return _warningTime;
884            }
885    
886            @Override
887            public void setWarningTime(long warningTime) {
888                    _warningTime = warningTime;
889            }
890    
891            @JSON
892            @Override
893            public int getGraceLimit() {
894                    return _graceLimit;
895            }
896    
897            @Override
898            public void setGraceLimit(int graceLimit) {
899                    _graceLimit = graceLimit;
900            }
901    
902            @JSON
903            @Override
904            public boolean getLockout() {
905                    return _lockout;
906            }
907    
908            @Override
909            public boolean isLockout() {
910                    return _lockout;
911            }
912    
913            @Override
914            public void setLockout(boolean lockout) {
915                    _lockout = lockout;
916            }
917    
918            @JSON
919            @Override
920            public int getMaxFailure() {
921                    return _maxFailure;
922            }
923    
924            @Override
925            public void setMaxFailure(int maxFailure) {
926                    _maxFailure = maxFailure;
927            }
928    
929            @JSON
930            @Override
931            public long getLockoutDuration() {
932                    return _lockoutDuration;
933            }
934    
935            @Override
936            public void setLockoutDuration(long lockoutDuration) {
937                    _lockoutDuration = lockoutDuration;
938            }
939    
940            @JSON
941            @Override
942            public boolean getRequireUnlock() {
943                    return _requireUnlock;
944            }
945    
946            @Override
947            public boolean isRequireUnlock() {
948                    return _requireUnlock;
949            }
950    
951            @Override
952            public void setRequireUnlock(boolean requireUnlock) {
953                    _requireUnlock = requireUnlock;
954            }
955    
956            @JSON
957            @Override
958            public long getResetFailureCount() {
959                    return _resetFailureCount;
960            }
961    
962            @Override
963            public void setResetFailureCount(long resetFailureCount) {
964                    _resetFailureCount = resetFailureCount;
965            }
966    
967            @JSON
968            @Override
969            public long getResetTicketMaxAge() {
970                    return _resetTicketMaxAge;
971            }
972    
973            @Override
974            public void setResetTicketMaxAge(long resetTicketMaxAge) {
975                    _resetTicketMaxAge = resetTicketMaxAge;
976            }
977    
978            @Override
979            public StagedModelType getStagedModelType() {
980                    return new StagedModelType(PortalUtil.getClassNameId(
981                                    PasswordPolicy.class.getName()));
982            }
983    
984            public long getColumnBitmask() {
985                    return _columnBitmask;
986            }
987    
988            @Override
989            public ExpandoBridge getExpandoBridge() {
990                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
991                            PasswordPolicy.class.getName(), getPrimaryKey());
992            }
993    
994            @Override
995            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
996                    ExpandoBridge expandoBridge = getExpandoBridge();
997    
998                    expandoBridge.setAttributes(serviceContext);
999            }
1000    
1001            @Override
1002            public PasswordPolicy toEscapedModel() {
1003                    if (_escapedModel == null) {
1004                            _escapedModel = (PasswordPolicy)ProxyUtil.newProxyInstance(_classLoader,
1005                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
1006                    }
1007    
1008                    return _escapedModel;
1009            }
1010    
1011            @Override
1012            public Object clone() {
1013                    PasswordPolicyImpl passwordPolicyImpl = new PasswordPolicyImpl();
1014    
1015                    passwordPolicyImpl.setUuid(getUuid());
1016                    passwordPolicyImpl.setPasswordPolicyId(getPasswordPolicyId());
1017                    passwordPolicyImpl.setCompanyId(getCompanyId());
1018                    passwordPolicyImpl.setUserId(getUserId());
1019                    passwordPolicyImpl.setUserName(getUserName());
1020                    passwordPolicyImpl.setCreateDate(getCreateDate());
1021                    passwordPolicyImpl.setModifiedDate(getModifiedDate());
1022                    passwordPolicyImpl.setDefaultPolicy(getDefaultPolicy());
1023                    passwordPolicyImpl.setName(getName());
1024                    passwordPolicyImpl.setDescription(getDescription());
1025                    passwordPolicyImpl.setChangeable(getChangeable());
1026                    passwordPolicyImpl.setChangeRequired(getChangeRequired());
1027                    passwordPolicyImpl.setMinAge(getMinAge());
1028                    passwordPolicyImpl.setCheckSyntax(getCheckSyntax());
1029                    passwordPolicyImpl.setAllowDictionaryWords(getAllowDictionaryWords());
1030                    passwordPolicyImpl.setMinAlphanumeric(getMinAlphanumeric());
1031                    passwordPolicyImpl.setMinLength(getMinLength());
1032                    passwordPolicyImpl.setMinLowerCase(getMinLowerCase());
1033                    passwordPolicyImpl.setMinNumbers(getMinNumbers());
1034                    passwordPolicyImpl.setMinSymbols(getMinSymbols());
1035                    passwordPolicyImpl.setMinUpperCase(getMinUpperCase());
1036                    passwordPolicyImpl.setRegex(getRegex());
1037                    passwordPolicyImpl.setHistory(getHistory());
1038                    passwordPolicyImpl.setHistoryCount(getHistoryCount());
1039                    passwordPolicyImpl.setExpireable(getExpireable());
1040                    passwordPolicyImpl.setMaxAge(getMaxAge());
1041                    passwordPolicyImpl.setWarningTime(getWarningTime());
1042                    passwordPolicyImpl.setGraceLimit(getGraceLimit());
1043                    passwordPolicyImpl.setLockout(getLockout());
1044                    passwordPolicyImpl.setMaxFailure(getMaxFailure());
1045                    passwordPolicyImpl.setLockoutDuration(getLockoutDuration());
1046                    passwordPolicyImpl.setRequireUnlock(getRequireUnlock());
1047                    passwordPolicyImpl.setResetFailureCount(getResetFailureCount());
1048                    passwordPolicyImpl.setResetTicketMaxAge(getResetTicketMaxAge());
1049    
1050                    passwordPolicyImpl.resetOriginalValues();
1051    
1052                    return passwordPolicyImpl;
1053            }
1054    
1055            @Override
1056            public int compareTo(PasswordPolicy passwordPolicy) {
1057                    long primaryKey = passwordPolicy.getPrimaryKey();
1058    
1059                    if (getPrimaryKey() < primaryKey) {
1060                            return -1;
1061                    }
1062                    else if (getPrimaryKey() > primaryKey) {
1063                            return 1;
1064                    }
1065                    else {
1066                            return 0;
1067                    }
1068            }
1069    
1070            @Override
1071            public boolean equals(Object obj) {
1072                    if (this == obj) {
1073                            return true;
1074                    }
1075    
1076                    if (!(obj instanceof PasswordPolicy)) {
1077                            return false;
1078                    }
1079    
1080                    PasswordPolicy passwordPolicy = (PasswordPolicy)obj;
1081    
1082                    long primaryKey = passwordPolicy.getPrimaryKey();
1083    
1084                    if (getPrimaryKey() == primaryKey) {
1085                            return true;
1086                    }
1087                    else {
1088                            return false;
1089                    }
1090            }
1091    
1092            @Override
1093            public int hashCode() {
1094                    return (int)getPrimaryKey();
1095            }
1096    
1097            @Override
1098            public void resetOriginalValues() {
1099                    PasswordPolicyModelImpl passwordPolicyModelImpl = this;
1100    
1101                    passwordPolicyModelImpl._originalUuid = passwordPolicyModelImpl._uuid;
1102    
1103                    passwordPolicyModelImpl._originalCompanyId = passwordPolicyModelImpl._companyId;
1104    
1105                    passwordPolicyModelImpl._setOriginalCompanyId = false;
1106    
1107                    passwordPolicyModelImpl._originalDefaultPolicy = passwordPolicyModelImpl._defaultPolicy;
1108    
1109                    passwordPolicyModelImpl._setOriginalDefaultPolicy = false;
1110    
1111                    passwordPolicyModelImpl._originalName = passwordPolicyModelImpl._name;
1112    
1113                    passwordPolicyModelImpl._columnBitmask = 0;
1114            }
1115    
1116            @Override
1117            public CacheModel<PasswordPolicy> toCacheModel() {
1118                    PasswordPolicyCacheModel passwordPolicyCacheModel = new PasswordPolicyCacheModel();
1119    
1120                    passwordPolicyCacheModel.uuid = getUuid();
1121    
1122                    String uuid = passwordPolicyCacheModel.uuid;
1123    
1124                    if ((uuid != null) && (uuid.length() == 0)) {
1125                            passwordPolicyCacheModel.uuid = null;
1126                    }
1127    
1128                    passwordPolicyCacheModel.passwordPolicyId = getPasswordPolicyId();
1129    
1130                    passwordPolicyCacheModel.companyId = getCompanyId();
1131    
1132                    passwordPolicyCacheModel.userId = getUserId();
1133    
1134                    passwordPolicyCacheModel.userName = getUserName();
1135    
1136                    String userName = passwordPolicyCacheModel.userName;
1137    
1138                    if ((userName != null) && (userName.length() == 0)) {
1139                            passwordPolicyCacheModel.userName = null;
1140                    }
1141    
1142                    Date createDate = getCreateDate();
1143    
1144                    if (createDate != null) {
1145                            passwordPolicyCacheModel.createDate = createDate.getTime();
1146                    }
1147                    else {
1148                            passwordPolicyCacheModel.createDate = Long.MIN_VALUE;
1149                    }
1150    
1151                    Date modifiedDate = getModifiedDate();
1152    
1153                    if (modifiedDate != null) {
1154                            passwordPolicyCacheModel.modifiedDate = modifiedDate.getTime();
1155                    }
1156                    else {
1157                            passwordPolicyCacheModel.modifiedDate = Long.MIN_VALUE;
1158                    }
1159    
1160                    passwordPolicyCacheModel.defaultPolicy = getDefaultPolicy();
1161    
1162                    passwordPolicyCacheModel.name = getName();
1163    
1164                    String name = passwordPolicyCacheModel.name;
1165    
1166                    if ((name != null) && (name.length() == 0)) {
1167                            passwordPolicyCacheModel.name = null;
1168                    }
1169    
1170                    passwordPolicyCacheModel.description = getDescription();
1171    
1172                    String description = passwordPolicyCacheModel.description;
1173    
1174                    if ((description != null) && (description.length() == 0)) {
1175                            passwordPolicyCacheModel.description = null;
1176                    }
1177    
1178                    passwordPolicyCacheModel.changeable = getChangeable();
1179    
1180                    passwordPolicyCacheModel.changeRequired = getChangeRequired();
1181    
1182                    passwordPolicyCacheModel.minAge = getMinAge();
1183    
1184                    passwordPolicyCacheModel.checkSyntax = getCheckSyntax();
1185    
1186                    passwordPolicyCacheModel.allowDictionaryWords = getAllowDictionaryWords();
1187    
1188                    passwordPolicyCacheModel.minAlphanumeric = getMinAlphanumeric();
1189    
1190                    passwordPolicyCacheModel.minLength = getMinLength();
1191    
1192                    passwordPolicyCacheModel.minLowerCase = getMinLowerCase();
1193    
1194                    passwordPolicyCacheModel.minNumbers = getMinNumbers();
1195    
1196                    passwordPolicyCacheModel.minSymbols = getMinSymbols();
1197    
1198                    passwordPolicyCacheModel.minUpperCase = getMinUpperCase();
1199    
1200                    passwordPolicyCacheModel.regex = getRegex();
1201    
1202                    String regex = passwordPolicyCacheModel.regex;
1203    
1204                    if ((regex != null) && (regex.length() == 0)) {
1205                            passwordPolicyCacheModel.regex = null;
1206                    }
1207    
1208                    passwordPolicyCacheModel.history = getHistory();
1209    
1210                    passwordPolicyCacheModel.historyCount = getHistoryCount();
1211    
1212                    passwordPolicyCacheModel.expireable = getExpireable();
1213    
1214                    passwordPolicyCacheModel.maxAge = getMaxAge();
1215    
1216                    passwordPolicyCacheModel.warningTime = getWarningTime();
1217    
1218                    passwordPolicyCacheModel.graceLimit = getGraceLimit();
1219    
1220                    passwordPolicyCacheModel.lockout = getLockout();
1221    
1222                    passwordPolicyCacheModel.maxFailure = getMaxFailure();
1223    
1224                    passwordPolicyCacheModel.lockoutDuration = getLockoutDuration();
1225    
1226                    passwordPolicyCacheModel.requireUnlock = getRequireUnlock();
1227    
1228                    passwordPolicyCacheModel.resetFailureCount = getResetFailureCount();
1229    
1230                    passwordPolicyCacheModel.resetTicketMaxAge = getResetTicketMaxAge();
1231    
1232                    return passwordPolicyCacheModel;
1233            }
1234    
1235            @Override
1236            public String toString() {
1237                    StringBundler sb = new StringBundler(69);
1238    
1239                    sb.append("{uuid=");
1240                    sb.append(getUuid());
1241                    sb.append(", passwordPolicyId=");
1242                    sb.append(getPasswordPolicyId());
1243                    sb.append(", companyId=");
1244                    sb.append(getCompanyId());
1245                    sb.append(", userId=");
1246                    sb.append(getUserId());
1247                    sb.append(", userName=");
1248                    sb.append(getUserName());
1249                    sb.append(", createDate=");
1250                    sb.append(getCreateDate());
1251                    sb.append(", modifiedDate=");
1252                    sb.append(getModifiedDate());
1253                    sb.append(", defaultPolicy=");
1254                    sb.append(getDefaultPolicy());
1255                    sb.append(", name=");
1256                    sb.append(getName());
1257                    sb.append(", description=");
1258                    sb.append(getDescription());
1259                    sb.append(", changeable=");
1260                    sb.append(getChangeable());
1261                    sb.append(", changeRequired=");
1262                    sb.append(getChangeRequired());
1263                    sb.append(", minAge=");
1264                    sb.append(getMinAge());
1265                    sb.append(", checkSyntax=");
1266                    sb.append(getCheckSyntax());
1267                    sb.append(", allowDictionaryWords=");
1268                    sb.append(getAllowDictionaryWords());
1269                    sb.append(", minAlphanumeric=");
1270                    sb.append(getMinAlphanumeric());
1271                    sb.append(", minLength=");
1272                    sb.append(getMinLength());
1273                    sb.append(", minLowerCase=");
1274                    sb.append(getMinLowerCase());
1275                    sb.append(", minNumbers=");
1276                    sb.append(getMinNumbers());
1277                    sb.append(", minSymbols=");
1278                    sb.append(getMinSymbols());
1279                    sb.append(", minUpperCase=");
1280                    sb.append(getMinUpperCase());
1281                    sb.append(", regex=");
1282                    sb.append(getRegex());
1283                    sb.append(", history=");
1284                    sb.append(getHistory());
1285                    sb.append(", historyCount=");
1286                    sb.append(getHistoryCount());
1287                    sb.append(", expireable=");
1288                    sb.append(getExpireable());
1289                    sb.append(", maxAge=");
1290                    sb.append(getMaxAge());
1291                    sb.append(", warningTime=");
1292                    sb.append(getWarningTime());
1293                    sb.append(", graceLimit=");
1294                    sb.append(getGraceLimit());
1295                    sb.append(", lockout=");
1296                    sb.append(getLockout());
1297                    sb.append(", maxFailure=");
1298                    sb.append(getMaxFailure());
1299                    sb.append(", lockoutDuration=");
1300                    sb.append(getLockoutDuration());
1301                    sb.append(", requireUnlock=");
1302                    sb.append(getRequireUnlock());
1303                    sb.append(", resetFailureCount=");
1304                    sb.append(getResetFailureCount());
1305                    sb.append(", resetTicketMaxAge=");
1306                    sb.append(getResetTicketMaxAge());
1307                    sb.append("}");
1308    
1309                    return sb.toString();
1310            }
1311    
1312            @Override
1313            public String toXmlString() {
1314                    StringBundler sb = new StringBundler(106);
1315    
1316                    sb.append("<model><model-name>");
1317                    sb.append("com.liferay.portal.model.PasswordPolicy");
1318                    sb.append("</model-name>");
1319    
1320                    sb.append(
1321                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
1322                    sb.append(getUuid());
1323                    sb.append("]]></column-value></column>");
1324                    sb.append(
1325                            "<column><column-name>passwordPolicyId</column-name><column-value><![CDATA[");
1326                    sb.append(getPasswordPolicyId());
1327                    sb.append("]]></column-value></column>");
1328                    sb.append(
1329                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
1330                    sb.append(getCompanyId());
1331                    sb.append("]]></column-value></column>");
1332                    sb.append(
1333                            "<column><column-name>userId</column-name><column-value><![CDATA[");
1334                    sb.append(getUserId());
1335                    sb.append("]]></column-value></column>");
1336                    sb.append(
1337                            "<column><column-name>userName</column-name><column-value><![CDATA[");
1338                    sb.append(getUserName());
1339                    sb.append("]]></column-value></column>");
1340                    sb.append(
1341                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
1342                    sb.append(getCreateDate());
1343                    sb.append("]]></column-value></column>");
1344                    sb.append(
1345                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
1346                    sb.append(getModifiedDate());
1347                    sb.append("]]></column-value></column>");
1348                    sb.append(
1349                            "<column><column-name>defaultPolicy</column-name><column-value><![CDATA[");
1350                    sb.append(getDefaultPolicy());
1351                    sb.append("]]></column-value></column>");
1352                    sb.append(
1353                            "<column><column-name>name</column-name><column-value><![CDATA[");
1354                    sb.append(getName());
1355                    sb.append("]]></column-value></column>");
1356                    sb.append(
1357                            "<column><column-name>description</column-name><column-value><![CDATA[");
1358                    sb.append(getDescription());
1359                    sb.append("]]></column-value></column>");
1360                    sb.append(
1361                            "<column><column-name>changeable</column-name><column-value><![CDATA[");
1362                    sb.append(getChangeable());
1363                    sb.append("]]></column-value></column>");
1364                    sb.append(
1365                            "<column><column-name>changeRequired</column-name><column-value><![CDATA[");
1366                    sb.append(getChangeRequired());
1367                    sb.append("]]></column-value></column>");
1368                    sb.append(
1369                            "<column><column-name>minAge</column-name><column-value><![CDATA[");
1370                    sb.append(getMinAge());
1371                    sb.append("]]></column-value></column>");
1372                    sb.append(
1373                            "<column><column-name>checkSyntax</column-name><column-value><![CDATA[");
1374                    sb.append(getCheckSyntax());
1375                    sb.append("]]></column-value></column>");
1376                    sb.append(
1377                            "<column><column-name>allowDictionaryWords</column-name><column-value><![CDATA[");
1378                    sb.append(getAllowDictionaryWords());
1379                    sb.append("]]></column-value></column>");
1380                    sb.append(
1381                            "<column><column-name>minAlphanumeric</column-name><column-value><![CDATA[");
1382                    sb.append(getMinAlphanumeric());
1383                    sb.append("]]></column-value></column>");
1384                    sb.append(
1385                            "<column><column-name>minLength</column-name><column-value><![CDATA[");
1386                    sb.append(getMinLength());
1387                    sb.append("]]></column-value></column>");
1388                    sb.append(
1389                            "<column><column-name>minLowerCase</column-name><column-value><![CDATA[");
1390                    sb.append(getMinLowerCase());
1391                    sb.append("]]></column-value></column>");
1392                    sb.append(
1393                            "<column><column-name>minNumbers</column-name><column-value><![CDATA[");
1394                    sb.append(getMinNumbers());
1395                    sb.append("]]></column-value></column>");
1396                    sb.append(
1397                            "<column><column-name>minSymbols</column-name><column-value><![CDATA[");
1398                    sb.append(getMinSymbols());
1399                    sb.append("]]></column-value></column>");
1400                    sb.append(
1401                            "<column><column-name>minUpperCase</column-name><column-value><![CDATA[");
1402                    sb.append(getMinUpperCase());
1403                    sb.append("]]></column-value></column>");
1404                    sb.append(
1405                            "<column><column-name>regex</column-name><column-value><![CDATA[");
1406                    sb.append(getRegex());
1407                    sb.append("]]></column-value></column>");
1408                    sb.append(
1409                            "<column><column-name>history</column-name><column-value><![CDATA[");
1410                    sb.append(getHistory());
1411                    sb.append("]]></column-value></column>");
1412                    sb.append(
1413                            "<column><column-name>historyCount</column-name><column-value><![CDATA[");
1414                    sb.append(getHistoryCount());
1415                    sb.append("]]></column-value></column>");
1416                    sb.append(
1417                            "<column><column-name>expireable</column-name><column-value><![CDATA[");
1418                    sb.append(getExpireable());
1419                    sb.append("]]></column-value></column>");
1420                    sb.append(
1421                            "<column><column-name>maxAge</column-name><column-value><![CDATA[");
1422                    sb.append(getMaxAge());
1423                    sb.append("]]></column-value></column>");
1424                    sb.append(
1425                            "<column><column-name>warningTime</column-name><column-value><![CDATA[");
1426                    sb.append(getWarningTime());
1427                    sb.append("]]></column-value></column>");
1428                    sb.append(
1429                            "<column><column-name>graceLimit</column-name><column-value><![CDATA[");
1430                    sb.append(getGraceLimit());
1431                    sb.append("]]></column-value></column>");
1432                    sb.append(
1433                            "<column><column-name>lockout</column-name><column-value><![CDATA[");
1434                    sb.append(getLockout());
1435                    sb.append("]]></column-value></column>");
1436                    sb.append(
1437                            "<column><column-name>maxFailure</column-name><column-value><![CDATA[");
1438                    sb.append(getMaxFailure());
1439                    sb.append("]]></column-value></column>");
1440                    sb.append(
1441                            "<column><column-name>lockoutDuration</column-name><column-value><![CDATA[");
1442                    sb.append(getLockoutDuration());
1443                    sb.append("]]></column-value></column>");
1444                    sb.append(
1445                            "<column><column-name>requireUnlock</column-name><column-value><![CDATA[");
1446                    sb.append(getRequireUnlock());
1447                    sb.append("]]></column-value></column>");
1448                    sb.append(
1449                            "<column><column-name>resetFailureCount</column-name><column-value><![CDATA[");
1450                    sb.append(getResetFailureCount());
1451                    sb.append("]]></column-value></column>");
1452                    sb.append(
1453                            "<column><column-name>resetTicketMaxAge</column-name><column-value><![CDATA[");
1454                    sb.append(getResetTicketMaxAge());
1455                    sb.append("]]></column-value></column>");
1456    
1457                    sb.append("</model>");
1458    
1459                    return sb.toString();
1460            }
1461    
1462            private static ClassLoader _classLoader = PasswordPolicy.class.getClassLoader();
1463            private static Class<?>[] _escapedModelInterfaces = new Class[] {
1464                            PasswordPolicy.class
1465                    };
1466            private String _uuid;
1467            private String _originalUuid;
1468            private long _passwordPolicyId;
1469            private long _companyId;
1470            private long _originalCompanyId;
1471            private boolean _setOriginalCompanyId;
1472            private long _userId;
1473            private String _userUuid;
1474            private String _userName;
1475            private Date _createDate;
1476            private Date _modifiedDate;
1477            private boolean _defaultPolicy;
1478            private boolean _originalDefaultPolicy;
1479            private boolean _setOriginalDefaultPolicy;
1480            private String _name;
1481            private String _originalName;
1482            private String _description;
1483            private boolean _changeable;
1484            private boolean _changeRequired;
1485            private long _minAge;
1486            private boolean _checkSyntax;
1487            private boolean _allowDictionaryWords;
1488            private int _minAlphanumeric;
1489            private int _minLength;
1490            private int _minLowerCase;
1491            private int _minNumbers;
1492            private int _minSymbols;
1493            private int _minUpperCase;
1494            private String _regex;
1495            private boolean _history;
1496            private int _historyCount;
1497            private boolean _expireable;
1498            private long _maxAge;
1499            private long _warningTime;
1500            private int _graceLimit;
1501            private boolean _lockout;
1502            private int _maxFailure;
1503            private long _lockoutDuration;
1504            private boolean _requireUnlock;
1505            private long _resetFailureCount;
1506            private long _resetTicketMaxAge;
1507            private long _columnBitmask;
1508            private PasswordPolicy _escapedModel;
1509    }