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