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