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    import com.liferay.portal.kernel.util.Validator;
026    
027    import java.io.Serializable;
028    
029    import java.util.Date;
030    import java.util.HashMap;
031    import java.util.Map;
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 java.lang.Object clone() {
141                    return new MBBanWrapper((MBBan)_mbBan.clone());
142            }
143    
144            @Override
145            public int compareTo(com.liferay.message.boards.kernel.model.MBBan mbBan) {
146                    return _mbBan.compareTo(mbBan);
147            }
148    
149            /**
150            * Returns the ban ID of this message boards ban.
151            *
152            * @return the ban ID of this message boards ban
153            */
154            @Override
155            public long getBanId() {
156                    return _mbBan.getBanId();
157            }
158    
159            /**
160            * Returns the ban user ID of this message boards ban.
161            *
162            * @return the ban user ID of this message boards ban
163            */
164            @Override
165            public long getBanUserId() {
166                    return _mbBan.getBanUserId();
167            }
168    
169            /**
170            * Returns the ban user uuid of this message boards ban.
171            *
172            * @return the ban user uuid of this message boards ban
173            */
174            @Override
175            public java.lang.String getBanUserUuid() {
176                    return _mbBan.getBanUserUuid();
177            }
178    
179            /**
180            * Returns the company ID of this message boards ban.
181            *
182            * @return the company ID of this message boards ban
183            */
184            @Override
185            public long getCompanyId() {
186                    return _mbBan.getCompanyId();
187            }
188    
189            /**
190            * Returns the create date of this message boards ban.
191            *
192            * @return the create date of this message boards ban
193            */
194            @Override
195            public Date getCreateDate() {
196                    return _mbBan.getCreateDate();
197            }
198    
199            @Override
200            public ExpandoBridge getExpandoBridge() {
201                    return _mbBan.getExpandoBridge();
202            }
203    
204            /**
205            * Returns the group ID of this message boards ban.
206            *
207            * @return the group ID of this message boards ban
208            */
209            @Override
210            public long getGroupId() {
211                    return _mbBan.getGroupId();
212            }
213    
214            /**
215            * Returns the last publish date of this message boards ban.
216            *
217            * @return the last publish date of this message boards ban
218            */
219            @Override
220            public Date getLastPublishDate() {
221                    return _mbBan.getLastPublishDate();
222            }
223    
224            /**
225            * Returns the modified date of this message boards ban.
226            *
227            * @return the modified date of this message boards ban
228            */
229            @Override
230            public Date getModifiedDate() {
231                    return _mbBan.getModifiedDate();
232            }
233    
234            /**
235            * Returns the primary key of this message boards ban.
236            *
237            * @return the primary key of this message boards ban
238            */
239            @Override
240            public long getPrimaryKey() {
241                    return _mbBan.getPrimaryKey();
242            }
243    
244            @Override
245            public Serializable getPrimaryKeyObj() {
246                    return _mbBan.getPrimaryKeyObj();
247            }
248    
249            /**
250            * Returns the user ID of this message boards ban.
251            *
252            * @return the user ID of this message boards ban
253            */
254            @Override
255            public long getUserId() {
256                    return _mbBan.getUserId();
257            }
258    
259            /**
260            * Returns the user name of this message boards ban.
261            *
262            * @return the user name of this message boards ban
263            */
264            @Override
265            public java.lang.String getUserName() {
266                    return _mbBan.getUserName();
267            }
268    
269            /**
270            * Returns the user uuid of this message boards ban.
271            *
272            * @return the user uuid of this message boards ban
273            */
274            @Override
275            public java.lang.String getUserUuid() {
276                    return _mbBan.getUserUuid();
277            }
278    
279            /**
280            * Returns the uuid of this message boards ban.
281            *
282            * @return the uuid of this message boards ban
283            */
284            @Override
285            public java.lang.String getUuid() {
286                    return _mbBan.getUuid();
287            }
288    
289            @Override
290            public int hashCode() {
291                    return _mbBan.hashCode();
292            }
293    
294            @Override
295            public boolean isCachedModel() {
296                    return _mbBan.isCachedModel();
297            }
298    
299            @Override
300            public boolean isEscapedModel() {
301                    return _mbBan.isEscapedModel();
302            }
303    
304            @Override
305            public boolean isNew() {
306                    return _mbBan.isNew();
307            }
308    
309            @Override
310            public void persist() {
311                    _mbBan.persist();
312            }
313    
314            /**
315            * Sets the ban ID of this message boards ban.
316            *
317            * @param banId the ban ID of this message boards ban
318            */
319            @Override
320            public void setBanId(long banId) {
321                    _mbBan.setBanId(banId);
322            }
323    
324            /**
325            * Sets the ban user ID of this message boards ban.
326            *
327            * @param banUserId the ban user ID of this message boards ban
328            */
329            @Override
330            public void setBanUserId(long banUserId) {
331                    _mbBan.setBanUserId(banUserId);
332            }
333    
334            /**
335            * Sets the ban user uuid of this message boards ban.
336            *
337            * @param banUserUuid the ban user uuid of this message boards ban
338            */
339            @Override
340            public void setBanUserUuid(java.lang.String banUserUuid) {
341                    _mbBan.setBanUserUuid(banUserUuid);
342            }
343    
344            @Override
345            public void setCachedModel(boolean cachedModel) {
346                    _mbBan.setCachedModel(cachedModel);
347            }
348    
349            /**
350            * Sets the company ID of this message boards ban.
351            *
352            * @param companyId the company ID of this message boards ban
353            */
354            @Override
355            public void setCompanyId(long companyId) {
356                    _mbBan.setCompanyId(companyId);
357            }
358    
359            /**
360            * Sets the create date of this message boards ban.
361            *
362            * @param createDate the create date of this message boards ban
363            */
364            @Override
365            public void setCreateDate(Date createDate) {
366                    _mbBan.setCreateDate(createDate);
367            }
368    
369            @Override
370            public void setExpandoBridgeAttributes(
371                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
372                    _mbBan.setExpandoBridgeAttributes(baseModel);
373            }
374    
375            @Override
376            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
377                    _mbBan.setExpandoBridgeAttributes(expandoBridge);
378            }
379    
380            @Override
381            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
382                    _mbBan.setExpandoBridgeAttributes(serviceContext);
383            }
384    
385            /**
386            * Sets the group ID of this message boards ban.
387            *
388            * @param groupId the group ID of this message boards ban
389            */
390            @Override
391            public void setGroupId(long groupId) {
392                    _mbBan.setGroupId(groupId);
393            }
394    
395            /**
396            * Sets the last publish date of this message boards ban.
397            *
398            * @param lastPublishDate the last publish date of this message boards ban
399            */
400            @Override
401            public void setLastPublishDate(Date lastPublishDate) {
402                    _mbBan.setLastPublishDate(lastPublishDate);
403            }
404    
405            /**
406            * Sets the modified date of this message boards ban.
407            *
408            * @param modifiedDate the modified date of this message boards ban
409            */
410            @Override
411            public void setModifiedDate(Date modifiedDate) {
412                    _mbBan.setModifiedDate(modifiedDate);
413            }
414    
415            @Override
416            public void setNew(boolean n) {
417                    _mbBan.setNew(n);
418            }
419    
420            /**
421            * Sets the primary key of this message boards ban.
422            *
423            * @param primaryKey the primary key of this message boards ban
424            */
425            @Override
426            public void setPrimaryKey(long primaryKey) {
427                    _mbBan.setPrimaryKey(primaryKey);
428            }
429    
430            @Override
431            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
432                    _mbBan.setPrimaryKeyObj(primaryKeyObj);
433            }
434    
435            /**
436            * Sets the user ID of this message boards ban.
437            *
438            * @param userId the user ID of this message boards ban
439            */
440            @Override
441            public void setUserId(long userId) {
442                    _mbBan.setUserId(userId);
443            }
444    
445            /**
446            * Sets the user name of this message boards ban.
447            *
448            * @param userName the user name of this message boards ban
449            */
450            @Override
451            public void setUserName(java.lang.String userName) {
452                    _mbBan.setUserName(userName);
453            }
454    
455            /**
456            * Sets the user uuid of this message boards ban.
457            *
458            * @param userUuid the user uuid of this message boards ban
459            */
460            @Override
461            public void setUserUuid(java.lang.String userUuid) {
462                    _mbBan.setUserUuid(userUuid);
463            }
464    
465            /**
466            * Sets the uuid of this message boards ban.
467            *
468            * @param uuid the uuid of this message boards ban
469            */
470            @Override
471            public void setUuid(java.lang.String uuid) {
472                    _mbBan.setUuid(uuid);
473            }
474    
475            @Override
476            public com.liferay.portal.kernel.model.CacheModel<com.liferay.message.boards.kernel.model.MBBan> toCacheModel() {
477                    return _mbBan.toCacheModel();
478            }
479    
480            @Override
481            public com.liferay.message.boards.kernel.model.MBBan toEscapedModel() {
482                    return new MBBanWrapper(_mbBan.toEscapedModel());
483            }
484    
485            @Override
486            public java.lang.String toString() {
487                    return _mbBan.toString();
488            }
489    
490            @Override
491            public com.liferay.message.boards.kernel.model.MBBan toUnescapedModel() {
492                    return new MBBanWrapper(_mbBan.toUnescapedModel());
493            }
494    
495            @Override
496            public java.lang.String toXmlString() {
497                    return _mbBan.toXmlString();
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 (Validator.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    }