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