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