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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link PasswordPolicyRel}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see PasswordPolicyRel
031     * @generated
032     */
033    @ProviderType
034    public class PasswordPolicyRelWrapper implements PasswordPolicyRel,
035            ModelWrapper<PasswordPolicyRel> {
036            public PasswordPolicyRelWrapper(PasswordPolicyRel passwordPolicyRel) {
037                    _passwordPolicyRel = passwordPolicyRel;
038            }
039    
040            @Override
041            public Class<?> getModelClass() {
042                    return PasswordPolicyRel.class;
043            }
044    
045            @Override
046            public String getModelClassName() {
047                    return PasswordPolicyRel.class.getName();
048            }
049    
050            @Override
051            public Map<String, Object> getModelAttributes() {
052                    Map<String, Object> attributes = new HashMap<String, Object>();
053    
054                    attributes.put("mvccVersion", getMvccVersion());
055                    attributes.put("passwordPolicyRelId", getPasswordPolicyRelId());
056                    attributes.put("companyId", getCompanyId());
057                    attributes.put("passwordPolicyId", getPasswordPolicyId());
058                    attributes.put("classNameId", getClassNameId());
059                    attributes.put("classPK", getClassPK());
060    
061                    return attributes;
062            }
063    
064            @Override
065            public void setModelAttributes(Map<String, Object> attributes) {
066                    Long mvccVersion = (Long)attributes.get("mvccVersion");
067    
068                    if (mvccVersion != null) {
069                            setMvccVersion(mvccVersion);
070                    }
071    
072                    Long passwordPolicyRelId = (Long)attributes.get("passwordPolicyRelId");
073    
074                    if (passwordPolicyRelId != null) {
075                            setPasswordPolicyRelId(passwordPolicyRelId);
076                    }
077    
078                    Long companyId = (Long)attributes.get("companyId");
079    
080                    if (companyId != null) {
081                            setCompanyId(companyId);
082                    }
083    
084                    Long passwordPolicyId = (Long)attributes.get("passwordPolicyId");
085    
086                    if (passwordPolicyId != null) {
087                            setPasswordPolicyId(passwordPolicyId);
088                    }
089    
090                    Long classNameId = (Long)attributes.get("classNameId");
091    
092                    if (classNameId != null) {
093                            setClassNameId(classNameId);
094                    }
095    
096                    Long classPK = (Long)attributes.get("classPK");
097    
098                    if (classPK != null) {
099                            setClassPK(classPK);
100                    }
101            }
102    
103            @Override
104            public java.lang.Object clone() {
105                    return new PasswordPolicyRelWrapper((PasswordPolicyRel)_passwordPolicyRel.clone());
106            }
107    
108            @Override
109            public int compareTo(
110                    com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel) {
111                    return _passwordPolicyRel.compareTo(passwordPolicyRel);
112            }
113    
114            /**
115            * Returns the fully qualified class name of this password policy rel.
116            *
117            * @return the fully qualified class name of this password policy rel
118            */
119            @Override
120            public java.lang.String getClassName() {
121                    return _passwordPolicyRel.getClassName();
122            }
123    
124            /**
125            * Returns the class name ID of this password policy rel.
126            *
127            * @return the class name ID of this password policy rel
128            */
129            @Override
130            public long getClassNameId() {
131                    return _passwordPolicyRel.getClassNameId();
132            }
133    
134            /**
135            * Returns the class p k of this password policy rel.
136            *
137            * @return the class p k of this password policy rel
138            */
139            @Override
140            public long getClassPK() {
141                    return _passwordPolicyRel.getClassPK();
142            }
143    
144            /**
145            * Returns the company ID of this password policy rel.
146            *
147            * @return the company ID of this password policy rel
148            */
149            @Override
150            public long getCompanyId() {
151                    return _passwordPolicyRel.getCompanyId();
152            }
153    
154            @Override
155            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
156                    return _passwordPolicyRel.getExpandoBridge();
157            }
158    
159            /**
160            * Returns the mvcc version of this password policy rel.
161            *
162            * @return the mvcc version of this password policy rel
163            */
164            @Override
165            public long getMvccVersion() {
166                    return _passwordPolicyRel.getMvccVersion();
167            }
168    
169            /**
170            * Returns the password policy ID of this password policy rel.
171            *
172            * @return the password policy ID of this password policy rel
173            */
174            @Override
175            public long getPasswordPolicyId() {
176                    return _passwordPolicyRel.getPasswordPolicyId();
177            }
178    
179            /**
180            * Returns the password policy rel ID of this password policy rel.
181            *
182            * @return the password policy rel ID of this password policy rel
183            */
184            @Override
185            public long getPasswordPolicyRelId() {
186                    return _passwordPolicyRel.getPasswordPolicyRelId();
187            }
188    
189            /**
190            * Returns the primary key of this password policy rel.
191            *
192            * @return the primary key of this password policy rel
193            */
194            @Override
195            public long getPrimaryKey() {
196                    return _passwordPolicyRel.getPrimaryKey();
197            }
198    
199            @Override
200            public java.io.Serializable getPrimaryKeyObj() {
201                    return _passwordPolicyRel.getPrimaryKeyObj();
202            }
203    
204            @Override
205            public int hashCode() {
206                    return _passwordPolicyRel.hashCode();
207            }
208    
209            @Override
210            public boolean isCachedModel() {
211                    return _passwordPolicyRel.isCachedModel();
212            }
213    
214            @Override
215            public boolean isEscapedModel() {
216                    return _passwordPolicyRel.isEscapedModel();
217            }
218    
219            @Override
220            public boolean isNew() {
221                    return _passwordPolicyRel.isNew();
222            }
223    
224            @Override
225            public void persist() {
226                    _passwordPolicyRel.persist();
227            }
228    
229            @Override
230            public void setCachedModel(boolean cachedModel) {
231                    _passwordPolicyRel.setCachedModel(cachedModel);
232            }
233    
234            @Override
235            public void setClassName(java.lang.String className) {
236                    _passwordPolicyRel.setClassName(className);
237            }
238    
239            /**
240            * Sets the class name ID of this password policy rel.
241            *
242            * @param classNameId the class name ID of this password policy rel
243            */
244            @Override
245            public void setClassNameId(long classNameId) {
246                    _passwordPolicyRel.setClassNameId(classNameId);
247            }
248    
249            /**
250            * Sets the class p k of this password policy rel.
251            *
252            * @param classPK the class p k of this password policy rel
253            */
254            @Override
255            public void setClassPK(long classPK) {
256                    _passwordPolicyRel.setClassPK(classPK);
257            }
258    
259            /**
260            * Sets the company ID of this password policy rel.
261            *
262            * @param companyId the company ID of this password policy rel
263            */
264            @Override
265            public void setCompanyId(long companyId) {
266                    _passwordPolicyRel.setCompanyId(companyId);
267            }
268    
269            @Override
270            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
271                    _passwordPolicyRel.setExpandoBridgeAttributes(baseModel);
272            }
273    
274            @Override
275            public void setExpandoBridgeAttributes(
276                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
277                    _passwordPolicyRel.setExpandoBridgeAttributes(expandoBridge);
278            }
279    
280            @Override
281            public void setExpandoBridgeAttributes(
282                    com.liferay.portal.service.ServiceContext serviceContext) {
283                    _passwordPolicyRel.setExpandoBridgeAttributes(serviceContext);
284            }
285    
286            /**
287            * Sets the mvcc version of this password policy rel.
288            *
289            * @param mvccVersion the mvcc version of this password policy rel
290            */
291            @Override
292            public void setMvccVersion(long mvccVersion) {
293                    _passwordPolicyRel.setMvccVersion(mvccVersion);
294            }
295    
296            @Override
297            public void setNew(boolean n) {
298                    _passwordPolicyRel.setNew(n);
299            }
300    
301            /**
302            * Sets the password policy ID of this password policy rel.
303            *
304            * @param passwordPolicyId the password policy ID of this password policy rel
305            */
306            @Override
307            public void setPasswordPolicyId(long passwordPolicyId) {
308                    _passwordPolicyRel.setPasswordPolicyId(passwordPolicyId);
309            }
310    
311            /**
312            * Sets the password policy rel ID of this password policy rel.
313            *
314            * @param passwordPolicyRelId the password policy rel ID of this password policy rel
315            */
316            @Override
317            public void setPasswordPolicyRelId(long passwordPolicyRelId) {
318                    _passwordPolicyRel.setPasswordPolicyRelId(passwordPolicyRelId);
319            }
320    
321            /**
322            * Sets the primary key of this password policy rel.
323            *
324            * @param primaryKey the primary key of this password policy rel
325            */
326            @Override
327            public void setPrimaryKey(long primaryKey) {
328                    _passwordPolicyRel.setPrimaryKey(primaryKey);
329            }
330    
331            @Override
332            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
333                    _passwordPolicyRel.setPrimaryKeyObj(primaryKeyObj);
334            }
335    
336            @Override
337            public CacheModel<com.liferay.portal.model.PasswordPolicyRel> toCacheModel() {
338                    return _passwordPolicyRel.toCacheModel();
339            }
340    
341            @Override
342            public com.liferay.portal.model.PasswordPolicyRel toEscapedModel() {
343                    return new PasswordPolicyRelWrapper(_passwordPolicyRel.toEscapedModel());
344            }
345    
346            @Override
347            public java.lang.String toString() {
348                    return _passwordPolicyRel.toString();
349            }
350    
351            @Override
352            public com.liferay.portal.model.PasswordPolicyRel toUnescapedModel() {
353                    return new PasswordPolicyRelWrapper(_passwordPolicyRel.toUnescapedModel());
354            }
355    
356            @Override
357            public java.lang.String toXmlString() {
358                    return _passwordPolicyRel.toXmlString();
359            }
360    
361            @Override
362            public boolean equals(Object obj) {
363                    if (this == obj) {
364                            return true;
365                    }
366    
367                    if (!(obj instanceof PasswordPolicyRelWrapper)) {
368                            return false;
369                    }
370    
371                    PasswordPolicyRelWrapper passwordPolicyRelWrapper = (PasswordPolicyRelWrapper)obj;
372    
373                    if (Validator.equals(_passwordPolicyRel,
374                                            passwordPolicyRelWrapper._passwordPolicyRel)) {
375                            return true;
376                    }
377    
378                    return false;
379            }
380    
381            @Override
382            public PasswordPolicyRel getWrappedModel() {
383                    return _passwordPolicyRel;
384            }
385    
386            @Override
387            public boolean isEntityCacheEnabled() {
388                    return _passwordPolicyRel.isEntityCacheEnabled();
389            }
390    
391            @Override
392            public boolean isFinderCacheEnabled() {
393                    return _passwordPolicyRel.isFinderCacheEnabled();
394            }
395    
396            @Override
397            public void resetOriginalValues() {
398                    _passwordPolicyRel.resetOriginalValues();
399            }
400    
401            private final PasswordPolicyRel _passwordPolicyRel;
402    }