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 java.util.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 java.util.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(java.util.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(
339                    com.liferay.portal.model.BaseModel<?> baseModel) {
340                    _team.setExpandoBridgeAttributes(baseModel);
341            }
342    
343            @Override
344            public void setExpandoBridgeAttributes(
345                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
346                    _team.setExpandoBridgeAttributes(expandoBridge);
347            }
348    
349            @Override
350            public void setExpandoBridgeAttributes(
351                    com.liferay.portal.service.ServiceContext serviceContext) {
352                    _team.setExpandoBridgeAttributes(serviceContext);
353            }
354    
355            /**
356            * Sets the group ID of this team.
357            *
358            * @param groupId the group ID of this team
359            */
360            @Override
361            public void setGroupId(long groupId) {
362                    _team.setGroupId(groupId);
363            }
364    
365            /**
366            * Sets the modified date of this team.
367            *
368            * @param modifiedDate the modified date of this team
369            */
370            @Override
371            public void setModifiedDate(java.util.Date modifiedDate) {
372                    _team.setModifiedDate(modifiedDate);
373            }
374    
375            /**
376            * Sets the mvcc version of this team.
377            *
378            * @param mvccVersion the mvcc version of this team
379            */
380            @Override
381            public void setMvccVersion(long mvccVersion) {
382                    _team.setMvccVersion(mvccVersion);
383            }
384    
385            /**
386            * Sets the name of this team.
387            *
388            * @param name the name of this team
389            */
390            @Override
391            public void setName(java.lang.String name) {
392                    _team.setName(name);
393            }
394    
395            @Override
396            public void setNew(boolean n) {
397                    _team.setNew(n);
398            }
399    
400            /**
401            * Sets the primary key of this team.
402            *
403            * @param primaryKey the primary key of this team
404            */
405            @Override
406            public void setPrimaryKey(long primaryKey) {
407                    _team.setPrimaryKey(primaryKey);
408            }
409    
410            @Override
411            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
412                    _team.setPrimaryKeyObj(primaryKeyObj);
413            }
414    
415            /**
416            * Sets the team ID of this team.
417            *
418            * @param teamId the team ID of this team
419            */
420            @Override
421            public void setTeamId(long teamId) {
422                    _team.setTeamId(teamId);
423            }
424    
425            /**
426            * Sets the user ID of this team.
427            *
428            * @param userId the user ID of this team
429            */
430            @Override
431            public void setUserId(long userId) {
432                    _team.setUserId(userId);
433            }
434    
435            /**
436            * Sets the user name of this team.
437            *
438            * @param userName the user name of this team
439            */
440            @Override
441            public void setUserName(java.lang.String userName) {
442                    _team.setUserName(userName);
443            }
444    
445            /**
446            * Sets the user uuid of this team.
447            *
448            * @param userUuid the user uuid of this team
449            */
450            @Override
451            public void setUserUuid(java.lang.String userUuid) {
452                    _team.setUserUuid(userUuid);
453            }
454    
455            @Override
456            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Team> toCacheModel() {
457                    return _team.toCacheModel();
458            }
459    
460            @Override
461            public com.liferay.portal.model.Team toEscapedModel() {
462                    return new TeamWrapper(_team.toEscapedModel());
463            }
464    
465            @Override
466            public java.lang.String toString() {
467                    return _team.toString();
468            }
469    
470            @Override
471            public com.liferay.portal.model.Team toUnescapedModel() {
472                    return new TeamWrapper(_team.toUnescapedModel());
473            }
474    
475            @Override
476            public java.lang.String toXmlString() {
477                    return _team.toXmlString();
478            }
479    
480            @Override
481            public boolean equals(Object obj) {
482                    if (this == obj) {
483                            return true;
484                    }
485    
486                    if (!(obj instanceof TeamWrapper)) {
487                            return false;
488                    }
489    
490                    TeamWrapper teamWrapper = (TeamWrapper)obj;
491    
492                    if (Validator.equals(_team, teamWrapper._team)) {
493                            return true;
494                    }
495    
496                    return false;
497            }
498    
499            /**
500             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
501             */
502            @Deprecated
503            public Team getWrappedTeam() {
504                    return _team;
505            }
506    
507            @Override
508            public Team getWrappedModel() {
509                    return _team;
510            }
511    
512            @Override
513            public boolean isEntityCacheEnabled() {
514                    return _team.isEntityCacheEnabled();
515            }
516    
517            @Override
518            public boolean isFinderCacheEnabled() {
519                    return _team.isFinderCacheEnabled();
520            }
521    
522            @Override
523            public void resetOriginalValues() {
524                    _team.resetOriginalValues();
525            }
526    
527            private final Team _team;
528    }