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