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