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