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