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