001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.lar.StagedModelType;
018 import com.liferay.portal.kernel.util.Validator;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class PasswordPolicyWrapper implements PasswordPolicy,
034 ModelWrapper<PasswordPolicy> {
035 public PasswordPolicyWrapper(PasswordPolicy passwordPolicy) {
036 _passwordPolicy = passwordPolicy;
037 }
038
039 @Override
040 public Class<?> getModelClass() {
041 return PasswordPolicy.class;
042 }
043
044 @Override
045 public String getModelClassName() {
046 return PasswordPolicy.class.getName();
047 }
048
049 @Override
050 public Map<String, Object> getModelAttributes() {
051 Map<String, Object> attributes = new HashMap<String, Object>();
052
053 attributes.put("uuid", getUuid());
054 attributes.put("passwordPolicyId", getPasswordPolicyId());
055 attributes.put("companyId", getCompanyId());
056 attributes.put("userId", getUserId());
057 attributes.put("userName", getUserName());
058 attributes.put("createDate", getCreateDate());
059 attributes.put("modifiedDate", getModifiedDate());
060 attributes.put("defaultPolicy", getDefaultPolicy());
061 attributes.put("name", getName());
062 attributes.put("description", getDescription());
063 attributes.put("changeable", getChangeable());
064 attributes.put("changeRequired", getChangeRequired());
065 attributes.put("minAge", getMinAge());
066 attributes.put("checkSyntax", getCheckSyntax());
067 attributes.put("allowDictionaryWords", getAllowDictionaryWords());
068 attributes.put("minAlphanumeric", getMinAlphanumeric());
069 attributes.put("minLength", getMinLength());
070 attributes.put("minLowerCase", getMinLowerCase());
071 attributes.put("minNumbers", getMinNumbers());
072 attributes.put("minSymbols", getMinSymbols());
073 attributes.put("minUpperCase", getMinUpperCase());
074 attributes.put("regex", getRegex());
075 attributes.put("history", getHistory());
076 attributes.put("historyCount", getHistoryCount());
077 attributes.put("expireable", getExpireable());
078 attributes.put("maxAge", getMaxAge());
079 attributes.put("warningTime", getWarningTime());
080 attributes.put("graceLimit", getGraceLimit());
081 attributes.put("lockout", getLockout());
082 attributes.put("maxFailure", getMaxFailure());
083 attributes.put("lockoutDuration", getLockoutDuration());
084 attributes.put("requireUnlock", getRequireUnlock());
085 attributes.put("resetFailureCount", getResetFailureCount());
086 attributes.put("resetTicketMaxAge", getResetTicketMaxAge());
087
088 return attributes;
089 }
090
091 @Override
092 public void setModelAttributes(Map<String, Object> attributes) {
093 String uuid = (String)attributes.get("uuid");
094
095 if (uuid != null) {
096 setUuid(uuid);
097 }
098
099 Long passwordPolicyId = (Long)attributes.get("passwordPolicyId");
100
101 if (passwordPolicyId != null) {
102 setPasswordPolicyId(passwordPolicyId);
103 }
104
105 Long companyId = (Long)attributes.get("companyId");
106
107 if (companyId != null) {
108 setCompanyId(companyId);
109 }
110
111 Long userId = (Long)attributes.get("userId");
112
113 if (userId != null) {
114 setUserId(userId);
115 }
116
117 String userName = (String)attributes.get("userName");
118
119 if (userName != null) {
120 setUserName(userName);
121 }
122
123 Date createDate = (Date)attributes.get("createDate");
124
125 if (createDate != null) {
126 setCreateDate(createDate);
127 }
128
129 Date modifiedDate = (Date)attributes.get("modifiedDate");
130
131 if (modifiedDate != null) {
132 setModifiedDate(modifiedDate);
133 }
134
135 Boolean defaultPolicy = (Boolean)attributes.get("defaultPolicy");
136
137 if (defaultPolicy != null) {
138 setDefaultPolicy(defaultPolicy);
139 }
140
141 String name = (String)attributes.get("name");
142
143 if (name != null) {
144 setName(name);
145 }
146
147 String description = (String)attributes.get("description");
148
149 if (description != null) {
150 setDescription(description);
151 }
152
153 Boolean changeable = (Boolean)attributes.get("changeable");
154
155 if (changeable != null) {
156 setChangeable(changeable);
157 }
158
159 Boolean changeRequired = (Boolean)attributes.get("changeRequired");
160
161 if (changeRequired != null) {
162 setChangeRequired(changeRequired);
163 }
164
165 Long minAge = (Long)attributes.get("minAge");
166
167 if (minAge != null) {
168 setMinAge(minAge);
169 }
170
171 Boolean checkSyntax = (Boolean)attributes.get("checkSyntax");
172
173 if (checkSyntax != null) {
174 setCheckSyntax(checkSyntax);
175 }
176
177 Boolean allowDictionaryWords = (Boolean)attributes.get(
178 "allowDictionaryWords");
179
180 if (allowDictionaryWords != null) {
181 setAllowDictionaryWords(allowDictionaryWords);
182 }
183
184 Integer minAlphanumeric = (Integer)attributes.get("minAlphanumeric");
185
186 if (minAlphanumeric != null) {
187 setMinAlphanumeric(minAlphanumeric);
188 }
189
190 Integer minLength = (Integer)attributes.get("minLength");
191
192 if (minLength != null) {
193 setMinLength(minLength);
194 }
195
196 Integer minLowerCase = (Integer)attributes.get("minLowerCase");
197
198 if (minLowerCase != null) {
199 setMinLowerCase(minLowerCase);
200 }
201
202 Integer minNumbers = (Integer)attributes.get("minNumbers");
203
204 if (minNumbers != null) {
205 setMinNumbers(minNumbers);
206 }
207
208 Integer minSymbols = (Integer)attributes.get("minSymbols");
209
210 if (minSymbols != null) {
211 setMinSymbols(minSymbols);
212 }
213
214 Integer minUpperCase = (Integer)attributes.get("minUpperCase");
215
216 if (minUpperCase != null) {
217 setMinUpperCase(minUpperCase);
218 }
219
220 String regex = (String)attributes.get("regex");
221
222 if (regex != null) {
223 setRegex(regex);
224 }
225
226 Boolean history = (Boolean)attributes.get("history");
227
228 if (history != null) {
229 setHistory(history);
230 }
231
232 Integer historyCount = (Integer)attributes.get("historyCount");
233
234 if (historyCount != null) {
235 setHistoryCount(historyCount);
236 }
237
238 Boolean expireable = (Boolean)attributes.get("expireable");
239
240 if (expireable != null) {
241 setExpireable(expireable);
242 }
243
244 Long maxAge = (Long)attributes.get("maxAge");
245
246 if (maxAge != null) {
247 setMaxAge(maxAge);
248 }
249
250 Long warningTime = (Long)attributes.get("warningTime");
251
252 if (warningTime != null) {
253 setWarningTime(warningTime);
254 }
255
256 Integer graceLimit = (Integer)attributes.get("graceLimit");
257
258 if (graceLimit != null) {
259 setGraceLimit(graceLimit);
260 }
261
262 Boolean lockout = (Boolean)attributes.get("lockout");
263
264 if (lockout != null) {
265 setLockout(lockout);
266 }
267
268 Integer maxFailure = (Integer)attributes.get("maxFailure");
269
270 if (maxFailure != null) {
271 setMaxFailure(maxFailure);
272 }
273
274 Long lockoutDuration = (Long)attributes.get("lockoutDuration");
275
276 if (lockoutDuration != null) {
277 setLockoutDuration(lockoutDuration);
278 }
279
280 Boolean requireUnlock = (Boolean)attributes.get("requireUnlock");
281
282 if (requireUnlock != null) {
283 setRequireUnlock(requireUnlock);
284 }
285
286 Long resetFailureCount = (Long)attributes.get("resetFailureCount");
287
288 if (resetFailureCount != null) {
289 setResetFailureCount(resetFailureCount);
290 }
291
292 Long resetTicketMaxAge = (Long)attributes.get("resetTicketMaxAge");
293
294 if (resetTicketMaxAge != null) {
295 setResetTicketMaxAge(resetTicketMaxAge);
296 }
297 }
298
299
304 @Override
305 public long getPrimaryKey() {
306 return _passwordPolicy.getPrimaryKey();
307 }
308
309
314 @Override
315 public void setPrimaryKey(long primaryKey) {
316 _passwordPolicy.setPrimaryKey(primaryKey);
317 }
318
319
324 @Override
325 public java.lang.String getUuid() {
326 return _passwordPolicy.getUuid();
327 }
328
329
334 @Override
335 public void setUuid(java.lang.String uuid) {
336 _passwordPolicy.setUuid(uuid);
337 }
338
339
344 @Override
345 public long getPasswordPolicyId() {
346 return _passwordPolicy.getPasswordPolicyId();
347 }
348
349
354 @Override
355 public void setPasswordPolicyId(long passwordPolicyId) {
356 _passwordPolicy.setPasswordPolicyId(passwordPolicyId);
357 }
358
359
364 @Override
365 public long getCompanyId() {
366 return _passwordPolicy.getCompanyId();
367 }
368
369
374 @Override
375 public void setCompanyId(long companyId) {
376 _passwordPolicy.setCompanyId(companyId);
377 }
378
379
384 @Override
385 public long getUserId() {
386 return _passwordPolicy.getUserId();
387 }
388
389
394 @Override
395 public void setUserId(long userId) {
396 _passwordPolicy.setUserId(userId);
397 }
398
399
405 @Override
406 public java.lang.String getUserUuid()
407 throws com.liferay.portal.kernel.exception.SystemException {
408 return _passwordPolicy.getUserUuid();
409 }
410
411
416 @Override
417 public void setUserUuid(java.lang.String userUuid) {
418 _passwordPolicy.setUserUuid(userUuid);
419 }
420
421
426 @Override
427 public java.lang.String getUserName() {
428 return _passwordPolicy.getUserName();
429 }
430
431
436 @Override
437 public void setUserName(java.lang.String userName) {
438 _passwordPolicy.setUserName(userName);
439 }
440
441
446 @Override
447 public java.util.Date getCreateDate() {
448 return _passwordPolicy.getCreateDate();
449 }
450
451
456 @Override
457 public void setCreateDate(java.util.Date createDate) {
458 _passwordPolicy.setCreateDate(createDate);
459 }
460
461
466 @Override
467 public java.util.Date getModifiedDate() {
468 return _passwordPolicy.getModifiedDate();
469 }
470
471
476 @Override
477 public void setModifiedDate(java.util.Date modifiedDate) {
478 _passwordPolicy.setModifiedDate(modifiedDate);
479 }
480
481
486 @Override
487 public boolean getDefaultPolicy() {
488 return _passwordPolicy.getDefaultPolicy();
489 }
490
491
496 @Override
497 public boolean isDefaultPolicy() {
498 return _passwordPolicy.isDefaultPolicy();
499 }
500
501
506 @Override
507 public void setDefaultPolicy(boolean defaultPolicy) {
508 _passwordPolicy.setDefaultPolicy(defaultPolicy);
509 }
510
511
516 @Override
517 public java.lang.String getName() {
518 return _passwordPolicy.getName();
519 }
520
521
526 @Override
527 public void setName(java.lang.String name) {
528 _passwordPolicy.setName(name);
529 }
530
531
536 @Override
537 public java.lang.String getDescription() {
538 return _passwordPolicy.getDescription();
539 }
540
541
546 @Override
547 public void setDescription(java.lang.String description) {
548 _passwordPolicy.setDescription(description);
549 }
550
551
556 @Override
557 public boolean getChangeable() {
558 return _passwordPolicy.getChangeable();
559 }
560
561
566 @Override
567 public boolean isChangeable() {
568 return _passwordPolicy.isChangeable();
569 }
570
571
576 @Override
577 public void setChangeable(boolean changeable) {
578 _passwordPolicy.setChangeable(changeable);
579 }
580
581
586 @Override
587 public boolean getChangeRequired() {
588 return _passwordPolicy.getChangeRequired();
589 }
590
591
596 @Override
597 public boolean isChangeRequired() {
598 return _passwordPolicy.isChangeRequired();
599 }
600
601
606 @Override
607 public void setChangeRequired(boolean changeRequired) {
608 _passwordPolicy.setChangeRequired(changeRequired);
609 }
610
611
616 @Override
617 public long getMinAge() {
618 return _passwordPolicy.getMinAge();
619 }
620
621
626 @Override
627 public void setMinAge(long minAge) {
628 _passwordPolicy.setMinAge(minAge);
629 }
630
631
636 @Override
637 public boolean getCheckSyntax() {
638 return _passwordPolicy.getCheckSyntax();
639 }
640
641
646 @Override
647 public boolean isCheckSyntax() {
648 return _passwordPolicy.isCheckSyntax();
649 }
650
651
656 @Override
657 public void setCheckSyntax(boolean checkSyntax) {
658 _passwordPolicy.setCheckSyntax(checkSyntax);
659 }
660
661
666 @Override
667 public boolean getAllowDictionaryWords() {
668 return _passwordPolicy.getAllowDictionaryWords();
669 }
670
671
676 @Override
677 public boolean isAllowDictionaryWords() {
678 return _passwordPolicy.isAllowDictionaryWords();
679 }
680
681
686 @Override
687 public void setAllowDictionaryWords(boolean allowDictionaryWords) {
688 _passwordPolicy.setAllowDictionaryWords(allowDictionaryWords);
689 }
690
691
696 @Override
697 public int getMinAlphanumeric() {
698 return _passwordPolicy.getMinAlphanumeric();
699 }
700
701
706 @Override
707 public void setMinAlphanumeric(int minAlphanumeric) {
708 _passwordPolicy.setMinAlphanumeric(minAlphanumeric);
709 }
710
711
716 @Override
717 public int getMinLength() {
718 return _passwordPolicy.getMinLength();
719 }
720
721
726 @Override
727 public void setMinLength(int minLength) {
728 _passwordPolicy.setMinLength(minLength);
729 }
730
731
736 @Override
737 public int getMinLowerCase() {
738 return _passwordPolicy.getMinLowerCase();
739 }
740
741
746 @Override
747 public void setMinLowerCase(int minLowerCase) {
748 _passwordPolicy.setMinLowerCase(minLowerCase);
749 }
750
751
756 @Override
757 public int getMinNumbers() {
758 return _passwordPolicy.getMinNumbers();
759 }
760
761
766 @Override
767 public void setMinNumbers(int minNumbers) {
768 _passwordPolicy.setMinNumbers(minNumbers);
769 }
770
771
776 @Override
777 public int getMinSymbols() {
778 return _passwordPolicy.getMinSymbols();
779 }
780
781
786 @Override
787 public void setMinSymbols(int minSymbols) {
788 _passwordPolicy.setMinSymbols(minSymbols);
789 }
790
791
796 @Override
797 public int getMinUpperCase() {
798 return _passwordPolicy.getMinUpperCase();
799 }
800
801
806 @Override
807 public void setMinUpperCase(int minUpperCase) {
808 _passwordPolicy.setMinUpperCase(minUpperCase);
809 }
810
811
816 @Override
817 public java.lang.String getRegex() {
818 return _passwordPolicy.getRegex();
819 }
820
821
826 @Override
827 public void setRegex(java.lang.String regex) {
828 _passwordPolicy.setRegex(regex);
829 }
830
831
836 @Override
837 public boolean getHistory() {
838 return _passwordPolicy.getHistory();
839 }
840
841
846 @Override
847 public boolean isHistory() {
848 return _passwordPolicy.isHistory();
849 }
850
851
856 @Override
857 public void setHistory(boolean history) {
858 _passwordPolicy.setHistory(history);
859 }
860
861
866 @Override
867 public int getHistoryCount() {
868 return _passwordPolicy.getHistoryCount();
869 }
870
871
876 @Override
877 public void setHistoryCount(int historyCount) {
878 _passwordPolicy.setHistoryCount(historyCount);
879 }
880
881
886 @Override
887 public boolean getExpireable() {
888 return _passwordPolicy.getExpireable();
889 }
890
891
896 @Override
897 public boolean isExpireable() {
898 return _passwordPolicy.isExpireable();
899 }
900
901
906 @Override
907 public void setExpireable(boolean expireable) {
908 _passwordPolicy.setExpireable(expireable);
909 }
910
911
916 @Override
917 public long getMaxAge() {
918 return _passwordPolicy.getMaxAge();
919 }
920
921
926 @Override
927 public void setMaxAge(long maxAge) {
928 _passwordPolicy.setMaxAge(maxAge);
929 }
930
931
936 @Override
937 public long getWarningTime() {
938 return _passwordPolicy.getWarningTime();
939 }
940
941
946 @Override
947 public void setWarningTime(long warningTime) {
948 _passwordPolicy.setWarningTime(warningTime);
949 }
950
951
956 @Override
957 public int getGraceLimit() {
958 return _passwordPolicy.getGraceLimit();
959 }
960
961
966 @Override
967 public void setGraceLimit(int graceLimit) {
968 _passwordPolicy.setGraceLimit(graceLimit);
969 }
970
971
976 @Override
977 public boolean getLockout() {
978 return _passwordPolicy.getLockout();
979 }
980
981
986 @Override
987 public boolean isLockout() {
988 return _passwordPolicy.isLockout();
989 }
990
991
996 @Override
997 public void setLockout(boolean lockout) {
998 _passwordPolicy.setLockout(lockout);
999 }
1000
1001
1006 @Override
1007 public int getMaxFailure() {
1008 return _passwordPolicy.getMaxFailure();
1009 }
1010
1011
1016 @Override
1017 public void setMaxFailure(int maxFailure) {
1018 _passwordPolicy.setMaxFailure(maxFailure);
1019 }
1020
1021
1026 @Override
1027 public long getLockoutDuration() {
1028 return _passwordPolicy.getLockoutDuration();
1029 }
1030
1031
1036 @Override
1037 public void setLockoutDuration(long lockoutDuration) {
1038 _passwordPolicy.setLockoutDuration(lockoutDuration);
1039 }
1040
1041
1046 @Override
1047 public boolean getRequireUnlock() {
1048 return _passwordPolicy.getRequireUnlock();
1049 }
1050
1051
1056 @Override
1057 public boolean isRequireUnlock() {
1058 return _passwordPolicy.isRequireUnlock();
1059 }
1060
1061
1066 @Override
1067 public void setRequireUnlock(boolean requireUnlock) {
1068 _passwordPolicy.setRequireUnlock(requireUnlock);
1069 }
1070
1071
1076 @Override
1077 public long getResetFailureCount() {
1078 return _passwordPolicy.getResetFailureCount();
1079 }
1080
1081
1086 @Override
1087 public void setResetFailureCount(long resetFailureCount) {
1088 _passwordPolicy.setResetFailureCount(resetFailureCount);
1089 }
1090
1091
1096 @Override
1097 public long getResetTicketMaxAge() {
1098 return _passwordPolicy.getResetTicketMaxAge();
1099 }
1100
1101
1106 @Override
1107 public void setResetTicketMaxAge(long resetTicketMaxAge) {
1108 _passwordPolicy.setResetTicketMaxAge(resetTicketMaxAge);
1109 }
1110
1111 @Override
1112 public boolean isNew() {
1113 return _passwordPolicy.isNew();
1114 }
1115
1116 @Override
1117 public void setNew(boolean n) {
1118 _passwordPolicy.setNew(n);
1119 }
1120
1121 @Override
1122 public boolean isCachedModel() {
1123 return _passwordPolicy.isCachedModel();
1124 }
1125
1126 @Override
1127 public void setCachedModel(boolean cachedModel) {
1128 _passwordPolicy.setCachedModel(cachedModel);
1129 }
1130
1131 @Override
1132 public boolean isEscapedModel() {
1133 return _passwordPolicy.isEscapedModel();
1134 }
1135
1136 @Override
1137 public java.io.Serializable getPrimaryKeyObj() {
1138 return _passwordPolicy.getPrimaryKeyObj();
1139 }
1140
1141 @Override
1142 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
1143 _passwordPolicy.setPrimaryKeyObj(primaryKeyObj);
1144 }
1145
1146 @Override
1147 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
1148 return _passwordPolicy.getExpandoBridge();
1149 }
1150
1151 @Override
1152 public void setExpandoBridgeAttributes(
1153 com.liferay.portal.model.BaseModel<?> baseModel) {
1154 _passwordPolicy.setExpandoBridgeAttributes(baseModel);
1155 }
1156
1157 @Override
1158 public void setExpandoBridgeAttributes(
1159 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
1160 _passwordPolicy.setExpandoBridgeAttributes(expandoBridge);
1161 }
1162
1163 @Override
1164 public void setExpandoBridgeAttributes(
1165 com.liferay.portal.service.ServiceContext serviceContext) {
1166 _passwordPolicy.setExpandoBridgeAttributes(serviceContext);
1167 }
1168
1169 @Override
1170 public java.lang.Object clone() {
1171 return new PasswordPolicyWrapper((PasswordPolicy)_passwordPolicy.clone());
1172 }
1173
1174 @Override
1175 public int compareTo(com.liferay.portal.model.PasswordPolicy passwordPolicy) {
1176 return _passwordPolicy.compareTo(passwordPolicy);
1177 }
1178
1179 @Override
1180 public int hashCode() {
1181 return _passwordPolicy.hashCode();
1182 }
1183
1184 @Override
1185 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.PasswordPolicy> toCacheModel() {
1186 return _passwordPolicy.toCacheModel();
1187 }
1188
1189 @Override
1190 public com.liferay.portal.model.PasswordPolicy toEscapedModel() {
1191 return new PasswordPolicyWrapper(_passwordPolicy.toEscapedModel());
1192 }
1193
1194 @Override
1195 public com.liferay.portal.model.PasswordPolicy toUnescapedModel() {
1196 return new PasswordPolicyWrapper(_passwordPolicy.toUnescapedModel());
1197 }
1198
1199 @Override
1200 public java.lang.String toString() {
1201 return _passwordPolicy.toString();
1202 }
1203
1204 @Override
1205 public java.lang.String toXmlString() {
1206 return _passwordPolicy.toXmlString();
1207 }
1208
1209 @Override
1210 public void persist()
1211 throws com.liferay.portal.kernel.exception.SystemException {
1212 _passwordPolicy.persist();
1213 }
1214
1215 @Override
1216 public boolean equals(Object obj) {
1217 if (this == obj) {
1218 return true;
1219 }
1220
1221 if (!(obj instanceof PasswordPolicyWrapper)) {
1222 return false;
1223 }
1224
1225 PasswordPolicyWrapper passwordPolicyWrapper = (PasswordPolicyWrapper)obj;
1226
1227 if (Validator.equals(_passwordPolicy,
1228 passwordPolicyWrapper._passwordPolicy)) {
1229 return true;
1230 }
1231
1232 return false;
1233 }
1234
1235 @Override
1236 public StagedModelType getStagedModelType() {
1237 return _passwordPolicy.getStagedModelType();
1238 }
1239
1240
1243 public PasswordPolicy getWrappedPasswordPolicy() {
1244 return _passwordPolicy;
1245 }
1246
1247 @Override
1248 public PasswordPolicy getWrappedModel() {
1249 return _passwordPolicy;
1250 }
1251
1252 @Override
1253 public void resetOriginalValues() {
1254 _passwordPolicy.resetOriginalValues();
1255 }
1256
1257 private PasswordPolicy _passwordPolicy;
1258 }