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    import com.liferay.portal.kernel.util.Validator;
025    
026    import java.io.Serializable;
027    
028    import java.util.Date;
029    import java.util.HashMap;
030    import java.util.Map;
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 java.lang.Object clone() {
154                    return new TeamWrapper((Team)_team.clone());
155            }
156    
157            @Override
158            public int compareTo(com.liferay.portal.kernel.model.Team team) {
159                    return _team.compareTo(team);
160            }
161    
162            /**
163            * Returns the company ID of this team.
164            *
165            * @return the company ID of this team
166            */
167            @Override
168            public long getCompanyId() {
169                    return _team.getCompanyId();
170            }
171    
172            /**
173            * Returns the create date of this team.
174            *
175            * @return the create date of this team
176            */
177            @Override
178            public Date getCreateDate() {
179                    return _team.getCreateDate();
180            }
181    
182            /**
183            * Returns the description of this team.
184            *
185            * @return the description of this team
186            */
187            @Override
188            public java.lang.String getDescription() {
189                    return _team.getDescription();
190            }
191    
192            @Override
193            public ExpandoBridge getExpandoBridge() {
194                    return _team.getExpandoBridge();
195            }
196    
197            /**
198            * Returns the group ID of this team.
199            *
200            * @return the group ID of this team
201            */
202            @Override
203            public long getGroupId() {
204                    return _team.getGroupId();
205            }
206    
207            /**
208            * Returns the last publish date of this team.
209            *
210            * @return the last publish date of this team
211            */
212            @Override
213            public Date getLastPublishDate() {
214                    return _team.getLastPublishDate();
215            }
216    
217            /**
218            * Returns the modified date of this team.
219            *
220            * @return the modified date of this team
221            */
222            @Override
223            public Date getModifiedDate() {
224                    return _team.getModifiedDate();
225            }
226    
227            /**
228            * Returns the mvcc version of this team.
229            *
230            * @return the mvcc version of this team
231            */
232            @Override
233            public long getMvccVersion() {
234                    return _team.getMvccVersion();
235            }
236    
237            /**
238            * Returns the name of this team.
239            *
240            * @return the name of this team
241            */
242            @Override
243            public java.lang.String getName() {
244                    return _team.getName();
245            }
246    
247            /**
248            * Returns the primary key of this team.
249            *
250            * @return the primary key of this team
251            */
252            @Override
253            public long getPrimaryKey() {
254                    return _team.getPrimaryKey();
255            }
256    
257            @Override
258            public Serializable getPrimaryKeyObj() {
259                    return _team.getPrimaryKeyObj();
260            }
261    
262            @Override
263            public com.liferay.portal.kernel.model.Role getRole()
264                    throws com.liferay.portal.kernel.exception.PortalException {
265                    return _team.getRole();
266            }
267    
268            /**
269            * Returns the team ID of this team.
270            *
271            * @return the team ID of this team
272            */
273            @Override
274            public long getTeamId() {
275                    return _team.getTeamId();
276            }
277    
278            /**
279            * Returns the user ID of this team.
280            *
281            * @return the user ID of this team
282            */
283            @Override
284            public long getUserId() {
285                    return _team.getUserId();
286            }
287    
288            /**
289            * Returns the user name of this team.
290            *
291            * @return the user name of this team
292            */
293            @Override
294            public java.lang.String getUserName() {
295                    return _team.getUserName();
296            }
297    
298            /**
299            * Returns the user uuid of this team.
300            *
301            * @return the user uuid of this team
302            */
303            @Override
304            public java.lang.String getUserUuid() {
305                    return _team.getUserUuid();
306            }
307    
308            /**
309            * Returns the uuid of this team.
310            *
311            * @return the uuid of this team
312            */
313            @Override
314            public java.lang.String getUuid() {
315                    return _team.getUuid();
316            }
317    
318            @Override
319            public int hashCode() {
320                    return _team.hashCode();
321            }
322    
323            @Override
324            public boolean isCachedModel() {
325                    return _team.isCachedModel();
326            }
327    
328            @Override
329            public boolean isEscapedModel() {
330                    return _team.isEscapedModel();
331            }
332    
333            @Override
334            public boolean isNew() {
335                    return _team.isNew();
336            }
337    
338            @Override
339            public void persist() {
340                    _team.persist();
341            }
342    
343            @Override
344            public void setCachedModel(boolean cachedModel) {
345                    _team.setCachedModel(cachedModel);
346            }
347    
348            /**
349            * Sets the company ID of this team.
350            *
351            * @param companyId the company ID of this team
352            */
353            @Override
354            public void setCompanyId(long companyId) {
355                    _team.setCompanyId(companyId);
356            }
357    
358            /**
359            * Sets the create date of this team.
360            *
361            * @param createDate the create date of this team
362            */
363            @Override
364            public void setCreateDate(Date createDate) {
365                    _team.setCreateDate(createDate);
366            }
367    
368            /**
369            * Sets the description of this team.
370            *
371            * @param description the description of this team
372            */
373            @Override
374            public void setDescription(java.lang.String description) {
375                    _team.setDescription(description);
376            }
377    
378            @Override
379            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
380                    _team.setExpandoBridgeAttributes(baseModel);
381            }
382    
383            @Override
384            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
385                    _team.setExpandoBridgeAttributes(expandoBridge);
386            }
387    
388            @Override
389            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
390                    _team.setExpandoBridgeAttributes(serviceContext);
391            }
392    
393            /**
394            * Sets the group ID of this team.
395            *
396            * @param groupId the group ID of this team
397            */
398            @Override
399            public void setGroupId(long groupId) {
400                    _team.setGroupId(groupId);
401            }
402    
403            /**
404            * Sets the last publish date of this team.
405            *
406            * @param lastPublishDate the last publish date of this team
407            */
408            @Override
409            public void setLastPublishDate(Date lastPublishDate) {
410                    _team.setLastPublishDate(lastPublishDate);
411            }
412    
413            /**
414            * Sets the modified date of this team.
415            *
416            * @param modifiedDate the modified date of this team
417            */
418            @Override
419            public void setModifiedDate(Date modifiedDate) {
420                    _team.setModifiedDate(modifiedDate);
421            }
422    
423            /**
424            * Sets the mvcc version of this team.
425            *
426            * @param mvccVersion the mvcc version of this team
427            */
428            @Override
429            public void setMvccVersion(long mvccVersion) {
430                    _team.setMvccVersion(mvccVersion);
431            }
432    
433            /**
434            * Sets the name of this team.
435            *
436            * @param name the name of this team
437            */
438            @Override
439            public void setName(java.lang.String name) {
440                    _team.setName(name);
441            }
442    
443            @Override
444            public void setNew(boolean n) {
445                    _team.setNew(n);
446            }
447    
448            /**
449            * Sets the primary key of this team.
450            *
451            * @param primaryKey the primary key of this team
452            */
453            @Override
454            public void setPrimaryKey(long primaryKey) {
455                    _team.setPrimaryKey(primaryKey);
456            }
457    
458            @Override
459            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
460                    _team.setPrimaryKeyObj(primaryKeyObj);
461            }
462    
463            /**
464            * Sets the team ID of this team.
465            *
466            * @param teamId the team ID of this team
467            */
468            @Override
469            public void setTeamId(long teamId) {
470                    _team.setTeamId(teamId);
471            }
472    
473            /**
474            * Sets the user ID of this team.
475            *
476            * @param userId the user ID of this team
477            */
478            @Override
479            public void setUserId(long userId) {
480                    _team.setUserId(userId);
481            }
482    
483            /**
484            * Sets the user name of this team.
485            *
486            * @param userName the user name of this team
487            */
488            @Override
489            public void setUserName(java.lang.String userName) {
490                    _team.setUserName(userName);
491            }
492    
493            /**
494            * Sets the user uuid of this team.
495            *
496            * @param userUuid the user uuid of this team
497            */
498            @Override
499            public void setUserUuid(java.lang.String userUuid) {
500                    _team.setUserUuid(userUuid);
501            }
502    
503            /**
504            * Sets the uuid of this team.
505            *
506            * @param uuid the uuid of this team
507            */
508            @Override
509            public void setUuid(java.lang.String uuid) {
510                    _team.setUuid(uuid);
511            }
512    
513            @Override
514            public CacheModel<com.liferay.portal.kernel.model.Team> toCacheModel() {
515                    return _team.toCacheModel();
516            }
517    
518            @Override
519            public com.liferay.portal.kernel.model.Team toEscapedModel() {
520                    return new TeamWrapper(_team.toEscapedModel());
521            }
522    
523            @Override
524            public java.lang.String toString() {
525                    return _team.toString();
526            }
527    
528            @Override
529            public com.liferay.portal.kernel.model.Team toUnescapedModel() {
530                    return new TeamWrapper(_team.toUnescapedModel());
531            }
532    
533            @Override
534            public java.lang.String toXmlString() {
535                    return _team.toXmlString();
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 (Validator.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    }