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.impl;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.json.JSON;
022    import com.liferay.portal.kernel.util.GetterUtil;
023    import com.liferay.portal.kernel.util.ProxyUtil;
024    import com.liferay.portal.kernel.util.StringBundler;
025    import com.liferay.portal.kernel.util.StringPool;
026    import com.liferay.portal.model.CacheModel;
027    import com.liferay.portal.model.Team;
028    import com.liferay.portal.model.TeamModel;
029    import com.liferay.portal.model.TeamSoap;
030    import com.liferay.portal.model.User;
031    import com.liferay.portal.service.ServiceContext;
032    import com.liferay.portal.service.UserLocalServiceUtil;
033    import com.liferay.portal.util.PortalUtil;
034    
035    import com.liferay.portlet.expando.model.ExpandoBridge;
036    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
037    import com.liferay.portlet.exportimport.lar.StagedModelType;
038    
039    import java.io.Serializable;
040    
041    import java.sql.Types;
042    
043    import java.util.ArrayList;
044    import java.util.Date;
045    import java.util.HashMap;
046    import java.util.List;
047    import java.util.Map;
048    
049    /**
050     * The base model implementation for the Team service. Represents a row in the "Team" database table, with each column mapped to a property of this class.
051     *
052     * <p>
053     * This implementation and its corresponding interface {@link TeamModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link TeamImpl}.
054     * </p>
055     *
056     * @author Brian Wing Shun Chan
057     * @see TeamImpl
058     * @see Team
059     * @see TeamModel
060     * @generated
061     */
062    @JSON(strict = true)
063    @ProviderType
064    public class TeamModelImpl extends BaseModelImpl<Team> implements TeamModel {
065            /*
066             * NOTE FOR DEVELOPERS:
067             *
068             * Never modify or reference this class directly. All methods that expect a team model instance should use the {@link Team} interface instead.
069             */
070            public static final String TABLE_NAME = "Team";
071            public static final Object[][] TABLE_COLUMNS = {
072                            { "mvccVersion", Types.BIGINT },
073                            { "uuid_", Types.VARCHAR },
074                            { "teamId", Types.BIGINT },
075                            { "companyId", Types.BIGINT },
076                            { "userId", Types.BIGINT },
077                            { "userName", Types.VARCHAR },
078                            { "createDate", Types.TIMESTAMP },
079                            { "modifiedDate", Types.TIMESTAMP },
080                            { "groupId", Types.BIGINT },
081                            { "name", Types.VARCHAR },
082                            { "description", Types.VARCHAR },
083                            { "lastPublishDate", Types.TIMESTAMP }
084                    };
085            public static final Map<String, Integer> TABLE_COLUMNS_MAP = new HashMap<String, Integer>();
086    
087            static {
088                    TABLE_COLUMNS_MAP.put("mvccVersion", Types.BIGINT);
089                    TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR);
090                    TABLE_COLUMNS_MAP.put("teamId", Types.BIGINT);
091                    TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT);
092                    TABLE_COLUMNS_MAP.put("userId", Types.BIGINT);
093                    TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR);
094                    TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP);
095                    TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP);
096                    TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT);
097                    TABLE_COLUMNS_MAP.put("name", Types.VARCHAR);
098                    TABLE_COLUMNS_MAP.put("description", Types.VARCHAR);
099                    TABLE_COLUMNS_MAP.put("lastPublishDate", Types.TIMESTAMP);
100            }
101    
102            public static final String TABLE_SQL_CREATE = "create table Team (mvccVersion LONG default 0,uuid_ VARCHAR(75) null,teamId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,name VARCHAR(75) null,description STRING null,lastPublishDate DATE null)";
103            public static final String TABLE_SQL_DROP = "drop table Team";
104            public static final String ORDER_BY_JPQL = " ORDER BY team.name ASC";
105            public static final String ORDER_BY_SQL = " ORDER BY Team.name ASC";
106            public static final String DATA_SOURCE = "liferayDataSource";
107            public static final String SESSION_FACTORY = "liferaySessionFactory";
108            public static final String TX_MANAGER = "liferayTransactionManager";
109            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
110                                    "value.object.entity.cache.enabled.com.liferay.portal.model.Team"),
111                            true);
112            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
113                                    "value.object.finder.cache.enabled.com.liferay.portal.model.Team"),
114                            true);
115            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
116                                    "value.object.column.bitmask.enabled.com.liferay.portal.model.Team"),
117                            true);
118            public static final long COMPANYID_COLUMN_BITMASK = 1L;
119            public static final long GROUPID_COLUMN_BITMASK = 2L;
120            public static final long NAME_COLUMN_BITMASK = 4L;
121            public static final long UUID_COLUMN_BITMASK = 8L;
122    
123            /**
124             * Converts the soap model instance into a normal model instance.
125             *
126             * @param soapModel the soap model instance to convert
127             * @return the normal model instance
128             */
129            public static Team toModel(TeamSoap soapModel) {
130                    if (soapModel == null) {
131                            return null;
132                    }
133    
134                    Team model = new TeamImpl();
135    
136                    model.setMvccVersion(soapModel.getMvccVersion());
137                    model.setUuid(soapModel.getUuid());
138                    model.setTeamId(soapModel.getTeamId());
139                    model.setCompanyId(soapModel.getCompanyId());
140                    model.setUserId(soapModel.getUserId());
141                    model.setUserName(soapModel.getUserName());
142                    model.setCreateDate(soapModel.getCreateDate());
143                    model.setModifiedDate(soapModel.getModifiedDate());
144                    model.setGroupId(soapModel.getGroupId());
145                    model.setName(soapModel.getName());
146                    model.setDescription(soapModel.getDescription());
147                    model.setLastPublishDate(soapModel.getLastPublishDate());
148    
149                    return model;
150            }
151    
152            /**
153             * Converts the soap model instances into normal model instances.
154             *
155             * @param soapModels the soap model instances to convert
156             * @return the normal model instances
157             */
158            public static List<Team> toModels(TeamSoap[] soapModels) {
159                    if (soapModels == null) {
160                            return null;
161                    }
162    
163                    List<Team> models = new ArrayList<Team>(soapModels.length);
164    
165                    for (TeamSoap soapModel : soapModels) {
166                            models.add(toModel(soapModel));
167                    }
168    
169                    return models;
170            }
171    
172            public static final String MAPPING_TABLE_USERS_TEAMS_NAME = "Users_Teams";
173            public static final Object[][] MAPPING_TABLE_USERS_TEAMS_COLUMNS = {
174                            { "companyId", Types.BIGINT },
175                            { "teamId", Types.BIGINT },
176                            { "userId", Types.BIGINT }
177                    };
178            public static final String MAPPING_TABLE_USERS_TEAMS_SQL_CREATE = "create table Users_Teams (companyId LONG not null,teamId LONG not null,userId LONG not null,primary key (teamId, userId))";
179            public static final boolean FINDER_CACHE_ENABLED_USERS_TEAMS = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
180                                    "value.object.finder.cache.enabled.Users_Teams"), true);
181            public static final String MAPPING_TABLE_USERGROUPS_TEAMS_NAME = "UserGroups_Teams";
182            public static final Object[][] MAPPING_TABLE_USERGROUPS_TEAMS_COLUMNS = {
183                            { "companyId", Types.BIGINT },
184                            { "teamId", Types.BIGINT },
185                            { "userGroupId", Types.BIGINT }
186                    };
187            public static final String MAPPING_TABLE_USERGROUPS_TEAMS_SQL_CREATE = "create table UserGroups_Teams (companyId LONG not null,teamId LONG not null,userGroupId LONG not null,primary key (teamId, userGroupId))";
188            public static final boolean FINDER_CACHE_ENABLED_USERGROUPS_TEAMS = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
189                                    "value.object.finder.cache.enabled.UserGroups_Teams"), true);
190            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
191                                    "lock.expiration.time.com.liferay.portal.model.Team"));
192    
193            public TeamModelImpl() {
194            }
195    
196            @Override
197            public long getPrimaryKey() {
198                    return _teamId;
199            }
200    
201            @Override
202            public void setPrimaryKey(long primaryKey) {
203                    setTeamId(primaryKey);
204            }
205    
206            @Override
207            public Serializable getPrimaryKeyObj() {
208                    return _teamId;
209            }
210    
211            @Override
212            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
213                    setPrimaryKey(((Long)primaryKeyObj).longValue());
214            }
215    
216            @Override
217            public Class<?> getModelClass() {
218                    return Team.class;
219            }
220    
221            @Override
222            public String getModelClassName() {
223                    return Team.class.getName();
224            }
225    
226            @Override
227            public Map<String, Object> getModelAttributes() {
228                    Map<String, Object> attributes = new HashMap<String, Object>();
229    
230                    attributes.put("mvccVersion", getMvccVersion());
231                    attributes.put("uuid", getUuid());
232                    attributes.put("teamId", getTeamId());
233                    attributes.put("companyId", getCompanyId());
234                    attributes.put("userId", getUserId());
235                    attributes.put("userName", getUserName());
236                    attributes.put("createDate", getCreateDate());
237                    attributes.put("modifiedDate", getModifiedDate());
238                    attributes.put("groupId", getGroupId());
239                    attributes.put("name", getName());
240                    attributes.put("description", getDescription());
241                    attributes.put("lastPublishDate", getLastPublishDate());
242    
243                    attributes.put("entityCacheEnabled", isEntityCacheEnabled());
244                    attributes.put("finderCacheEnabled", isFinderCacheEnabled());
245    
246                    return attributes;
247            }
248    
249            @Override
250            public void setModelAttributes(Map<String, Object> attributes) {
251                    Long mvccVersion = (Long)attributes.get("mvccVersion");
252    
253                    if (mvccVersion != null) {
254                            setMvccVersion(mvccVersion);
255                    }
256    
257                    String uuid = (String)attributes.get("uuid");
258    
259                    if (uuid != null) {
260                            setUuid(uuid);
261                    }
262    
263                    Long teamId = (Long)attributes.get("teamId");
264    
265                    if (teamId != null) {
266                            setTeamId(teamId);
267                    }
268    
269                    Long companyId = (Long)attributes.get("companyId");
270    
271                    if (companyId != null) {
272                            setCompanyId(companyId);
273                    }
274    
275                    Long userId = (Long)attributes.get("userId");
276    
277                    if (userId != null) {
278                            setUserId(userId);
279                    }
280    
281                    String userName = (String)attributes.get("userName");
282    
283                    if (userName != null) {
284                            setUserName(userName);
285                    }
286    
287                    Date createDate = (Date)attributes.get("createDate");
288    
289                    if (createDate != null) {
290                            setCreateDate(createDate);
291                    }
292    
293                    Date modifiedDate = (Date)attributes.get("modifiedDate");
294    
295                    if (modifiedDate != null) {
296                            setModifiedDate(modifiedDate);
297                    }
298    
299                    Long groupId = (Long)attributes.get("groupId");
300    
301                    if (groupId != null) {
302                            setGroupId(groupId);
303                    }
304    
305                    String name = (String)attributes.get("name");
306    
307                    if (name != null) {
308                            setName(name);
309                    }
310    
311                    String description = (String)attributes.get("description");
312    
313                    if (description != null) {
314                            setDescription(description);
315                    }
316    
317                    Date lastPublishDate = (Date)attributes.get("lastPublishDate");
318    
319                    if (lastPublishDate != null) {
320                            setLastPublishDate(lastPublishDate);
321                    }
322            }
323    
324            @JSON
325            @Override
326            public long getMvccVersion() {
327                    return _mvccVersion;
328            }
329    
330            @Override
331            public void setMvccVersion(long mvccVersion) {
332                    _mvccVersion = mvccVersion;
333            }
334    
335            @JSON
336            @Override
337            public String getUuid() {
338                    if (_uuid == null) {
339                            return StringPool.BLANK;
340                    }
341                    else {
342                            return _uuid;
343                    }
344            }
345    
346            @Override
347            public void setUuid(String uuid) {
348                    if (_originalUuid == null) {
349                            _originalUuid = _uuid;
350                    }
351    
352                    _uuid = uuid;
353            }
354    
355            public String getOriginalUuid() {
356                    return GetterUtil.getString(_originalUuid);
357            }
358    
359            @JSON
360            @Override
361            public long getTeamId() {
362                    return _teamId;
363            }
364    
365            @Override
366            public void setTeamId(long teamId) {
367                    _teamId = teamId;
368            }
369    
370            @JSON
371            @Override
372            public long getCompanyId() {
373                    return _companyId;
374            }
375    
376            @Override
377            public void setCompanyId(long companyId) {
378                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
379    
380                    if (!_setOriginalCompanyId) {
381                            _setOriginalCompanyId = true;
382    
383                            _originalCompanyId = _companyId;
384                    }
385    
386                    _companyId = companyId;
387            }
388    
389            public long getOriginalCompanyId() {
390                    return _originalCompanyId;
391            }
392    
393            @JSON
394            @Override
395            public long getUserId() {
396                    return _userId;
397            }
398    
399            @Override
400            public void setUserId(long userId) {
401                    _userId = userId;
402            }
403    
404            @Override
405            public String getUserUuid() {
406                    try {
407                            User user = UserLocalServiceUtil.getUserById(getUserId());
408    
409                            return user.getUuid();
410                    }
411                    catch (PortalException pe) {
412                            return StringPool.BLANK;
413                    }
414            }
415    
416            @Override
417            public void setUserUuid(String userUuid) {
418            }
419    
420            @JSON
421            @Override
422            public String getUserName() {
423                    if (_userName == null) {
424                            return StringPool.BLANK;
425                    }
426                    else {
427                            return _userName;
428                    }
429            }
430    
431            @Override
432            public void setUserName(String userName) {
433                    _userName = userName;
434            }
435    
436            @JSON
437            @Override
438            public Date getCreateDate() {
439                    return _createDate;
440            }
441    
442            @Override
443            public void setCreateDate(Date createDate) {
444                    _createDate = createDate;
445            }
446    
447            @JSON
448            @Override
449            public Date getModifiedDate() {
450                    return _modifiedDate;
451            }
452    
453            public boolean hasSetModifiedDate() {
454                    return _setModifiedDate;
455            }
456    
457            @Override
458            public void setModifiedDate(Date modifiedDate) {
459                    _setModifiedDate = true;
460    
461                    _modifiedDate = modifiedDate;
462            }
463    
464            @JSON
465            @Override
466            public long getGroupId() {
467                    return _groupId;
468            }
469    
470            @Override
471            public void setGroupId(long groupId) {
472                    _columnBitmask |= GROUPID_COLUMN_BITMASK;
473    
474                    if (!_setOriginalGroupId) {
475                            _setOriginalGroupId = true;
476    
477                            _originalGroupId = _groupId;
478                    }
479    
480                    _groupId = groupId;
481            }
482    
483            public long getOriginalGroupId() {
484                    return _originalGroupId;
485            }
486    
487            @JSON
488            @Override
489            public String getName() {
490                    if (_name == null) {
491                            return StringPool.BLANK;
492                    }
493                    else {
494                            return _name;
495                    }
496            }
497    
498            @Override
499            public void setName(String name) {
500                    _columnBitmask = -1L;
501    
502                    if (_originalName == null) {
503                            _originalName = _name;
504                    }
505    
506                    _name = name;
507            }
508    
509            public String getOriginalName() {
510                    return GetterUtil.getString(_originalName);
511            }
512    
513            @JSON
514            @Override
515            public String getDescription() {
516                    if (_description == null) {
517                            return StringPool.BLANK;
518                    }
519                    else {
520                            return _description;
521                    }
522            }
523    
524            @Override
525            public void setDescription(String description) {
526                    _description = description;
527            }
528    
529            @JSON
530            @Override
531            public Date getLastPublishDate() {
532                    return _lastPublishDate;
533            }
534    
535            @Override
536            public void setLastPublishDate(Date lastPublishDate) {
537                    _lastPublishDate = lastPublishDate;
538            }
539    
540            @Override
541            public StagedModelType getStagedModelType() {
542                    return new StagedModelType(PortalUtil.getClassNameId(
543                                    Team.class.getName()));
544            }
545    
546            public long getColumnBitmask() {
547                    return _columnBitmask;
548            }
549    
550            @Override
551            public ExpandoBridge getExpandoBridge() {
552                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
553                            Team.class.getName(), getPrimaryKey());
554            }
555    
556            @Override
557            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
558                    ExpandoBridge expandoBridge = getExpandoBridge();
559    
560                    expandoBridge.setAttributes(serviceContext);
561            }
562    
563            @Override
564            public Team toEscapedModel() {
565                    if (_escapedModel == null) {
566                            _escapedModel = (Team)ProxyUtil.newProxyInstance(_classLoader,
567                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
568                    }
569    
570                    return _escapedModel;
571            }
572    
573            @Override
574            public Object clone() {
575                    TeamImpl teamImpl = new TeamImpl();
576    
577                    teamImpl.setMvccVersion(getMvccVersion());
578                    teamImpl.setUuid(getUuid());
579                    teamImpl.setTeamId(getTeamId());
580                    teamImpl.setCompanyId(getCompanyId());
581                    teamImpl.setUserId(getUserId());
582                    teamImpl.setUserName(getUserName());
583                    teamImpl.setCreateDate(getCreateDate());
584                    teamImpl.setModifiedDate(getModifiedDate());
585                    teamImpl.setGroupId(getGroupId());
586                    teamImpl.setName(getName());
587                    teamImpl.setDescription(getDescription());
588                    teamImpl.setLastPublishDate(getLastPublishDate());
589    
590                    teamImpl.resetOriginalValues();
591    
592                    return teamImpl;
593            }
594    
595            @Override
596            public int compareTo(Team team) {
597                    int value = 0;
598    
599                    value = getName().compareTo(team.getName());
600    
601                    if (value != 0) {
602                            return value;
603                    }
604    
605                    return 0;
606            }
607    
608            @Override
609            public boolean equals(Object obj) {
610                    if (this == obj) {
611                            return true;
612                    }
613    
614                    if (!(obj instanceof Team)) {
615                            return false;
616                    }
617    
618                    Team team = (Team)obj;
619    
620                    long primaryKey = team.getPrimaryKey();
621    
622                    if (getPrimaryKey() == primaryKey) {
623                            return true;
624                    }
625                    else {
626                            return false;
627                    }
628            }
629    
630            @Override
631            public int hashCode() {
632                    return (int)getPrimaryKey();
633            }
634    
635            @Override
636            public boolean isEntityCacheEnabled() {
637                    return ENTITY_CACHE_ENABLED;
638            }
639    
640            @Override
641            public boolean isFinderCacheEnabled() {
642                    return FINDER_CACHE_ENABLED;
643            }
644    
645            @Override
646            public void resetOriginalValues() {
647                    TeamModelImpl teamModelImpl = this;
648    
649                    teamModelImpl._originalUuid = teamModelImpl._uuid;
650    
651                    teamModelImpl._originalCompanyId = teamModelImpl._companyId;
652    
653                    teamModelImpl._setOriginalCompanyId = false;
654    
655                    teamModelImpl._setModifiedDate = false;
656    
657                    teamModelImpl._originalGroupId = teamModelImpl._groupId;
658    
659                    teamModelImpl._setOriginalGroupId = false;
660    
661                    teamModelImpl._originalName = teamModelImpl._name;
662    
663                    teamModelImpl._columnBitmask = 0;
664            }
665    
666            @Override
667            public CacheModel<Team> toCacheModel() {
668                    TeamCacheModel teamCacheModel = new TeamCacheModel();
669    
670                    teamCacheModel.mvccVersion = getMvccVersion();
671    
672                    teamCacheModel.uuid = getUuid();
673    
674                    String uuid = teamCacheModel.uuid;
675    
676                    if ((uuid != null) && (uuid.length() == 0)) {
677                            teamCacheModel.uuid = null;
678                    }
679    
680                    teamCacheModel.teamId = getTeamId();
681    
682                    teamCacheModel.companyId = getCompanyId();
683    
684                    teamCacheModel.userId = getUserId();
685    
686                    teamCacheModel.userName = getUserName();
687    
688                    String userName = teamCacheModel.userName;
689    
690                    if ((userName != null) && (userName.length() == 0)) {
691                            teamCacheModel.userName = null;
692                    }
693    
694                    Date createDate = getCreateDate();
695    
696                    if (createDate != null) {
697                            teamCacheModel.createDate = createDate.getTime();
698                    }
699                    else {
700                            teamCacheModel.createDate = Long.MIN_VALUE;
701                    }
702    
703                    Date modifiedDate = getModifiedDate();
704    
705                    if (modifiedDate != null) {
706                            teamCacheModel.modifiedDate = modifiedDate.getTime();
707                    }
708                    else {
709                            teamCacheModel.modifiedDate = Long.MIN_VALUE;
710                    }
711    
712                    teamCacheModel.groupId = getGroupId();
713    
714                    teamCacheModel.name = getName();
715    
716                    String name = teamCacheModel.name;
717    
718                    if ((name != null) && (name.length() == 0)) {
719                            teamCacheModel.name = null;
720                    }
721    
722                    teamCacheModel.description = getDescription();
723    
724                    String description = teamCacheModel.description;
725    
726                    if ((description != null) && (description.length() == 0)) {
727                            teamCacheModel.description = null;
728                    }
729    
730                    Date lastPublishDate = getLastPublishDate();
731    
732                    if (lastPublishDate != null) {
733                            teamCacheModel.lastPublishDate = lastPublishDate.getTime();
734                    }
735                    else {
736                            teamCacheModel.lastPublishDate = Long.MIN_VALUE;
737                    }
738    
739                    return teamCacheModel;
740            }
741    
742            @Override
743            public String toString() {
744                    StringBundler sb = new StringBundler(25);
745    
746                    sb.append("{mvccVersion=");
747                    sb.append(getMvccVersion());
748                    sb.append(", uuid=");
749                    sb.append(getUuid());
750                    sb.append(", teamId=");
751                    sb.append(getTeamId());
752                    sb.append(", companyId=");
753                    sb.append(getCompanyId());
754                    sb.append(", userId=");
755                    sb.append(getUserId());
756                    sb.append(", userName=");
757                    sb.append(getUserName());
758                    sb.append(", createDate=");
759                    sb.append(getCreateDate());
760                    sb.append(", modifiedDate=");
761                    sb.append(getModifiedDate());
762                    sb.append(", groupId=");
763                    sb.append(getGroupId());
764                    sb.append(", name=");
765                    sb.append(getName());
766                    sb.append(", description=");
767                    sb.append(getDescription());
768                    sb.append(", lastPublishDate=");
769                    sb.append(getLastPublishDate());
770                    sb.append("}");
771    
772                    return sb.toString();
773            }
774    
775            @Override
776            public String toXmlString() {
777                    StringBundler sb = new StringBundler(40);
778    
779                    sb.append("<model><model-name>");
780                    sb.append("com.liferay.portal.model.Team");
781                    sb.append("</model-name>");
782    
783                    sb.append(
784                            "<column><column-name>mvccVersion</column-name><column-value><![CDATA[");
785                    sb.append(getMvccVersion());
786                    sb.append("]]></column-value></column>");
787                    sb.append(
788                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
789                    sb.append(getUuid());
790                    sb.append("]]></column-value></column>");
791                    sb.append(
792                            "<column><column-name>teamId</column-name><column-value><![CDATA[");
793                    sb.append(getTeamId());
794                    sb.append("]]></column-value></column>");
795                    sb.append(
796                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
797                    sb.append(getCompanyId());
798                    sb.append("]]></column-value></column>");
799                    sb.append(
800                            "<column><column-name>userId</column-name><column-value><![CDATA[");
801                    sb.append(getUserId());
802                    sb.append("]]></column-value></column>");
803                    sb.append(
804                            "<column><column-name>userName</column-name><column-value><![CDATA[");
805                    sb.append(getUserName());
806                    sb.append("]]></column-value></column>");
807                    sb.append(
808                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
809                    sb.append(getCreateDate());
810                    sb.append("]]></column-value></column>");
811                    sb.append(
812                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
813                    sb.append(getModifiedDate());
814                    sb.append("]]></column-value></column>");
815                    sb.append(
816                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
817                    sb.append(getGroupId());
818                    sb.append("]]></column-value></column>");
819                    sb.append(
820                            "<column><column-name>name</column-name><column-value><![CDATA[");
821                    sb.append(getName());
822                    sb.append("]]></column-value></column>");
823                    sb.append(
824                            "<column><column-name>description</column-name><column-value><![CDATA[");
825                    sb.append(getDescription());
826                    sb.append("]]></column-value></column>");
827                    sb.append(
828                            "<column><column-name>lastPublishDate</column-name><column-value><![CDATA[");
829                    sb.append(getLastPublishDate());
830                    sb.append("]]></column-value></column>");
831    
832                    sb.append("</model>");
833    
834                    return sb.toString();
835            }
836    
837            private static final ClassLoader _classLoader = Team.class.getClassLoader();
838            private static final Class<?>[] _escapedModelInterfaces = new Class[] {
839                            Team.class
840                    };
841            private long _mvccVersion;
842            private String _uuid;
843            private String _originalUuid;
844            private long _teamId;
845            private long _companyId;
846            private long _originalCompanyId;
847            private boolean _setOriginalCompanyId;
848            private long _userId;
849            private String _userName;
850            private Date _createDate;
851            private Date _modifiedDate;
852            private boolean _setModifiedDate;
853            private long _groupId;
854            private long _originalGroupId;
855            private boolean _setOriginalGroupId;
856            private String _name;
857            private String _originalName;
858            private String _description;
859            private Date _lastPublishDate;
860            private long _columnBitmask;
861            private Team _escapedModel;
862    }