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