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