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