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