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