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.util.GetterUtil;
023    import com.liferay.portal.kernel.util.ProxyUtil;
024    import com.liferay.portal.kernel.util.StringBundler;
025    import com.liferay.portal.kernel.util.StringPool;
026    import com.liferay.portal.model.CacheModel;
027    import com.liferay.portal.model.PasswordPolicy;
028    import com.liferay.portal.model.PasswordPolicyModel;
029    import com.liferay.portal.model.PasswordPolicySoap;
030    import com.liferay.portal.model.User;
031    import com.liferay.portal.service.ServiceContext;
032    import com.liferay.portal.service.UserLocalServiceUtil;
033    import com.liferay.portal.util.PortalUtil;
034    
035    import com.liferay.portlet.expando.model.ExpandoBridge;
036    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
037    import com.liferay.portlet.exportimport.lar.StagedModelType;
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 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 PasswordPolicy
059     * @see 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 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            public boolean hasSetModifiedDate() {
629                    return _setModifiedDate;
630            }
631    
632            @Override
633            public void setModifiedDate(Date modifiedDate) {
634                    _setModifiedDate = true;
635    
636                    _modifiedDate = modifiedDate;
637            }
638    
639            @JSON
640            @Override
641            public boolean getDefaultPolicy() {
642                    return _defaultPolicy;
643            }
644    
645            @Override
646            public boolean isDefaultPolicy() {
647                    return _defaultPolicy;
648            }
649    
650            @Override
651            public void setDefaultPolicy(boolean defaultPolicy) {
652                    _columnBitmask |= DEFAULTPOLICY_COLUMN_BITMASK;
653    
654                    if (!_setOriginalDefaultPolicy) {
655                            _setOriginalDefaultPolicy = true;
656    
657                            _originalDefaultPolicy = _defaultPolicy;
658                    }
659    
660                    _defaultPolicy = defaultPolicy;
661            }
662    
663            public boolean getOriginalDefaultPolicy() {
664                    return _originalDefaultPolicy;
665            }
666    
667            @JSON
668            @Override
669            public String getName() {
670                    if (_name == null) {
671                            return StringPool.BLANK;
672                    }
673                    else {
674                            return _name;
675                    }
676            }
677    
678            @Override
679            public void setName(String name) {
680                    _columnBitmask |= NAME_COLUMN_BITMASK;
681    
682                    if (_originalName == null) {
683                            _originalName = _name;
684                    }
685    
686                    _name = name;
687            }
688    
689            public String getOriginalName() {
690                    return GetterUtil.getString(_originalName);
691            }
692    
693            @JSON
694            @Override
695            public String getDescription() {
696                    if (_description == null) {
697                            return StringPool.BLANK;
698                    }
699                    else {
700                            return _description;
701                    }
702            }
703    
704            @Override
705            public void setDescription(String description) {
706                    _description = description;
707            }
708    
709            @JSON
710            @Override
711            public boolean getChangeable() {
712                    return _changeable;
713            }
714    
715            @Override
716            public boolean isChangeable() {
717                    return _changeable;
718            }
719    
720            @Override
721            public void setChangeable(boolean changeable) {
722                    _changeable = changeable;
723            }
724    
725            @JSON
726            @Override
727            public boolean getChangeRequired() {
728                    return _changeRequired;
729            }
730    
731            @Override
732            public boolean isChangeRequired() {
733                    return _changeRequired;
734            }
735    
736            @Override
737            public void setChangeRequired(boolean changeRequired) {
738                    _changeRequired = changeRequired;
739            }
740    
741            @JSON
742            @Override
743            public long getMinAge() {
744                    return _minAge;
745            }
746    
747            @Override
748            public void setMinAge(long minAge) {
749                    _minAge = minAge;
750            }
751    
752            @JSON
753            @Override
754            public boolean getCheckSyntax() {
755                    return _checkSyntax;
756            }
757    
758            @Override
759            public boolean isCheckSyntax() {
760                    return _checkSyntax;
761            }
762    
763            @Override
764            public void setCheckSyntax(boolean checkSyntax) {
765                    _checkSyntax = checkSyntax;
766            }
767    
768            @JSON
769            @Override
770            public boolean getAllowDictionaryWords() {
771                    return _allowDictionaryWords;
772            }
773    
774            @Override
775            public boolean isAllowDictionaryWords() {
776                    return _allowDictionaryWords;
777            }
778    
779            @Override
780            public void setAllowDictionaryWords(boolean allowDictionaryWords) {
781                    _allowDictionaryWords = allowDictionaryWords;
782            }
783    
784            @JSON
785            @Override
786            public int getMinAlphanumeric() {
787                    return _minAlphanumeric;
788            }
789    
790            @Override
791            public void setMinAlphanumeric(int minAlphanumeric) {
792                    _minAlphanumeric = minAlphanumeric;
793            }
794    
795            @JSON
796            @Override
797            public int getMinLength() {
798                    return _minLength;
799            }
800    
801            @Override
802            public void setMinLength(int minLength) {
803                    _minLength = minLength;
804            }
805    
806            @JSON
807            @Override
808            public int getMinLowerCase() {
809                    return _minLowerCase;
810            }
811    
812            @Override
813            public void setMinLowerCase(int minLowerCase) {
814                    _minLowerCase = minLowerCase;
815            }
816    
817            @JSON
818            @Override
819            public int getMinNumbers() {
820                    return _minNumbers;
821            }
822    
823            @Override
824            public void setMinNumbers(int minNumbers) {
825                    _minNumbers = minNumbers;
826            }
827    
828            @JSON
829            @Override
830            public int getMinSymbols() {
831                    return _minSymbols;
832            }
833    
834            @Override
835            public void setMinSymbols(int minSymbols) {
836                    _minSymbols = minSymbols;
837            }
838    
839            @JSON
840            @Override
841            public int getMinUpperCase() {
842                    return _minUpperCase;
843            }
844    
845            @Override
846            public void setMinUpperCase(int minUpperCase) {
847                    _minUpperCase = minUpperCase;
848            }
849    
850            @JSON
851            @Override
852            public String getRegex() {
853                    if (_regex == null) {
854                            return StringPool.BLANK;
855                    }
856                    else {
857                            return _regex;
858                    }
859            }
860    
861            @Override
862            public void setRegex(String regex) {
863                    _regex = regex;
864            }
865    
866            @JSON
867            @Override
868            public boolean getHistory() {
869                    return _history;
870            }
871    
872            @Override
873            public boolean isHistory() {
874                    return _history;
875            }
876    
877            @Override
878            public void setHistory(boolean history) {
879                    _history = history;
880            }
881    
882            @JSON
883            @Override
884            public int getHistoryCount() {
885                    return _historyCount;
886            }
887    
888            @Override
889            public void setHistoryCount(int historyCount) {
890                    _historyCount = historyCount;
891            }
892    
893            @JSON
894            @Override
895            public boolean getExpireable() {
896                    return _expireable;
897            }
898    
899            @Override
900            public boolean isExpireable() {
901                    return _expireable;
902            }
903    
904            @Override
905            public void setExpireable(boolean expireable) {
906                    _expireable = expireable;
907            }
908    
909            @JSON
910            @Override
911            public long getMaxAge() {
912                    return _maxAge;
913            }
914    
915            @Override
916            public void setMaxAge(long maxAge) {
917                    _maxAge = maxAge;
918            }
919    
920            @JSON
921            @Override
922            public long getWarningTime() {
923                    return _warningTime;
924            }
925    
926            @Override
927            public void setWarningTime(long warningTime) {
928                    _warningTime = warningTime;
929            }
930    
931            @JSON
932            @Override
933            public int getGraceLimit() {
934                    return _graceLimit;
935            }
936    
937            @Override
938            public void setGraceLimit(int graceLimit) {
939                    _graceLimit = graceLimit;
940            }
941    
942            @JSON
943            @Override
944            public boolean getLockout() {
945                    return _lockout;
946            }
947    
948            @Override
949            public boolean isLockout() {
950                    return _lockout;
951            }
952    
953            @Override
954            public void setLockout(boolean lockout) {
955                    _lockout = lockout;
956            }
957    
958            @JSON
959            @Override
960            public int getMaxFailure() {
961                    return _maxFailure;
962            }
963    
964            @Override
965            public void setMaxFailure(int maxFailure) {
966                    _maxFailure = maxFailure;
967            }
968    
969            @JSON
970            @Override
971            public long getLockoutDuration() {
972                    return _lockoutDuration;
973            }
974    
975            @Override
976            public void setLockoutDuration(long lockoutDuration) {
977                    _lockoutDuration = lockoutDuration;
978            }
979    
980            @JSON
981            @Override
982            public boolean getRequireUnlock() {
983                    return _requireUnlock;
984            }
985    
986            @Override
987            public boolean isRequireUnlock() {
988                    return _requireUnlock;
989            }
990    
991            @Override
992            public void setRequireUnlock(boolean requireUnlock) {
993                    _requireUnlock = requireUnlock;
994            }
995    
996            @JSON
997            @Override
998            public long getResetFailureCount() {
999                    return _resetFailureCount;
1000            }
1001    
1002            @Override
1003            public void setResetFailureCount(long resetFailureCount) {
1004                    _resetFailureCount = resetFailureCount;
1005            }
1006    
1007            @JSON
1008            @Override
1009            public long getResetTicketMaxAge() {
1010                    return _resetTicketMaxAge;
1011            }
1012    
1013            @Override
1014            public void setResetTicketMaxAge(long resetTicketMaxAge) {
1015                    _resetTicketMaxAge = resetTicketMaxAge;
1016            }
1017    
1018            @Override
1019            public StagedModelType getStagedModelType() {
1020                    return new StagedModelType(PortalUtil.getClassNameId(
1021                                    PasswordPolicy.class.getName()));
1022            }
1023    
1024            public long getColumnBitmask() {
1025                    return _columnBitmask;
1026            }
1027    
1028            @Override
1029            public ExpandoBridge getExpandoBridge() {
1030                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
1031                            PasswordPolicy.class.getName(), getPrimaryKey());
1032            }
1033    
1034            @Override
1035            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
1036                    ExpandoBridge expandoBridge = getExpandoBridge();
1037    
1038                    expandoBridge.setAttributes(serviceContext);
1039            }
1040    
1041            @Override
1042            public PasswordPolicy toEscapedModel() {
1043                    if (_escapedModel == null) {
1044                            _escapedModel = (PasswordPolicy)ProxyUtil.newProxyInstance(_classLoader,
1045                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
1046                    }
1047    
1048                    return _escapedModel;
1049            }
1050    
1051            @Override
1052            public Object clone() {
1053                    PasswordPolicyImpl passwordPolicyImpl = new PasswordPolicyImpl();
1054    
1055                    passwordPolicyImpl.setMvccVersion(getMvccVersion());
1056                    passwordPolicyImpl.setUuid(getUuid());
1057                    passwordPolicyImpl.setPasswordPolicyId(getPasswordPolicyId());
1058                    passwordPolicyImpl.setCompanyId(getCompanyId());
1059                    passwordPolicyImpl.setUserId(getUserId());
1060                    passwordPolicyImpl.setUserName(getUserName());
1061                    passwordPolicyImpl.setCreateDate(getCreateDate());
1062                    passwordPolicyImpl.setModifiedDate(getModifiedDate());
1063                    passwordPolicyImpl.setDefaultPolicy(getDefaultPolicy());
1064                    passwordPolicyImpl.setName(getName());
1065                    passwordPolicyImpl.setDescription(getDescription());
1066                    passwordPolicyImpl.setChangeable(getChangeable());
1067                    passwordPolicyImpl.setChangeRequired(getChangeRequired());
1068                    passwordPolicyImpl.setMinAge(getMinAge());
1069                    passwordPolicyImpl.setCheckSyntax(getCheckSyntax());
1070                    passwordPolicyImpl.setAllowDictionaryWords(getAllowDictionaryWords());
1071                    passwordPolicyImpl.setMinAlphanumeric(getMinAlphanumeric());
1072                    passwordPolicyImpl.setMinLength(getMinLength());
1073                    passwordPolicyImpl.setMinLowerCase(getMinLowerCase());
1074                    passwordPolicyImpl.setMinNumbers(getMinNumbers());
1075                    passwordPolicyImpl.setMinSymbols(getMinSymbols());
1076                    passwordPolicyImpl.setMinUpperCase(getMinUpperCase());
1077                    passwordPolicyImpl.setRegex(getRegex());
1078                    passwordPolicyImpl.setHistory(getHistory());
1079                    passwordPolicyImpl.setHistoryCount(getHistoryCount());
1080                    passwordPolicyImpl.setExpireable(getExpireable());
1081                    passwordPolicyImpl.setMaxAge(getMaxAge());
1082                    passwordPolicyImpl.setWarningTime(getWarningTime());
1083                    passwordPolicyImpl.setGraceLimit(getGraceLimit());
1084                    passwordPolicyImpl.setLockout(getLockout());
1085                    passwordPolicyImpl.setMaxFailure(getMaxFailure());
1086                    passwordPolicyImpl.setLockoutDuration(getLockoutDuration());
1087                    passwordPolicyImpl.setRequireUnlock(getRequireUnlock());
1088                    passwordPolicyImpl.setResetFailureCount(getResetFailureCount());
1089                    passwordPolicyImpl.setResetTicketMaxAge(getResetTicketMaxAge());
1090    
1091                    passwordPolicyImpl.resetOriginalValues();
1092    
1093                    return passwordPolicyImpl;
1094            }
1095    
1096            @Override
1097            public int compareTo(PasswordPolicy passwordPolicy) {
1098                    long primaryKey = passwordPolicy.getPrimaryKey();
1099    
1100                    if (getPrimaryKey() < primaryKey) {
1101                            return -1;
1102                    }
1103                    else if (getPrimaryKey() > primaryKey) {
1104                            return 1;
1105                    }
1106                    else {
1107                            return 0;
1108                    }
1109            }
1110    
1111            @Override
1112            public boolean equals(Object obj) {
1113                    if (this == obj) {
1114                            return true;
1115                    }
1116    
1117                    if (!(obj instanceof PasswordPolicy)) {
1118                            return false;
1119                    }
1120    
1121                    PasswordPolicy passwordPolicy = (PasswordPolicy)obj;
1122    
1123                    long primaryKey = passwordPolicy.getPrimaryKey();
1124    
1125                    if (getPrimaryKey() == primaryKey) {
1126                            return true;
1127                    }
1128                    else {
1129                            return false;
1130                    }
1131            }
1132    
1133            @Override
1134            public int hashCode() {
1135                    return (int)getPrimaryKey();
1136            }
1137    
1138            @Override
1139            public boolean isEntityCacheEnabled() {
1140                    return ENTITY_CACHE_ENABLED;
1141            }
1142    
1143            @Override
1144            public boolean isFinderCacheEnabled() {
1145                    return FINDER_CACHE_ENABLED;
1146            }
1147    
1148            @Override
1149            public void resetOriginalValues() {
1150                    PasswordPolicyModelImpl passwordPolicyModelImpl = this;
1151    
1152                    passwordPolicyModelImpl._originalUuid = passwordPolicyModelImpl._uuid;
1153    
1154                    passwordPolicyModelImpl._originalCompanyId = passwordPolicyModelImpl._companyId;
1155    
1156                    passwordPolicyModelImpl._setOriginalCompanyId = false;
1157    
1158                    passwordPolicyModelImpl._setModifiedDate = false;
1159    
1160                    passwordPolicyModelImpl._originalDefaultPolicy = passwordPolicyModelImpl._defaultPolicy;
1161    
1162                    passwordPolicyModelImpl._setOriginalDefaultPolicy = false;
1163    
1164                    passwordPolicyModelImpl._originalName = passwordPolicyModelImpl._name;
1165    
1166                    passwordPolicyModelImpl._columnBitmask = 0;
1167            }
1168    
1169            @Override
1170            public CacheModel<PasswordPolicy> toCacheModel() {
1171                    PasswordPolicyCacheModel passwordPolicyCacheModel = new PasswordPolicyCacheModel();
1172    
1173                    passwordPolicyCacheModel.mvccVersion = getMvccVersion();
1174    
1175                    passwordPolicyCacheModel.uuid = getUuid();
1176    
1177                    String uuid = passwordPolicyCacheModel.uuid;
1178    
1179                    if ((uuid != null) && (uuid.length() == 0)) {
1180                            passwordPolicyCacheModel.uuid = null;
1181                    }
1182    
1183                    passwordPolicyCacheModel.passwordPolicyId = getPasswordPolicyId();
1184    
1185                    passwordPolicyCacheModel.companyId = getCompanyId();
1186    
1187                    passwordPolicyCacheModel.userId = getUserId();
1188    
1189                    passwordPolicyCacheModel.userName = getUserName();
1190    
1191                    String userName = passwordPolicyCacheModel.userName;
1192    
1193                    if ((userName != null) && (userName.length() == 0)) {
1194                            passwordPolicyCacheModel.userName = null;
1195                    }
1196    
1197                    Date createDate = getCreateDate();
1198    
1199                    if (createDate != null) {
1200                            passwordPolicyCacheModel.createDate = createDate.getTime();
1201                    }
1202                    else {
1203                            passwordPolicyCacheModel.createDate = Long.MIN_VALUE;
1204                    }
1205    
1206                    Date modifiedDate = getModifiedDate();
1207    
1208                    if (modifiedDate != null) {
1209                            passwordPolicyCacheModel.modifiedDate = modifiedDate.getTime();
1210                    }
1211                    else {
1212                            passwordPolicyCacheModel.modifiedDate = Long.MIN_VALUE;
1213                    }
1214    
1215                    passwordPolicyCacheModel.defaultPolicy = getDefaultPolicy();
1216    
1217                    passwordPolicyCacheModel.name = getName();
1218    
1219                    String name = passwordPolicyCacheModel.name;
1220    
1221                    if ((name != null) && (name.length() == 0)) {
1222                            passwordPolicyCacheModel.name = null;
1223                    }
1224    
1225                    passwordPolicyCacheModel.description = getDescription();
1226    
1227                    String description = passwordPolicyCacheModel.description;
1228    
1229                    if ((description != null) && (description.length() == 0)) {
1230                            passwordPolicyCacheModel.description = null;
1231                    }
1232    
1233                    passwordPolicyCacheModel.changeable = getChangeable();
1234    
1235                    passwordPolicyCacheModel.changeRequired = getChangeRequired();
1236    
1237                    passwordPolicyCacheModel.minAge = getMinAge();
1238    
1239                    passwordPolicyCacheModel.checkSyntax = getCheckSyntax();
1240    
1241                    passwordPolicyCacheModel.allowDictionaryWords = getAllowDictionaryWords();
1242    
1243                    passwordPolicyCacheModel.minAlphanumeric = getMinAlphanumeric();
1244    
1245                    passwordPolicyCacheModel.minLength = getMinLength();
1246    
1247                    passwordPolicyCacheModel.minLowerCase = getMinLowerCase();
1248    
1249                    passwordPolicyCacheModel.minNumbers = getMinNumbers();
1250    
1251                    passwordPolicyCacheModel.minSymbols = getMinSymbols();
1252    
1253                    passwordPolicyCacheModel.minUpperCase = getMinUpperCase();
1254    
1255                    passwordPolicyCacheModel.regex = getRegex();
1256    
1257                    String regex = passwordPolicyCacheModel.regex;
1258    
1259                    if ((regex != null) && (regex.length() == 0)) {
1260                            passwordPolicyCacheModel.regex = null;
1261                    }
1262    
1263                    passwordPolicyCacheModel.history = getHistory();
1264    
1265                    passwordPolicyCacheModel.historyCount = getHistoryCount();
1266    
1267                    passwordPolicyCacheModel.expireable = getExpireable();
1268    
1269                    passwordPolicyCacheModel.maxAge = getMaxAge();
1270    
1271                    passwordPolicyCacheModel.warningTime = getWarningTime();
1272    
1273                    passwordPolicyCacheModel.graceLimit = getGraceLimit();
1274    
1275                    passwordPolicyCacheModel.lockout = getLockout();
1276    
1277                    passwordPolicyCacheModel.maxFailure = getMaxFailure();
1278    
1279                    passwordPolicyCacheModel.lockoutDuration = getLockoutDuration();
1280    
1281                    passwordPolicyCacheModel.requireUnlock = getRequireUnlock();
1282    
1283                    passwordPolicyCacheModel.resetFailureCount = getResetFailureCount();
1284    
1285                    passwordPolicyCacheModel.resetTicketMaxAge = getResetTicketMaxAge();
1286    
1287                    return passwordPolicyCacheModel;
1288            }
1289    
1290            @Override
1291            public String toString() {
1292                    StringBundler sb = new StringBundler(71);
1293    
1294                    sb.append("{mvccVersion=");
1295                    sb.append(getMvccVersion());
1296                    sb.append(", uuid=");
1297                    sb.append(getUuid());
1298                    sb.append(", passwordPolicyId=");
1299                    sb.append(getPasswordPolicyId());
1300                    sb.append(", companyId=");
1301                    sb.append(getCompanyId());
1302                    sb.append(", userId=");
1303                    sb.append(getUserId());
1304                    sb.append(", userName=");
1305                    sb.append(getUserName());
1306                    sb.append(", createDate=");
1307                    sb.append(getCreateDate());
1308                    sb.append(", modifiedDate=");
1309                    sb.append(getModifiedDate());
1310                    sb.append(", defaultPolicy=");
1311                    sb.append(getDefaultPolicy());
1312                    sb.append(", name=");
1313                    sb.append(getName());
1314                    sb.append(", description=");
1315                    sb.append(getDescription());
1316                    sb.append(", changeable=");
1317                    sb.append(getChangeable());
1318                    sb.append(", changeRequired=");
1319                    sb.append(getChangeRequired());
1320                    sb.append(", minAge=");
1321                    sb.append(getMinAge());
1322                    sb.append(", checkSyntax=");
1323                    sb.append(getCheckSyntax());
1324                    sb.append(", allowDictionaryWords=");
1325                    sb.append(getAllowDictionaryWords());
1326                    sb.append(", minAlphanumeric=");
1327                    sb.append(getMinAlphanumeric());
1328                    sb.append(", minLength=");
1329                    sb.append(getMinLength());
1330                    sb.append(", minLowerCase=");
1331                    sb.append(getMinLowerCase());
1332                    sb.append(", minNumbers=");
1333                    sb.append(getMinNumbers());
1334                    sb.append(", minSymbols=");
1335                    sb.append(getMinSymbols());
1336                    sb.append(", minUpperCase=");
1337                    sb.append(getMinUpperCase());
1338                    sb.append(", regex=");
1339                    sb.append(getRegex());
1340                    sb.append(", history=");
1341                    sb.append(getHistory());
1342                    sb.append(", historyCount=");
1343                    sb.append(getHistoryCount());
1344                    sb.append(", expireable=");
1345                    sb.append(getExpireable());
1346                    sb.append(", maxAge=");
1347                    sb.append(getMaxAge());
1348                    sb.append(", warningTime=");
1349                    sb.append(getWarningTime());
1350                    sb.append(", graceLimit=");
1351                    sb.append(getGraceLimit());
1352                    sb.append(", lockout=");
1353                    sb.append(getLockout());
1354                    sb.append(", maxFailure=");
1355                    sb.append(getMaxFailure());
1356                    sb.append(", lockoutDuration=");
1357                    sb.append(getLockoutDuration());
1358                    sb.append(", requireUnlock=");
1359                    sb.append(getRequireUnlock());
1360                    sb.append(", resetFailureCount=");
1361                    sb.append(getResetFailureCount());
1362                    sb.append(", resetTicketMaxAge=");
1363                    sb.append(getResetTicketMaxAge());
1364                    sb.append("}");
1365    
1366                    return sb.toString();
1367            }
1368    
1369            @Override
1370            public String toXmlString() {
1371                    StringBundler sb = new StringBundler(109);
1372    
1373                    sb.append("<model><model-name>");
1374                    sb.append("com.liferay.portal.model.PasswordPolicy");
1375                    sb.append("</model-name>");
1376    
1377                    sb.append(
1378                            "<column><column-name>mvccVersion</column-name><column-value><![CDATA[");
1379                    sb.append(getMvccVersion());
1380                    sb.append("]]></column-value></column>");
1381                    sb.append(
1382                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
1383                    sb.append(getUuid());
1384                    sb.append("]]></column-value></column>");
1385                    sb.append(
1386                            "<column><column-name>passwordPolicyId</column-name><column-value><![CDATA[");
1387                    sb.append(getPasswordPolicyId());
1388                    sb.append("]]></column-value></column>");
1389                    sb.append(
1390                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
1391                    sb.append(getCompanyId());
1392                    sb.append("]]></column-value></column>");
1393                    sb.append(
1394                            "<column><column-name>userId</column-name><column-value><![CDATA[");
1395                    sb.append(getUserId());
1396                    sb.append("]]></column-value></column>");
1397                    sb.append(
1398                            "<column><column-name>userName</column-name><column-value><![CDATA[");
1399                    sb.append(getUserName());
1400                    sb.append("]]></column-value></column>");
1401                    sb.append(
1402                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
1403                    sb.append(getCreateDate());
1404                    sb.append("]]></column-value></column>");
1405                    sb.append(
1406                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
1407                    sb.append(getModifiedDate());
1408                    sb.append("]]></column-value></column>");
1409                    sb.append(
1410                            "<column><column-name>defaultPolicy</column-name><column-value><![CDATA[");
1411                    sb.append(getDefaultPolicy());
1412                    sb.append("]]></column-value></column>");
1413                    sb.append(
1414                            "<column><column-name>name</column-name><column-value><![CDATA[");
1415                    sb.append(getName());
1416                    sb.append("]]></column-value></column>");
1417                    sb.append(
1418                            "<column><column-name>description</column-name><column-value><![CDATA[");
1419                    sb.append(getDescription());
1420                    sb.append("]]></column-value></column>");
1421                    sb.append(
1422                            "<column><column-name>changeable</column-name><column-value><![CDATA[");
1423                    sb.append(getChangeable());
1424                    sb.append("]]></column-value></column>");
1425                    sb.append(
1426                            "<column><column-name>changeRequired</column-name><column-value><![CDATA[");
1427                    sb.append(getChangeRequired());
1428                    sb.append("]]></column-value></column>");
1429                    sb.append(
1430                            "<column><column-name>minAge</column-name><column-value><![CDATA[");
1431                    sb.append(getMinAge());
1432                    sb.append("]]></column-value></column>");
1433                    sb.append(
1434                            "<column><column-name>checkSyntax</column-name><column-value><![CDATA[");
1435                    sb.append(getCheckSyntax());
1436                    sb.append("]]></column-value></column>");
1437                    sb.append(
1438                            "<column><column-name>allowDictionaryWords</column-name><column-value><![CDATA[");
1439                    sb.append(getAllowDictionaryWords());
1440                    sb.append("]]></column-value></column>");
1441                    sb.append(
1442                            "<column><column-name>minAlphanumeric</column-name><column-value><![CDATA[");
1443                    sb.append(getMinAlphanumeric());
1444                    sb.append("]]></column-value></column>");
1445                    sb.append(
1446                            "<column><column-name>minLength</column-name><column-value><![CDATA[");
1447                    sb.append(getMinLength());
1448                    sb.append("]]></column-value></column>");
1449                    sb.append(
1450                            "<column><column-name>minLowerCase</column-name><column-value><![CDATA[");
1451                    sb.append(getMinLowerCase());
1452                    sb.append("]]></column-value></column>");
1453                    sb.append(
1454                            "<column><column-name>minNumbers</column-name><column-value><![CDATA[");
1455                    sb.append(getMinNumbers());
1456                    sb.append("]]></column-value></column>");
1457                    sb.append(
1458                            "<column><column-name>minSymbols</column-name><column-value><![CDATA[");
1459                    sb.append(getMinSymbols());
1460                    sb.append("]]></column-value></column>");
1461                    sb.append(
1462                            "<column><column-name>minUpperCase</column-name><column-value><![CDATA[");
1463                    sb.append(getMinUpperCase());
1464                    sb.append("]]></column-value></column>");
1465                    sb.append(
1466                            "<column><column-name>regex</column-name><column-value><![CDATA[");
1467                    sb.append(getRegex());
1468                    sb.append("]]></column-value></column>");
1469                    sb.append(
1470                            "<column><column-name>history</column-name><column-value><![CDATA[");
1471                    sb.append(getHistory());
1472                    sb.append("]]></column-value></column>");
1473                    sb.append(
1474                            "<column><column-name>historyCount</column-name><column-value><![CDATA[");
1475                    sb.append(getHistoryCount());
1476                    sb.append("]]></column-value></column>");
1477                    sb.append(
1478                            "<column><column-name>expireable</column-name><column-value><![CDATA[");
1479                    sb.append(getExpireable());
1480                    sb.append("]]></column-value></column>");
1481                    sb.append(
1482                            "<column><column-name>maxAge</column-name><column-value><![CDATA[");
1483                    sb.append(getMaxAge());
1484                    sb.append("]]></column-value></column>");
1485                    sb.append(
1486                            "<column><column-name>warningTime</column-name><column-value><![CDATA[");
1487                    sb.append(getWarningTime());
1488                    sb.append("]]></column-value></column>");
1489                    sb.append(
1490                            "<column><column-name>graceLimit</column-name><column-value><![CDATA[");
1491                    sb.append(getGraceLimit());
1492                    sb.append("]]></column-value></column>");
1493                    sb.append(
1494                            "<column><column-name>lockout</column-name><column-value><![CDATA[");
1495                    sb.append(getLockout());
1496                    sb.append("]]></column-value></column>");
1497                    sb.append(
1498                            "<column><column-name>maxFailure</column-name><column-value><![CDATA[");
1499                    sb.append(getMaxFailure());
1500                    sb.append("]]></column-value></column>");
1501                    sb.append(
1502                            "<column><column-name>lockoutDuration</column-name><column-value><![CDATA[");
1503                    sb.append(getLockoutDuration());
1504                    sb.append("]]></column-value></column>");
1505                    sb.append(
1506                            "<column><column-name>requireUnlock</column-name><column-value><![CDATA[");
1507                    sb.append(getRequireUnlock());
1508                    sb.append("]]></column-value></column>");
1509                    sb.append(
1510                            "<column><column-name>resetFailureCount</column-name><column-value><![CDATA[");
1511                    sb.append(getResetFailureCount());
1512                    sb.append("]]></column-value></column>");
1513                    sb.append(
1514                            "<column><column-name>resetTicketMaxAge</column-name><column-value><![CDATA[");
1515                    sb.append(getResetTicketMaxAge());
1516                    sb.append("]]></column-value></column>");
1517    
1518                    sb.append("</model>");
1519    
1520                    return sb.toString();
1521            }
1522    
1523            private static final ClassLoader _classLoader = PasswordPolicy.class.getClassLoader();
1524            private static final Class<?>[] _escapedModelInterfaces = new Class[] {
1525                            PasswordPolicy.class
1526                    };
1527            private long _mvccVersion;
1528            private String _uuid;
1529            private String _originalUuid;
1530            private long _passwordPolicyId;
1531            private long _companyId;
1532            private long _originalCompanyId;
1533            private boolean _setOriginalCompanyId;
1534            private long _userId;
1535            private String _userName;
1536            private Date _createDate;
1537            private Date _modifiedDate;
1538            private boolean _setModifiedDate;
1539            private boolean _defaultPolicy;
1540            private boolean _originalDefaultPolicy;
1541            private boolean _setOriginalDefaultPolicy;
1542            private String _name;
1543            private String _originalName;
1544            private String _description;
1545            private boolean _changeable;
1546            private boolean _changeRequired;
1547            private long _minAge;
1548            private boolean _checkSyntax;
1549            private boolean _allowDictionaryWords;
1550            private int _minAlphanumeric;
1551            private int _minLength;
1552            private int _minLowerCase;
1553            private int _minNumbers;
1554            private int _minSymbols;
1555            private int _minUpperCase;
1556            private String _regex;
1557            private boolean _history;
1558            private int _historyCount;
1559            private boolean _expireable;
1560            private long _maxAge;
1561            private long _warningTime;
1562            private int _graceLimit;
1563            private boolean _lockout;
1564            private int _maxFailure;
1565            private long _lockoutDuration;
1566            private boolean _requireUnlock;
1567            private long _resetFailureCount;
1568            private long _resetTicketMaxAge;
1569            private long _columnBitmask;
1570            private PasswordPolicy _escapedModel;
1571    }