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