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