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