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.kernel.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.expando.kernel.model.ExpandoBridge;
020    
021    import com.liferay.portal.kernel.service.ServiceContext;
022    
023    import java.io.Serializable;
024    
025    import java.util.HashMap;
026    import java.util.Map;
027    import java.util.Objects;
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 CacheModel<PasswordPolicyRel> toCacheModel() {
110                    return _passwordPolicyRel.toCacheModel();
111            }
112    
113            @Override
114            public PasswordPolicyRel toEscapedModel() {
115                    return new PasswordPolicyRelWrapper(_passwordPolicyRel.toEscapedModel());
116            }
117    
118            @Override
119            public PasswordPolicyRel toUnescapedModel() {
120                    return new PasswordPolicyRelWrapper(_passwordPolicyRel.toUnescapedModel());
121            }
122    
123            @Override
124            public boolean isCachedModel() {
125                    return _passwordPolicyRel.isCachedModel();
126            }
127    
128            @Override
129            public boolean isEscapedModel() {
130                    return _passwordPolicyRel.isEscapedModel();
131            }
132    
133            @Override
134            public boolean isNew() {
135                    return _passwordPolicyRel.isNew();
136            }
137    
138            @Override
139            public ExpandoBridge getExpandoBridge() {
140                    return _passwordPolicyRel.getExpandoBridge();
141            }
142    
143            @Override
144            public int compareTo(PasswordPolicyRel passwordPolicyRel) {
145                    return _passwordPolicyRel.compareTo(passwordPolicyRel);
146            }
147    
148            @Override
149            public int hashCode() {
150                    return _passwordPolicyRel.hashCode();
151            }
152    
153            @Override
154            public Serializable getPrimaryKeyObj() {
155                    return _passwordPolicyRel.getPrimaryKeyObj();
156            }
157    
158            @Override
159            public java.lang.Object clone() {
160                    return new PasswordPolicyRelWrapper((PasswordPolicyRel)_passwordPolicyRel.clone());
161            }
162    
163            /**
164            * Returns the fully qualified class name of this password policy rel.
165            *
166            * @return the fully qualified class name of this password policy rel
167            */
168            @Override
169            public java.lang.String getClassName() {
170                    return _passwordPolicyRel.getClassName();
171            }
172    
173            @Override
174            public java.lang.String toString() {
175                    return _passwordPolicyRel.toString();
176            }
177    
178            @Override
179            public java.lang.String toXmlString() {
180                    return _passwordPolicyRel.toXmlString();
181            }
182    
183            /**
184            * Returns the class name ID of this password policy rel.
185            *
186            * @return the class name ID of this password policy rel
187            */
188            @Override
189            public long getClassNameId() {
190                    return _passwordPolicyRel.getClassNameId();
191            }
192    
193            /**
194            * Returns the class p k of this password policy rel.
195            *
196            * @return the class p k of this password policy rel
197            */
198            @Override
199            public long getClassPK() {
200                    return _passwordPolicyRel.getClassPK();
201            }
202    
203            /**
204            * Returns the company ID of this password policy rel.
205            *
206            * @return the company ID of this password policy rel
207            */
208            @Override
209            public long getCompanyId() {
210                    return _passwordPolicyRel.getCompanyId();
211            }
212    
213            /**
214            * Returns the mvcc version of this password policy rel.
215            *
216            * @return the mvcc version of this password policy rel
217            */
218            @Override
219            public long getMvccVersion() {
220                    return _passwordPolicyRel.getMvccVersion();
221            }
222    
223            /**
224            * Returns the password policy ID of this password policy rel.
225            *
226            * @return the password policy ID of this password policy rel
227            */
228            @Override
229            public long getPasswordPolicyId() {
230                    return _passwordPolicyRel.getPasswordPolicyId();
231            }
232    
233            /**
234            * Returns the password policy rel ID of this password policy rel.
235            *
236            * @return the password policy rel ID of this password policy rel
237            */
238            @Override
239            public long getPasswordPolicyRelId() {
240                    return _passwordPolicyRel.getPasswordPolicyRelId();
241            }
242    
243            /**
244            * Returns the primary key of this password policy rel.
245            *
246            * @return the primary key of this password policy rel
247            */
248            @Override
249            public long getPrimaryKey() {
250                    return _passwordPolicyRel.getPrimaryKey();
251            }
252    
253            @Override
254            public void persist() {
255                    _passwordPolicyRel.persist();
256            }
257    
258            @Override
259            public void setCachedModel(boolean cachedModel) {
260                    _passwordPolicyRel.setCachedModel(cachedModel);
261            }
262    
263            @Override
264            public void setClassName(java.lang.String className) {
265                    _passwordPolicyRel.setClassName(className);
266            }
267    
268            /**
269            * Sets the class name ID of this password policy rel.
270            *
271            * @param classNameId the class name ID of this password policy rel
272            */
273            @Override
274            public void setClassNameId(long classNameId) {
275                    _passwordPolicyRel.setClassNameId(classNameId);
276            }
277    
278            /**
279            * Sets the class p k of this password policy rel.
280            *
281            * @param classPK the class p k of this password policy rel
282            */
283            @Override
284            public void setClassPK(long classPK) {
285                    _passwordPolicyRel.setClassPK(classPK);
286            }
287    
288            /**
289            * Sets the company ID of this password policy rel.
290            *
291            * @param companyId the company ID of this password policy rel
292            */
293            @Override
294            public void setCompanyId(long companyId) {
295                    _passwordPolicyRel.setCompanyId(companyId);
296            }
297    
298            @Override
299            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
300                    _passwordPolicyRel.setExpandoBridgeAttributes(baseModel);
301            }
302    
303            @Override
304            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
305                    _passwordPolicyRel.setExpandoBridgeAttributes(expandoBridge);
306            }
307    
308            @Override
309            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
310                    _passwordPolicyRel.setExpandoBridgeAttributes(serviceContext);
311            }
312    
313            /**
314            * Sets the mvcc version of this password policy rel.
315            *
316            * @param mvccVersion the mvcc version of this password policy rel
317            */
318            @Override
319            public void setMvccVersion(long mvccVersion) {
320                    _passwordPolicyRel.setMvccVersion(mvccVersion);
321            }
322    
323            @Override
324            public void setNew(boolean n) {
325                    _passwordPolicyRel.setNew(n);
326            }
327    
328            /**
329            * Sets the password policy ID of this password policy rel.
330            *
331            * @param passwordPolicyId the password policy ID of this password policy rel
332            */
333            @Override
334            public void setPasswordPolicyId(long passwordPolicyId) {
335                    _passwordPolicyRel.setPasswordPolicyId(passwordPolicyId);
336            }
337    
338            /**
339            * Sets the password policy rel ID of this password policy rel.
340            *
341            * @param passwordPolicyRelId the password policy rel ID of this password policy rel
342            */
343            @Override
344            public void setPasswordPolicyRelId(long passwordPolicyRelId) {
345                    _passwordPolicyRel.setPasswordPolicyRelId(passwordPolicyRelId);
346            }
347    
348            /**
349            * Sets the primary key of this password policy rel.
350            *
351            * @param primaryKey the primary key of this password policy rel
352            */
353            @Override
354            public void setPrimaryKey(long primaryKey) {
355                    _passwordPolicyRel.setPrimaryKey(primaryKey);
356            }
357    
358            @Override
359            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
360                    _passwordPolicyRel.setPrimaryKeyObj(primaryKeyObj);
361            }
362    
363            @Override
364            public boolean equals(Object obj) {
365                    if (this == obj) {
366                            return true;
367                    }
368    
369                    if (!(obj instanceof PasswordPolicyRelWrapper)) {
370                            return false;
371                    }
372    
373                    PasswordPolicyRelWrapper passwordPolicyRelWrapper = (PasswordPolicyRelWrapper)obj;
374    
375                    if (Objects.equals(_passwordPolicyRel,
376                                            passwordPolicyRelWrapper._passwordPolicyRel)) {
377                            return true;
378                    }
379    
380                    return false;
381            }
382    
383            @Override
384            public PasswordPolicyRel getWrappedModel() {
385                    return _passwordPolicyRel;
386            }
387    
388            @Override
389            public boolean isEntityCacheEnabled() {
390                    return _passwordPolicyRel.isEntityCacheEnabled();
391            }
392    
393            @Override
394            public boolean isFinderCacheEnabled() {
395                    return _passwordPolicyRel.isFinderCacheEnabled();
396            }
397    
398            @Override
399            public void resetOriginalValues() {
400                    _passwordPolicyRel.resetOriginalValues();
401            }
402    
403            private final PasswordPolicyRel _passwordPolicyRel;
404    }