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