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