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(
244                    com.liferay.portal.model.BaseModel<?> baseModel) {
245                    _passwordPolicyRel.setExpandoBridgeAttributes(baseModel);
246            }
247    
248            @Override
249            public void setExpandoBridgeAttributes(
250                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
251                    _passwordPolicyRel.setExpandoBridgeAttributes(expandoBridge);
252            }
253    
254            @Override
255            public void setExpandoBridgeAttributes(
256                    com.liferay.portal.service.ServiceContext serviceContext) {
257                    _passwordPolicyRel.setExpandoBridgeAttributes(serviceContext);
258            }
259    
260            /**
261            * Sets the mvcc version of this password policy rel.
262            *
263            * @param mvccVersion the mvcc version of this password policy rel
264            */
265            @Override
266            public void setMvccVersion(long mvccVersion) {
267                    _passwordPolicyRel.setMvccVersion(mvccVersion);
268            }
269    
270            @Override
271            public void setNew(boolean n) {
272                    _passwordPolicyRel.setNew(n);
273            }
274    
275            /**
276            * Sets the password policy ID of this password policy rel.
277            *
278            * @param passwordPolicyId the password policy ID of this password policy rel
279            */
280            @Override
281            public void setPasswordPolicyId(long passwordPolicyId) {
282                    _passwordPolicyRel.setPasswordPolicyId(passwordPolicyId);
283            }
284    
285            /**
286            * Sets the password policy rel ID of this password policy rel.
287            *
288            * @param passwordPolicyRelId the password policy rel ID of this password policy rel
289            */
290            @Override
291            public void setPasswordPolicyRelId(long passwordPolicyRelId) {
292                    _passwordPolicyRel.setPasswordPolicyRelId(passwordPolicyRelId);
293            }
294    
295            /**
296            * Sets the primary key of this password policy rel.
297            *
298            * @param primaryKey the primary key of this password policy rel
299            */
300            @Override
301            public void setPrimaryKey(long primaryKey) {
302                    _passwordPolicyRel.setPrimaryKey(primaryKey);
303            }
304    
305            @Override
306            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
307                    _passwordPolicyRel.setPrimaryKeyObj(primaryKeyObj);
308            }
309    
310            @Override
311            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.PasswordPolicyRel> toCacheModel() {
312                    return _passwordPolicyRel.toCacheModel();
313            }
314    
315            @Override
316            public com.liferay.portal.model.PasswordPolicyRel toEscapedModel() {
317                    return new PasswordPolicyRelWrapper(_passwordPolicyRel.toEscapedModel());
318            }
319    
320            @Override
321            public java.lang.String toString() {
322                    return _passwordPolicyRel.toString();
323            }
324    
325            @Override
326            public com.liferay.portal.model.PasswordPolicyRel toUnescapedModel() {
327                    return new PasswordPolicyRelWrapper(_passwordPolicyRel.toUnescapedModel());
328            }
329    
330            @Override
331            public java.lang.String toXmlString() {
332                    return _passwordPolicyRel.toXmlString();
333            }
334    
335            @Override
336            public boolean equals(Object obj) {
337                    if (this == obj) {
338                            return true;
339                    }
340    
341                    if (!(obj instanceof PasswordPolicyRelWrapper)) {
342                            return false;
343                    }
344    
345                    PasswordPolicyRelWrapper passwordPolicyRelWrapper = (PasswordPolicyRelWrapper)obj;
346    
347                    if (Validator.equals(_passwordPolicyRel,
348                                            passwordPolicyRelWrapper._passwordPolicyRel)) {
349                            return true;
350                    }
351    
352                    return false;
353            }
354    
355            /**
356             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
357             */
358            @Deprecated
359            public PasswordPolicyRel getWrappedPasswordPolicyRel() {
360                    return _passwordPolicyRel;
361            }
362    
363            @Override
364            public PasswordPolicyRel getWrappedModel() {
365                    return _passwordPolicyRel;
366            }
367    
368            @Override
369            public boolean isEntityCacheEnabled() {
370                    return _passwordPolicyRel.isEntityCacheEnabled();
371            }
372    
373            @Override
374            public boolean isFinderCacheEnabled() {
375                    return _passwordPolicyRel.isFinderCacheEnabled();
376            }
377    
378            @Override
379            public void resetOriginalValues() {
380                    _passwordPolicyRel.resetOriginalValues();
381            }
382    
383            private final PasswordPolicyRel _passwordPolicyRel;
384    }