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