001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model.impl;
016    
017    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.util.GetterUtil;
020    import com.liferay.portal.kernel.util.StringBundler;
021    import com.liferay.portal.kernel.util.StringPool;
022    import com.liferay.portal.model.PasswordPolicy;
023    import com.liferay.portal.model.PasswordPolicyModel;
024    import com.liferay.portal.model.PasswordPolicySoap;
025    import com.liferay.portal.service.ServiceContext;
026    import com.liferay.portal.util.PortalUtil;
027    
028    import com.liferay.portlet.expando.model.ExpandoBridge;
029    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
030    
031    import java.io.Serializable;
032    
033    import java.lang.reflect.Proxy;
034    
035    import java.sql.Types;
036    
037    import java.util.ArrayList;
038    import java.util.Date;
039    import java.util.List;
040    
041    /**
042     * 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.
043     *
044     * <p>
045     * This implementation and its corresponding interface {@link com.liferay.portal.model.PasswordPolicyModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link PasswordPolicyImpl}.
046     * </p>
047     *
048     * <p>
049     * Never modify or reference this class directly. All methods that expect a password policy model instance should use the {@link com.liferay.portal.model.PasswordPolicy} interface instead.
050     * </p>
051     *
052     * @author Brian Wing Shun Chan
053     * @see PasswordPolicyImpl
054     * @see com.liferay.portal.model.PasswordPolicy
055     * @see com.liferay.portal.model.PasswordPolicyModel
056     * @generated
057     */
058    public class PasswordPolicyModelImpl extends BaseModelImpl<PasswordPolicy>
059            implements PasswordPolicyModel {
060            public static final String TABLE_NAME = "PasswordPolicy";
061            public static final Object[][] TABLE_COLUMNS = {
062                            { "passwordPolicyId", new Integer(Types.BIGINT) },
063                            { "companyId", new Integer(Types.BIGINT) },
064                            { "userId", new Integer(Types.BIGINT) },
065                            { "userName", new Integer(Types.VARCHAR) },
066                            { "createDate", new Integer(Types.TIMESTAMP) },
067                            { "modifiedDate", new Integer(Types.TIMESTAMP) },
068                            { "defaultPolicy", new Integer(Types.BOOLEAN) },
069                            { "name", new Integer(Types.VARCHAR) },
070                            { "description", new Integer(Types.VARCHAR) },
071                            { "changeable", new Integer(Types.BOOLEAN) },
072                            { "changeRequired", new Integer(Types.BOOLEAN) },
073                            { "minAge", new Integer(Types.BIGINT) },
074                            { "checkSyntax", new Integer(Types.BOOLEAN) },
075                            { "allowDictionaryWords", new Integer(Types.BOOLEAN) },
076                            { "minAlphanumeric", new Integer(Types.INTEGER) },
077                            { "minLength", new Integer(Types.INTEGER) },
078                            { "minLowerCase", new Integer(Types.INTEGER) },
079                            { "minNumbers", new Integer(Types.INTEGER) },
080                            { "minSymbols", new Integer(Types.INTEGER) },
081                            { "minUpperCase", new Integer(Types.INTEGER) },
082                            { "history", new Integer(Types.BOOLEAN) },
083                            { "historyCount", new Integer(Types.INTEGER) },
084                            { "expireable", new Integer(Types.BOOLEAN) },
085                            { "maxAge", new Integer(Types.BIGINT) },
086                            { "warningTime", new Integer(Types.BIGINT) },
087                            { "graceLimit", new Integer(Types.INTEGER) },
088                            { "lockout", new Integer(Types.BOOLEAN) },
089                            { "maxFailure", new Integer(Types.INTEGER) },
090                            { "lockoutDuration", new Integer(Types.BIGINT) },
091                            { "requireUnlock", new Integer(Types.BOOLEAN) },
092                            { "resetFailureCount", new Integer(Types.BIGINT) },
093                            { "resetTicketMaxAge", new Integer(Types.BIGINT) }
094                    };
095            public static final String TABLE_SQL_CREATE = "create table PasswordPolicy (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,history BOOLEAN,historyCount INTEGER,expireable BOOLEAN,maxAge LONG,warningTime LONG,graceLimit INTEGER,lockout BOOLEAN,maxFailure INTEGER,lockoutDuration LONG,requireUnlock BOOLEAN,resetFailureCount LONG,resetTicketMaxAge LONG)";
096            public static final String TABLE_SQL_DROP = "drop table PasswordPolicy";
097            public static final String DATA_SOURCE = "liferayDataSource";
098            public static final String SESSION_FACTORY = "liferaySessionFactory";
099            public static final String TX_MANAGER = "liferayTransactionManager";
100            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
101                                    "value.object.entity.cache.enabled.com.liferay.portal.model.PasswordPolicy"),
102                            true);
103            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
104                                    "value.object.finder.cache.enabled.com.liferay.portal.model.PasswordPolicy"),
105                            true);
106    
107            /**
108             * Converts the soap model instance into a normal model instance.
109             *
110             * @param soapModel the soap model instance to convert
111             * @return the normal model instance
112             */
113            public static PasswordPolicy toModel(PasswordPolicySoap soapModel) {
114                    PasswordPolicy model = new PasswordPolicyImpl();
115    
116                    model.setPasswordPolicyId(soapModel.getPasswordPolicyId());
117                    model.setCompanyId(soapModel.getCompanyId());
118                    model.setUserId(soapModel.getUserId());
119                    model.setUserName(soapModel.getUserName());
120                    model.setCreateDate(soapModel.getCreateDate());
121                    model.setModifiedDate(soapModel.getModifiedDate());
122                    model.setDefaultPolicy(soapModel.getDefaultPolicy());
123                    model.setName(soapModel.getName());
124                    model.setDescription(soapModel.getDescription());
125                    model.setChangeable(soapModel.getChangeable());
126                    model.setChangeRequired(soapModel.getChangeRequired());
127                    model.setMinAge(soapModel.getMinAge());
128                    model.setCheckSyntax(soapModel.getCheckSyntax());
129                    model.setAllowDictionaryWords(soapModel.getAllowDictionaryWords());
130                    model.setMinAlphanumeric(soapModel.getMinAlphanumeric());
131                    model.setMinLength(soapModel.getMinLength());
132                    model.setMinLowerCase(soapModel.getMinLowerCase());
133                    model.setMinNumbers(soapModel.getMinNumbers());
134                    model.setMinSymbols(soapModel.getMinSymbols());
135                    model.setMinUpperCase(soapModel.getMinUpperCase());
136                    model.setHistory(soapModel.getHistory());
137                    model.setHistoryCount(soapModel.getHistoryCount());
138                    model.setExpireable(soapModel.getExpireable());
139                    model.setMaxAge(soapModel.getMaxAge());
140                    model.setWarningTime(soapModel.getWarningTime());
141                    model.setGraceLimit(soapModel.getGraceLimit());
142                    model.setLockout(soapModel.getLockout());
143                    model.setMaxFailure(soapModel.getMaxFailure());
144                    model.setLockoutDuration(soapModel.getLockoutDuration());
145                    model.setRequireUnlock(soapModel.getRequireUnlock());
146                    model.setResetFailureCount(soapModel.getResetFailureCount());
147                    model.setResetTicketMaxAge(soapModel.getResetTicketMaxAge());
148    
149                    return model;
150            }
151    
152            /**
153             * Converts the soap model instances into normal model instances.
154             *
155             * @param soapModels the soap model instances to convert
156             * @return the normal model instances
157             */
158            public static List<PasswordPolicy> toModels(PasswordPolicySoap[] soapModels) {
159                    List<PasswordPolicy> models = new ArrayList<PasswordPolicy>(soapModels.length);
160    
161                    for (PasswordPolicySoap soapModel : soapModels) {
162                            models.add(toModel(soapModel));
163                    }
164    
165                    return models;
166            }
167    
168            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
169                                    "lock.expiration.time.com.liferay.portal.model.PasswordPolicy"));
170    
171            public PasswordPolicyModelImpl() {
172            }
173    
174            public long getPrimaryKey() {
175                    return _passwordPolicyId;
176            }
177    
178            public void setPrimaryKey(long pk) {
179                    setPasswordPolicyId(pk);
180            }
181    
182            public Serializable getPrimaryKeyObj() {
183                    return new Long(_passwordPolicyId);
184            }
185    
186            public long getPasswordPolicyId() {
187                    return _passwordPolicyId;
188            }
189    
190            public void setPasswordPolicyId(long passwordPolicyId) {
191                    _passwordPolicyId = passwordPolicyId;
192            }
193    
194            public long getCompanyId() {
195                    return _companyId;
196            }
197    
198            public void setCompanyId(long companyId) {
199                    if (!_setOriginalCompanyId) {
200                            _setOriginalCompanyId = true;
201    
202                            _originalCompanyId = _companyId;
203                    }
204    
205                    _companyId = companyId;
206            }
207    
208            public long getOriginalCompanyId() {
209                    return _originalCompanyId;
210            }
211    
212            public long getUserId() {
213                    return _userId;
214            }
215    
216            public void setUserId(long userId) {
217                    _userId = userId;
218            }
219    
220            public String getUserUuid() throws SystemException {
221                    return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
222            }
223    
224            public void setUserUuid(String userUuid) {
225                    _userUuid = userUuid;
226            }
227    
228            public String getUserName() {
229                    if (_userName == null) {
230                            return StringPool.BLANK;
231                    }
232                    else {
233                            return _userName;
234                    }
235            }
236    
237            public void setUserName(String userName) {
238                    _userName = userName;
239            }
240    
241            public Date getCreateDate() {
242                    return _createDate;
243            }
244    
245            public void setCreateDate(Date createDate) {
246                    _createDate = createDate;
247            }
248    
249            public Date getModifiedDate() {
250                    return _modifiedDate;
251            }
252    
253            public void setModifiedDate(Date modifiedDate) {
254                    _modifiedDate = modifiedDate;
255            }
256    
257            public boolean getDefaultPolicy() {
258                    return _defaultPolicy;
259            }
260    
261            public boolean isDefaultPolicy() {
262                    return _defaultPolicy;
263            }
264    
265            public void setDefaultPolicy(boolean defaultPolicy) {
266                    if (!_setOriginalDefaultPolicy) {
267                            _setOriginalDefaultPolicy = true;
268    
269                            _originalDefaultPolicy = _defaultPolicy;
270                    }
271    
272                    _defaultPolicy = defaultPolicy;
273            }
274    
275            public boolean getOriginalDefaultPolicy() {
276                    return _originalDefaultPolicy;
277            }
278    
279            public String getName() {
280                    if (_name == null) {
281                            return StringPool.BLANK;
282                    }
283                    else {
284                            return _name;
285                    }
286            }
287    
288            public void setName(String name) {
289                    if (_originalName == null) {
290                            _originalName = _name;
291                    }
292    
293                    _name = name;
294            }
295    
296            public String getOriginalName() {
297                    return GetterUtil.getString(_originalName);
298            }
299    
300            public String getDescription() {
301                    if (_description == null) {
302                            return StringPool.BLANK;
303                    }
304                    else {
305                            return _description;
306                    }
307            }
308    
309            public void setDescription(String description) {
310                    _description = description;
311            }
312    
313            public boolean getChangeable() {
314                    return _changeable;
315            }
316    
317            public boolean isChangeable() {
318                    return _changeable;
319            }
320    
321            public void setChangeable(boolean changeable) {
322                    _changeable = changeable;
323            }
324    
325            public boolean getChangeRequired() {
326                    return _changeRequired;
327            }
328    
329            public boolean isChangeRequired() {
330                    return _changeRequired;
331            }
332    
333            public void setChangeRequired(boolean changeRequired) {
334                    _changeRequired = changeRequired;
335            }
336    
337            public long getMinAge() {
338                    return _minAge;
339            }
340    
341            public void setMinAge(long minAge) {
342                    _minAge = minAge;
343            }
344    
345            public boolean getCheckSyntax() {
346                    return _checkSyntax;
347            }
348    
349            public boolean isCheckSyntax() {
350                    return _checkSyntax;
351            }
352    
353            public void setCheckSyntax(boolean checkSyntax) {
354                    _checkSyntax = checkSyntax;
355            }
356    
357            public boolean getAllowDictionaryWords() {
358                    return _allowDictionaryWords;
359            }
360    
361            public boolean isAllowDictionaryWords() {
362                    return _allowDictionaryWords;
363            }
364    
365            public void setAllowDictionaryWords(boolean allowDictionaryWords) {
366                    _allowDictionaryWords = allowDictionaryWords;
367            }
368    
369            public int getMinAlphanumeric() {
370                    return _minAlphanumeric;
371            }
372    
373            public void setMinAlphanumeric(int minAlphanumeric) {
374                    _minAlphanumeric = minAlphanumeric;
375            }
376    
377            public int getMinLength() {
378                    return _minLength;
379            }
380    
381            public void setMinLength(int minLength) {
382                    _minLength = minLength;
383            }
384    
385            public int getMinLowerCase() {
386                    return _minLowerCase;
387            }
388    
389            public void setMinLowerCase(int minLowerCase) {
390                    _minLowerCase = minLowerCase;
391            }
392    
393            public int getMinNumbers() {
394                    return _minNumbers;
395            }
396    
397            public void setMinNumbers(int minNumbers) {
398                    _minNumbers = minNumbers;
399            }
400    
401            public int getMinSymbols() {
402                    return _minSymbols;
403            }
404    
405            public void setMinSymbols(int minSymbols) {
406                    _minSymbols = minSymbols;
407            }
408    
409            public int getMinUpperCase() {
410                    return _minUpperCase;
411            }
412    
413            public void setMinUpperCase(int minUpperCase) {
414                    _minUpperCase = minUpperCase;
415            }
416    
417            public boolean getHistory() {
418                    return _history;
419            }
420    
421            public boolean isHistory() {
422                    return _history;
423            }
424    
425            public void setHistory(boolean history) {
426                    _history = history;
427            }
428    
429            public int getHistoryCount() {
430                    return _historyCount;
431            }
432    
433            public void setHistoryCount(int historyCount) {
434                    _historyCount = historyCount;
435            }
436    
437            public boolean getExpireable() {
438                    return _expireable;
439            }
440    
441            public boolean isExpireable() {
442                    return _expireable;
443            }
444    
445            public void setExpireable(boolean expireable) {
446                    _expireable = expireable;
447            }
448    
449            public long getMaxAge() {
450                    return _maxAge;
451            }
452    
453            public void setMaxAge(long maxAge) {
454                    _maxAge = maxAge;
455            }
456    
457            public long getWarningTime() {
458                    return _warningTime;
459            }
460    
461            public void setWarningTime(long warningTime) {
462                    _warningTime = warningTime;
463            }
464    
465            public int getGraceLimit() {
466                    return _graceLimit;
467            }
468    
469            public void setGraceLimit(int graceLimit) {
470                    _graceLimit = graceLimit;
471            }
472    
473            public boolean getLockout() {
474                    return _lockout;
475            }
476    
477            public boolean isLockout() {
478                    return _lockout;
479            }
480    
481            public void setLockout(boolean lockout) {
482                    _lockout = lockout;
483            }
484    
485            public int getMaxFailure() {
486                    return _maxFailure;
487            }
488    
489            public void setMaxFailure(int maxFailure) {
490                    _maxFailure = maxFailure;
491            }
492    
493            public long getLockoutDuration() {
494                    return _lockoutDuration;
495            }
496    
497            public void setLockoutDuration(long lockoutDuration) {
498                    _lockoutDuration = lockoutDuration;
499            }
500    
501            public boolean getRequireUnlock() {
502                    return _requireUnlock;
503            }
504    
505            public boolean isRequireUnlock() {
506                    return _requireUnlock;
507            }
508    
509            public void setRequireUnlock(boolean requireUnlock) {
510                    _requireUnlock = requireUnlock;
511            }
512    
513            public long getResetFailureCount() {
514                    return _resetFailureCount;
515            }
516    
517            public void setResetFailureCount(long resetFailureCount) {
518                    _resetFailureCount = resetFailureCount;
519            }
520    
521            public long getResetTicketMaxAge() {
522                    return _resetTicketMaxAge;
523            }
524    
525            public void setResetTicketMaxAge(long resetTicketMaxAge) {
526                    _resetTicketMaxAge = resetTicketMaxAge;
527            }
528    
529            public PasswordPolicy toEscapedModel() {
530                    if (isEscapedModel()) {
531                            return (PasswordPolicy)this;
532                    }
533                    else {
534                            return (PasswordPolicy)Proxy.newProxyInstance(PasswordPolicy.class.getClassLoader(),
535                                    new Class[] { PasswordPolicy.class },
536                                    new AutoEscapeBeanHandler(this));
537                    }
538            }
539    
540            public ExpandoBridge getExpandoBridge() {
541                    if (_expandoBridge == null) {
542                            _expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
543                                            PasswordPolicy.class.getName(), getPrimaryKey());
544                    }
545    
546                    return _expandoBridge;
547            }
548    
549            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
550                    getExpandoBridge().setAttributes(serviceContext);
551            }
552    
553            public Object clone() {
554                    PasswordPolicyImpl passwordPolicyImpl = new PasswordPolicyImpl();
555    
556                    passwordPolicyImpl.setPasswordPolicyId(getPasswordPolicyId());
557    
558                    passwordPolicyImpl.setCompanyId(getCompanyId());
559    
560                    PasswordPolicyModelImpl passwordPolicyModelImpl = passwordPolicyImpl;
561    
562                    passwordPolicyModelImpl._originalCompanyId = passwordPolicyModelImpl._companyId;
563    
564                    passwordPolicyModelImpl._setOriginalCompanyId = false;
565                    passwordPolicyImpl.setUserId(getUserId());
566    
567                    passwordPolicyImpl.setUserName(getUserName());
568    
569                    passwordPolicyImpl.setCreateDate(getCreateDate());
570    
571                    passwordPolicyImpl.setModifiedDate(getModifiedDate());
572    
573                    passwordPolicyImpl.setDefaultPolicy(getDefaultPolicy());
574    
575                    passwordPolicyModelImpl._originalDefaultPolicy = passwordPolicyModelImpl._defaultPolicy;
576    
577                    passwordPolicyModelImpl._setOriginalDefaultPolicy = false;
578                    passwordPolicyImpl.setName(getName());
579    
580                    passwordPolicyModelImpl._originalName = passwordPolicyModelImpl._name;
581    
582                    passwordPolicyImpl.setDescription(getDescription());
583    
584                    passwordPolicyImpl.setChangeable(getChangeable());
585    
586                    passwordPolicyImpl.setChangeRequired(getChangeRequired());
587    
588                    passwordPolicyImpl.setMinAge(getMinAge());
589    
590                    passwordPolicyImpl.setCheckSyntax(getCheckSyntax());
591    
592                    passwordPolicyImpl.setAllowDictionaryWords(getAllowDictionaryWords());
593    
594                    passwordPolicyImpl.setMinAlphanumeric(getMinAlphanumeric());
595    
596                    passwordPolicyImpl.setMinLength(getMinLength());
597    
598                    passwordPolicyImpl.setMinLowerCase(getMinLowerCase());
599    
600                    passwordPolicyImpl.setMinNumbers(getMinNumbers());
601    
602                    passwordPolicyImpl.setMinSymbols(getMinSymbols());
603    
604                    passwordPolicyImpl.setMinUpperCase(getMinUpperCase());
605    
606                    passwordPolicyImpl.setHistory(getHistory());
607    
608                    passwordPolicyImpl.setHistoryCount(getHistoryCount());
609    
610                    passwordPolicyImpl.setExpireable(getExpireable());
611    
612                    passwordPolicyImpl.setMaxAge(getMaxAge());
613    
614                    passwordPolicyImpl.setWarningTime(getWarningTime());
615    
616                    passwordPolicyImpl.setGraceLimit(getGraceLimit());
617    
618                    passwordPolicyImpl.setLockout(getLockout());
619    
620                    passwordPolicyImpl.setMaxFailure(getMaxFailure());
621    
622                    passwordPolicyImpl.setLockoutDuration(getLockoutDuration());
623    
624                    passwordPolicyImpl.setRequireUnlock(getRequireUnlock());
625    
626                    passwordPolicyImpl.setResetFailureCount(getResetFailureCount());
627    
628                    passwordPolicyImpl.setResetTicketMaxAge(getResetTicketMaxAge());
629    
630                    return passwordPolicyImpl;
631            }
632    
633            public int compareTo(PasswordPolicy passwordPolicy) {
634                    long pk = passwordPolicy.getPrimaryKey();
635    
636                    if (getPrimaryKey() < pk) {
637                            return -1;
638                    }
639                    else if (getPrimaryKey() > pk) {
640                            return 1;
641                    }
642                    else {
643                            return 0;
644                    }
645            }
646    
647            public boolean equals(Object obj) {
648                    if (obj == null) {
649                            return false;
650                    }
651    
652                    PasswordPolicy passwordPolicy = null;
653    
654                    try {
655                            passwordPolicy = (PasswordPolicy)obj;
656                    }
657                    catch (ClassCastException cce) {
658                            return false;
659                    }
660    
661                    long pk = passwordPolicy.getPrimaryKey();
662    
663                    if (getPrimaryKey() == pk) {
664                            return true;
665                    }
666                    else {
667                            return false;
668                    }
669            }
670    
671            public int hashCode() {
672                    return (int)getPrimaryKey();
673            }
674    
675            public String toString() {
676                    StringBundler sb = new StringBundler(65);
677    
678                    sb.append("{passwordPolicyId=");
679                    sb.append(getPasswordPolicyId());
680                    sb.append(", companyId=");
681                    sb.append(getCompanyId());
682                    sb.append(", userId=");
683                    sb.append(getUserId());
684                    sb.append(", userName=");
685                    sb.append(getUserName());
686                    sb.append(", createDate=");
687                    sb.append(getCreateDate());
688                    sb.append(", modifiedDate=");
689                    sb.append(getModifiedDate());
690                    sb.append(", defaultPolicy=");
691                    sb.append(getDefaultPolicy());
692                    sb.append(", name=");
693                    sb.append(getName());
694                    sb.append(", description=");
695                    sb.append(getDescription());
696                    sb.append(", changeable=");
697                    sb.append(getChangeable());
698                    sb.append(", changeRequired=");
699                    sb.append(getChangeRequired());
700                    sb.append(", minAge=");
701                    sb.append(getMinAge());
702                    sb.append(", checkSyntax=");
703                    sb.append(getCheckSyntax());
704                    sb.append(", allowDictionaryWords=");
705                    sb.append(getAllowDictionaryWords());
706                    sb.append(", minAlphanumeric=");
707                    sb.append(getMinAlphanumeric());
708                    sb.append(", minLength=");
709                    sb.append(getMinLength());
710                    sb.append(", minLowerCase=");
711                    sb.append(getMinLowerCase());
712                    sb.append(", minNumbers=");
713                    sb.append(getMinNumbers());
714                    sb.append(", minSymbols=");
715                    sb.append(getMinSymbols());
716                    sb.append(", minUpperCase=");
717                    sb.append(getMinUpperCase());
718                    sb.append(", history=");
719                    sb.append(getHistory());
720                    sb.append(", historyCount=");
721                    sb.append(getHistoryCount());
722                    sb.append(", expireable=");
723                    sb.append(getExpireable());
724                    sb.append(", maxAge=");
725                    sb.append(getMaxAge());
726                    sb.append(", warningTime=");
727                    sb.append(getWarningTime());
728                    sb.append(", graceLimit=");
729                    sb.append(getGraceLimit());
730                    sb.append(", lockout=");
731                    sb.append(getLockout());
732                    sb.append(", maxFailure=");
733                    sb.append(getMaxFailure());
734                    sb.append(", lockoutDuration=");
735                    sb.append(getLockoutDuration());
736                    sb.append(", requireUnlock=");
737                    sb.append(getRequireUnlock());
738                    sb.append(", resetFailureCount=");
739                    sb.append(getResetFailureCount());
740                    sb.append(", resetTicketMaxAge=");
741                    sb.append(getResetTicketMaxAge());
742                    sb.append("}");
743    
744                    return sb.toString();
745            }
746    
747            public String toXmlString() {
748                    StringBundler sb = new StringBundler(100);
749    
750                    sb.append("<model><model-name>");
751                    sb.append("com.liferay.portal.model.PasswordPolicy");
752                    sb.append("</model-name>");
753    
754                    sb.append(
755                            "<column><column-name>passwordPolicyId</column-name><column-value><![CDATA[");
756                    sb.append(getPasswordPolicyId());
757                    sb.append("]]></column-value></column>");
758                    sb.append(
759                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
760                    sb.append(getCompanyId());
761                    sb.append("]]></column-value></column>");
762                    sb.append(
763                            "<column><column-name>userId</column-name><column-value><![CDATA[");
764                    sb.append(getUserId());
765                    sb.append("]]></column-value></column>");
766                    sb.append(
767                            "<column><column-name>userName</column-name><column-value><![CDATA[");
768                    sb.append(getUserName());
769                    sb.append("]]></column-value></column>");
770                    sb.append(
771                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
772                    sb.append(getCreateDate());
773                    sb.append("]]></column-value></column>");
774                    sb.append(
775                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
776                    sb.append(getModifiedDate());
777                    sb.append("]]></column-value></column>");
778                    sb.append(
779                            "<column><column-name>defaultPolicy</column-name><column-value><![CDATA[");
780                    sb.append(getDefaultPolicy());
781                    sb.append("]]></column-value></column>");
782                    sb.append(
783                            "<column><column-name>name</column-name><column-value><![CDATA[");
784                    sb.append(getName());
785                    sb.append("]]></column-value></column>");
786                    sb.append(
787                            "<column><column-name>description</column-name><column-value><![CDATA[");
788                    sb.append(getDescription());
789                    sb.append("]]></column-value></column>");
790                    sb.append(
791                            "<column><column-name>changeable</column-name><column-value><![CDATA[");
792                    sb.append(getChangeable());
793                    sb.append("]]></column-value></column>");
794                    sb.append(
795                            "<column><column-name>changeRequired</column-name><column-value><![CDATA[");
796                    sb.append(getChangeRequired());
797                    sb.append("]]></column-value></column>");
798                    sb.append(
799                            "<column><column-name>minAge</column-name><column-value><![CDATA[");
800                    sb.append(getMinAge());
801                    sb.append("]]></column-value></column>");
802                    sb.append(
803                            "<column><column-name>checkSyntax</column-name><column-value><![CDATA[");
804                    sb.append(getCheckSyntax());
805                    sb.append("]]></column-value></column>");
806                    sb.append(
807                            "<column><column-name>allowDictionaryWords</column-name><column-value><![CDATA[");
808                    sb.append(getAllowDictionaryWords());
809                    sb.append("]]></column-value></column>");
810                    sb.append(
811                            "<column><column-name>minAlphanumeric</column-name><column-value><![CDATA[");
812                    sb.append(getMinAlphanumeric());
813                    sb.append("]]></column-value></column>");
814                    sb.append(
815                            "<column><column-name>minLength</column-name><column-value><![CDATA[");
816                    sb.append(getMinLength());
817                    sb.append("]]></column-value></column>");
818                    sb.append(
819                            "<column><column-name>minLowerCase</column-name><column-value><![CDATA[");
820                    sb.append(getMinLowerCase());
821                    sb.append("]]></column-value></column>");
822                    sb.append(
823                            "<column><column-name>minNumbers</column-name><column-value><![CDATA[");
824                    sb.append(getMinNumbers());
825                    sb.append("]]></column-value></column>");
826                    sb.append(
827                            "<column><column-name>minSymbols</column-name><column-value><![CDATA[");
828                    sb.append(getMinSymbols());
829                    sb.append("]]></column-value></column>");
830                    sb.append(
831                            "<column><column-name>minUpperCase</column-name><column-value><![CDATA[");
832                    sb.append(getMinUpperCase());
833                    sb.append("]]></column-value></column>");
834                    sb.append(
835                            "<column><column-name>history</column-name><column-value><![CDATA[");
836                    sb.append(getHistory());
837                    sb.append("]]></column-value></column>");
838                    sb.append(
839                            "<column><column-name>historyCount</column-name><column-value><![CDATA[");
840                    sb.append(getHistoryCount());
841                    sb.append("]]></column-value></column>");
842                    sb.append(
843                            "<column><column-name>expireable</column-name><column-value><![CDATA[");
844                    sb.append(getExpireable());
845                    sb.append("]]></column-value></column>");
846                    sb.append(
847                            "<column><column-name>maxAge</column-name><column-value><![CDATA[");
848                    sb.append(getMaxAge());
849                    sb.append("]]></column-value></column>");
850                    sb.append(
851                            "<column><column-name>warningTime</column-name><column-value><![CDATA[");
852                    sb.append(getWarningTime());
853                    sb.append("]]></column-value></column>");
854                    sb.append(
855                            "<column><column-name>graceLimit</column-name><column-value><![CDATA[");
856                    sb.append(getGraceLimit());
857                    sb.append("]]></column-value></column>");
858                    sb.append(
859                            "<column><column-name>lockout</column-name><column-value><![CDATA[");
860                    sb.append(getLockout());
861                    sb.append("]]></column-value></column>");
862                    sb.append(
863                            "<column><column-name>maxFailure</column-name><column-value><![CDATA[");
864                    sb.append(getMaxFailure());
865                    sb.append("]]></column-value></column>");
866                    sb.append(
867                            "<column><column-name>lockoutDuration</column-name><column-value><![CDATA[");
868                    sb.append(getLockoutDuration());
869                    sb.append("]]></column-value></column>");
870                    sb.append(
871                            "<column><column-name>requireUnlock</column-name><column-value><![CDATA[");
872                    sb.append(getRequireUnlock());
873                    sb.append("]]></column-value></column>");
874                    sb.append(
875                            "<column><column-name>resetFailureCount</column-name><column-value><![CDATA[");
876                    sb.append(getResetFailureCount());
877                    sb.append("]]></column-value></column>");
878                    sb.append(
879                            "<column><column-name>resetTicketMaxAge</column-name><column-value><![CDATA[");
880                    sb.append(getResetTicketMaxAge());
881                    sb.append("]]></column-value></column>");
882    
883                    sb.append("</model>");
884    
885                    return sb.toString();
886            }
887    
888            private long _passwordPolicyId;
889            private long _companyId;
890            private long _originalCompanyId;
891            private boolean _setOriginalCompanyId;
892            private long _userId;
893            private String _userUuid;
894            private String _userName;
895            private Date _createDate;
896            private Date _modifiedDate;
897            private boolean _defaultPolicy;
898            private boolean _originalDefaultPolicy;
899            private boolean _setOriginalDefaultPolicy;
900            private String _name;
901            private String _originalName;
902            private String _description;
903            private boolean _changeable;
904            private boolean _changeRequired;
905            private long _minAge;
906            private boolean _checkSyntax;
907            private boolean _allowDictionaryWords;
908            private int _minAlphanumeric;
909            private int _minLength;
910            private int _minLowerCase;
911            private int _minNumbers;
912            private int _minSymbols;
913            private int _minUpperCase;
914            private boolean _history;
915            private int _historyCount;
916            private boolean _expireable;
917            private long _maxAge;
918            private long _warningTime;
919            private int _graceLimit;
920            private boolean _lockout;
921            private int _maxFailure;
922            private long _lockoutDuration;
923            private boolean _requireUnlock;
924            private long _resetFailureCount;
925            private long _resetTicketMaxAge;
926            private transient ExpandoBridge _expandoBridge;
927    }