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