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