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