001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018    import com.liferay.portal.kernel.json.JSON;
019    import com.liferay.portal.kernel.language.LanguageUtil;
020    import com.liferay.portal.kernel.util.GetterUtil;
021    import com.liferay.portal.kernel.util.LocaleUtil;
022    import com.liferay.portal.kernel.util.LocalizationUtil;
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.kernel.util.Validator;
027    import com.liferay.portal.model.CacheModel;
028    import com.liferay.portal.model.Role;
029    import com.liferay.portal.model.RoleModel;
030    import com.liferay.portal.model.RoleSoap;
031    import com.liferay.portal.service.ServiceContext;
032    import com.liferay.portal.util.PortalUtil;
033    
034    import com.liferay.portlet.expando.model.ExpandoBridge;
035    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
036    
037    import java.io.Serializable;
038    
039    import java.sql.Types;
040    
041    import java.util.ArrayList;
042    import java.util.List;
043    import java.util.Locale;
044    import java.util.Map;
045    
046    /**
047     * The base model implementation for the Role service. Represents a row in the "Role_" database table, with each column mapped to a property of this class.
048     *
049     * <p>
050     * This implementation and its corresponding interface {@link com.liferay.portal.model.RoleModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link RoleImpl}.
051     * </p>
052     *
053     * @author Brian Wing Shun Chan
054     * @see RoleImpl
055     * @see com.liferay.portal.model.Role
056     * @see com.liferay.portal.model.RoleModel
057     * @generated
058     */
059    @JSON(strict = true)
060    public class RoleModelImpl extends BaseModelImpl<Role> implements RoleModel {
061            /*
062             * NOTE FOR DEVELOPERS:
063             *
064             * Never modify or reference this class directly. All methods that expect a role model instance should use the {@link com.liferay.portal.model.Role} interface instead.
065             */
066            public static final String TABLE_NAME = "Role_";
067            public static final Object[][] TABLE_COLUMNS = {
068                            { "roleId", Types.BIGINT },
069                            { "companyId", Types.BIGINT },
070                            { "classNameId", Types.BIGINT },
071                            { "classPK", Types.BIGINT },
072                            { "name", Types.VARCHAR },
073                            { "title", Types.VARCHAR },
074                            { "description", Types.VARCHAR },
075                            { "type_", Types.INTEGER },
076                            { "subtype", Types.VARCHAR }
077                    };
078            public static final String TABLE_SQL_CREATE = "create table Role_ (roleId LONG not null primary key,companyId LONG,classNameId LONG,classPK LONG,name VARCHAR(75) null,title STRING null,description STRING null,type_ INTEGER,subtype VARCHAR(75) null)";
079            public static final String TABLE_SQL_DROP = "drop table Role_";
080            public static final String ORDER_BY_JPQL = " ORDER BY role.name ASC";
081            public static final String ORDER_BY_SQL = " ORDER BY Role_.name ASC";
082            public static final String DATA_SOURCE = "liferayDataSource";
083            public static final String SESSION_FACTORY = "liferaySessionFactory";
084            public static final String TX_MANAGER = "liferayTransactionManager";
085            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
086                                    "value.object.entity.cache.enabled.com.liferay.portal.model.Role"),
087                            true);
088            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
089                                    "value.object.finder.cache.enabled.com.liferay.portal.model.Role"),
090                            true);
091            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
092                                    "value.object.column.bitmask.enabled.com.liferay.portal.model.Role"),
093                            true);
094            public static long CLASSNAMEID_COLUMN_BITMASK = 1L;
095            public static long CLASSPK_COLUMN_BITMASK = 2L;
096            public static long COMPANYID_COLUMN_BITMASK = 4L;
097            public static long NAME_COLUMN_BITMASK = 8L;
098            public static long SUBTYPE_COLUMN_BITMASK = 16L;
099            public static long TYPE_COLUMN_BITMASK = 32L;
100    
101            /**
102             * Converts the soap model instance into a normal model instance.
103             *
104             * @param soapModel the soap model instance to convert
105             * @return the normal model instance
106             */
107            public static Role toModel(RoleSoap soapModel) {
108                    Role model = new RoleImpl();
109    
110                    model.setRoleId(soapModel.getRoleId());
111                    model.setCompanyId(soapModel.getCompanyId());
112                    model.setClassNameId(soapModel.getClassNameId());
113                    model.setClassPK(soapModel.getClassPK());
114                    model.setName(soapModel.getName());
115                    model.setTitle(soapModel.getTitle());
116                    model.setDescription(soapModel.getDescription());
117                    model.setType(soapModel.getType());
118                    model.setSubtype(soapModel.getSubtype());
119    
120                    return model;
121            }
122    
123            /**
124             * Converts the soap model instances into normal model instances.
125             *
126             * @param soapModels the soap model instances to convert
127             * @return the normal model instances
128             */
129            public static List<Role> toModels(RoleSoap[] soapModels) {
130                    List<Role> models = new ArrayList<Role>(soapModels.length);
131    
132                    for (RoleSoap soapModel : soapModels) {
133                            models.add(toModel(soapModel));
134                    }
135    
136                    return models;
137            }
138    
139            public static final String MAPPING_TABLE_GROUPS_ROLES_NAME = "Groups_Roles";
140            public static final Object[][] MAPPING_TABLE_GROUPS_ROLES_COLUMNS = {
141                            { "groupId", Types.BIGINT },
142                            { "roleId", Types.BIGINT }
143                    };
144            public static final String MAPPING_TABLE_GROUPS_ROLES_SQL_CREATE = "create table Groups_Roles (groupId LONG not null,roleId LONG not null,primary key (groupId, roleId))";
145            public static final boolean FINDER_CACHE_ENABLED_GROUPS_ROLES = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
146                                    "value.object.finder.cache.enabled.Groups_Roles"), true);
147            public static final String MAPPING_TABLE_ROLES_PERMISSIONS_NAME = "Roles_Permissions";
148            public static final Object[][] MAPPING_TABLE_ROLES_PERMISSIONS_COLUMNS = {
149                            { "roleId", Types.BIGINT },
150                            { "permissionId", Types.BIGINT }
151                    };
152            public static final String MAPPING_TABLE_ROLES_PERMISSIONS_SQL_CREATE = "create table Roles_Permissions (roleId LONG not null,permissionId LONG not null,primary key (roleId, permissionId))";
153            public static final boolean FINDER_CACHE_ENABLED_ROLES_PERMISSIONS = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
154                                    "value.object.finder.cache.enabled.Roles_Permissions"), true);
155            public static final String MAPPING_TABLE_USERS_ROLES_NAME = "Users_Roles";
156            public static final Object[][] MAPPING_TABLE_USERS_ROLES_COLUMNS = {
157                            { "userId", Types.BIGINT },
158                            { "roleId", Types.BIGINT }
159                    };
160            public static final String MAPPING_TABLE_USERS_ROLES_SQL_CREATE = "create table Users_Roles (userId LONG not null,roleId LONG not null,primary key (userId, roleId))";
161            public static final boolean FINDER_CACHE_ENABLED_USERS_ROLES = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
162                                    "value.object.finder.cache.enabled.Users_Roles"), true);
163            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
164                                    "lock.expiration.time.com.liferay.portal.model.Role"));
165    
166            public RoleModelImpl() {
167            }
168    
169            public long getPrimaryKey() {
170                    return _roleId;
171            }
172    
173            public void setPrimaryKey(long primaryKey) {
174                    setRoleId(primaryKey);
175            }
176    
177            public Serializable getPrimaryKeyObj() {
178                    return new Long(_roleId);
179            }
180    
181            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
182                    setPrimaryKey(((Long)primaryKeyObj).longValue());
183            }
184    
185            public Class<?> getModelClass() {
186                    return Role.class;
187            }
188    
189            public String getModelClassName() {
190                    return Role.class.getName();
191            }
192    
193            @JSON
194            public long getRoleId() {
195                    return _roleId;
196            }
197    
198            public void setRoleId(long roleId) {
199                    _roleId = roleId;
200            }
201    
202            @JSON
203            public long getCompanyId() {
204                    return _companyId;
205            }
206    
207            public void setCompanyId(long companyId) {
208                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
209    
210                    if (!_setOriginalCompanyId) {
211                            _setOriginalCompanyId = true;
212    
213                            _originalCompanyId = _companyId;
214                    }
215    
216                    _companyId = companyId;
217            }
218    
219            public long getOriginalCompanyId() {
220                    return _originalCompanyId;
221            }
222    
223            public String getClassName() {
224                    if (getClassNameId() <= 0) {
225                            return StringPool.BLANK;
226                    }
227    
228                    return PortalUtil.getClassName(getClassNameId());
229            }
230    
231            @JSON
232            public long getClassNameId() {
233                    return _classNameId;
234            }
235    
236            public void setClassNameId(long classNameId) {
237                    _columnBitmask |= CLASSNAMEID_COLUMN_BITMASK;
238    
239                    if (!_setOriginalClassNameId) {
240                            _setOriginalClassNameId = true;
241    
242                            _originalClassNameId = _classNameId;
243                    }
244    
245                    _classNameId = classNameId;
246            }
247    
248            public long getOriginalClassNameId() {
249                    return _originalClassNameId;
250            }
251    
252            @JSON
253            public long getClassPK() {
254                    return _classPK;
255            }
256    
257            public void setClassPK(long classPK) {
258                    _columnBitmask |= CLASSPK_COLUMN_BITMASK;
259    
260                    if (!_setOriginalClassPK) {
261                            _setOriginalClassPK = true;
262    
263                            _originalClassPK = _classPK;
264                    }
265    
266                    _classPK = classPK;
267            }
268    
269            public long getOriginalClassPK() {
270                    return _originalClassPK;
271            }
272    
273            @JSON
274            public String getName() {
275                    if (_name == null) {
276                            return StringPool.BLANK;
277                    }
278                    else {
279                            return _name;
280                    }
281            }
282    
283            public void setName(String name) {
284                    _columnBitmask = -1L;
285    
286                    if (_originalName == null) {
287                            _originalName = _name;
288                    }
289    
290                    _name = name;
291            }
292    
293            public String getOriginalName() {
294                    return GetterUtil.getString(_originalName);
295            }
296    
297            @JSON
298            public String getTitle() {
299                    if (_title == null) {
300                            return StringPool.BLANK;
301                    }
302                    else {
303                            return _title;
304                    }
305            }
306    
307            public String getTitle(Locale locale) {
308                    String languageId = LocaleUtil.toLanguageId(locale);
309    
310                    return getTitle(languageId);
311            }
312    
313            public String getTitle(Locale locale, boolean useDefault) {
314                    String languageId = LocaleUtil.toLanguageId(locale);
315    
316                    return getTitle(languageId, useDefault);
317            }
318    
319            public String getTitle(String languageId) {
320                    return LocalizationUtil.getLocalization(getTitle(), languageId);
321            }
322    
323            public String getTitle(String languageId, boolean useDefault) {
324                    return LocalizationUtil.getLocalization(getTitle(), languageId,
325                            useDefault);
326            }
327    
328            public String getTitleCurrentLanguageId() {
329                    return _titleCurrentLanguageId;
330            }
331    
332            @JSON
333            public String getTitleCurrentValue() {
334                    Locale locale = getLocale(_titleCurrentLanguageId);
335    
336                    return getTitle(locale);
337            }
338    
339            public Map<Locale, String> getTitleMap() {
340                    return LocalizationUtil.getLocalizationMap(getTitle());
341            }
342    
343            public void setTitle(String title) {
344                    _title = title;
345            }
346    
347            public void setTitle(String title, Locale locale) {
348                    setTitle(title, locale, LocaleUtil.getDefault());
349            }
350    
351            public void setTitle(String title, Locale locale, Locale defaultLocale) {
352                    String languageId = LocaleUtil.toLanguageId(locale);
353                    String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
354    
355                    if (Validator.isNotNull(title)) {
356                            setTitle(LocalizationUtil.updateLocalization(getTitle(), "Title",
357                                            title, languageId, defaultLanguageId));
358                    }
359                    else {
360                            setTitle(LocalizationUtil.removeLocalization(getTitle(), "Title",
361                                            languageId));
362                    }
363            }
364    
365            public void setTitleCurrentLanguageId(String languageId) {
366                    _titleCurrentLanguageId = languageId;
367            }
368    
369            public void setTitleMap(Map<Locale, String> titleMap) {
370                    setTitleMap(titleMap, LocaleUtil.getDefault());
371            }
372    
373            public void setTitleMap(Map<Locale, String> titleMap, Locale defaultLocale) {
374                    if (titleMap == null) {
375                            return;
376                    }
377    
378                    Locale[] locales = LanguageUtil.getAvailableLocales();
379    
380                    for (Locale locale : locales) {
381                            String title = titleMap.get(locale);
382    
383                            setTitle(title, locale, defaultLocale);
384                    }
385            }
386    
387            @JSON
388            public String getDescription() {
389                    if (_description == null) {
390                            return StringPool.BLANK;
391                    }
392                    else {
393                            return _description;
394                    }
395            }
396    
397            public String getDescription(Locale locale) {
398                    String languageId = LocaleUtil.toLanguageId(locale);
399    
400                    return getDescription(languageId);
401            }
402    
403            public String getDescription(Locale locale, boolean useDefault) {
404                    String languageId = LocaleUtil.toLanguageId(locale);
405    
406                    return getDescription(languageId, useDefault);
407            }
408    
409            public String getDescription(String languageId) {
410                    return LocalizationUtil.getLocalization(getDescription(), languageId);
411            }
412    
413            public String getDescription(String languageId, boolean useDefault) {
414                    return LocalizationUtil.getLocalization(getDescription(), languageId,
415                            useDefault);
416            }
417    
418            public String getDescriptionCurrentLanguageId() {
419                    return _descriptionCurrentLanguageId;
420            }
421    
422            @JSON
423            public String getDescriptionCurrentValue() {
424                    Locale locale = getLocale(_descriptionCurrentLanguageId);
425    
426                    return getDescription(locale);
427            }
428    
429            public Map<Locale, String> getDescriptionMap() {
430                    return LocalizationUtil.getLocalizationMap(getDescription());
431            }
432    
433            public void setDescription(String description) {
434                    _description = description;
435            }
436    
437            public void setDescription(String description, Locale locale) {
438                    setDescription(description, locale, LocaleUtil.getDefault());
439            }
440    
441            public void setDescription(String description, Locale locale,
442                    Locale defaultLocale) {
443                    String languageId = LocaleUtil.toLanguageId(locale);
444                    String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
445    
446                    if (Validator.isNotNull(description)) {
447                            setDescription(LocalizationUtil.updateLocalization(
448                                            getDescription(), "Description", description, languageId,
449                                            defaultLanguageId));
450                    }
451                    else {
452                            setDescription(LocalizationUtil.removeLocalization(
453                                            getDescription(), "Description", languageId));
454                    }
455            }
456    
457            public void setDescriptionCurrentLanguageId(String languageId) {
458                    _descriptionCurrentLanguageId = languageId;
459            }
460    
461            public void setDescriptionMap(Map<Locale, String> descriptionMap) {
462                    setDescriptionMap(descriptionMap, LocaleUtil.getDefault());
463            }
464    
465            public void setDescriptionMap(Map<Locale, String> descriptionMap,
466                    Locale defaultLocale) {
467                    if (descriptionMap == null) {
468                            return;
469                    }
470    
471                    Locale[] locales = LanguageUtil.getAvailableLocales();
472    
473                    for (Locale locale : locales) {
474                            String description = descriptionMap.get(locale);
475    
476                            setDescription(description, locale, defaultLocale);
477                    }
478            }
479    
480            @JSON
481            public int getType() {
482                    return _type;
483            }
484    
485            public void setType(int type) {
486                    _columnBitmask |= TYPE_COLUMN_BITMASK;
487    
488                    if (!_setOriginalType) {
489                            _setOriginalType = true;
490    
491                            _originalType = _type;
492                    }
493    
494                    _type = type;
495            }
496    
497            public int getOriginalType() {
498                    return _originalType;
499            }
500    
501            @JSON
502            public String getSubtype() {
503                    if (_subtype == null) {
504                            return StringPool.BLANK;
505                    }
506                    else {
507                            return _subtype;
508                    }
509            }
510    
511            public void setSubtype(String subtype) {
512                    _columnBitmask |= SUBTYPE_COLUMN_BITMASK;
513    
514                    if (_originalSubtype == null) {
515                            _originalSubtype = _subtype;
516                    }
517    
518                    _subtype = subtype;
519            }
520    
521            public String getOriginalSubtype() {
522                    return GetterUtil.getString(_originalSubtype);
523            }
524    
525            public long getColumnBitmask() {
526                    return _columnBitmask;
527            }
528    
529            @Override
530            public Role toEscapedModel() {
531                    if (_escapedModelProxy == null) {
532                            _escapedModelProxy = (Role)ProxyUtil.newProxyInstance(_classLoader,
533                                            _escapedModelProxyInterfaces,
534                                            new AutoEscapeBeanHandler(this));
535                    }
536    
537                    return _escapedModelProxy;
538            }
539    
540            @Override
541            public ExpandoBridge getExpandoBridge() {
542                    if (_expandoBridge == null) {
543                            _expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
544                                            Role.class.getName(), getPrimaryKey());
545                    }
546    
547                    return _expandoBridge;
548            }
549    
550            @Override
551            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
552                    getExpandoBridge().setAttributes(serviceContext);
553            }
554    
555            @Override
556            public Object clone() {
557                    RoleImpl roleImpl = new RoleImpl();
558    
559                    roleImpl.setRoleId(getRoleId());
560                    roleImpl.setCompanyId(getCompanyId());
561                    roleImpl.setClassNameId(getClassNameId());
562                    roleImpl.setClassPK(getClassPK());
563                    roleImpl.setName(getName());
564                    roleImpl.setTitle(getTitle());
565                    roleImpl.setDescription(getDescription());
566                    roleImpl.setType(getType());
567                    roleImpl.setSubtype(getSubtype());
568    
569                    roleImpl.resetOriginalValues();
570    
571                    return roleImpl;
572            }
573    
574            public int compareTo(Role role) {
575                    int value = 0;
576    
577                    value = getName().compareTo(role.getName());
578    
579                    if (value != 0) {
580                            return value;
581                    }
582    
583                    return 0;
584            }
585    
586            @Override
587            public boolean equals(Object obj) {
588                    if (obj == null) {
589                            return false;
590                    }
591    
592                    Role role = null;
593    
594                    try {
595                            role = (Role)obj;
596                    }
597                    catch (ClassCastException cce) {
598                            return false;
599                    }
600    
601                    long primaryKey = role.getPrimaryKey();
602    
603                    if (getPrimaryKey() == primaryKey) {
604                            return true;
605                    }
606                    else {
607                            return false;
608                    }
609            }
610    
611            @Override
612            public int hashCode() {
613                    return (int)getPrimaryKey();
614            }
615    
616            @Override
617            public void resetOriginalValues() {
618                    RoleModelImpl roleModelImpl = this;
619    
620                    roleModelImpl._originalCompanyId = roleModelImpl._companyId;
621    
622                    roleModelImpl._setOriginalCompanyId = false;
623    
624                    roleModelImpl._originalClassNameId = roleModelImpl._classNameId;
625    
626                    roleModelImpl._setOriginalClassNameId = false;
627    
628                    roleModelImpl._originalClassPK = roleModelImpl._classPK;
629    
630                    roleModelImpl._setOriginalClassPK = false;
631    
632                    roleModelImpl._originalName = roleModelImpl._name;
633    
634                    roleModelImpl._originalType = roleModelImpl._type;
635    
636                    roleModelImpl._setOriginalType = false;
637    
638                    roleModelImpl._originalSubtype = roleModelImpl._subtype;
639    
640                    roleModelImpl._columnBitmask = 0;
641            }
642    
643            @Override
644            public CacheModel<Role> toCacheModel() {
645                    RoleCacheModel roleCacheModel = new RoleCacheModel();
646    
647                    roleCacheModel.roleId = getRoleId();
648    
649                    roleCacheModel.companyId = getCompanyId();
650    
651                    roleCacheModel.classNameId = getClassNameId();
652    
653                    roleCacheModel.classPK = getClassPK();
654    
655                    roleCacheModel.name = getName();
656    
657                    String name = roleCacheModel.name;
658    
659                    if ((name != null) && (name.length() == 0)) {
660                            roleCacheModel.name = null;
661                    }
662    
663                    roleCacheModel.title = getTitle();
664    
665                    String title = roleCacheModel.title;
666    
667                    if ((title != null) && (title.length() == 0)) {
668                            roleCacheModel.title = null;
669                    }
670    
671                    roleCacheModel.description = getDescription();
672    
673                    String description = roleCacheModel.description;
674    
675                    if ((description != null) && (description.length() == 0)) {
676                            roleCacheModel.description = null;
677                    }
678    
679                    roleCacheModel.type = getType();
680    
681                    roleCacheModel.subtype = getSubtype();
682    
683                    String subtype = roleCacheModel.subtype;
684    
685                    if ((subtype != null) && (subtype.length() == 0)) {
686                            roleCacheModel.subtype = null;
687                    }
688    
689                    return roleCacheModel;
690            }
691    
692            @Override
693            public String toString() {
694                    StringBundler sb = new StringBundler(19);
695    
696                    sb.append("{roleId=");
697                    sb.append(getRoleId());
698                    sb.append(", companyId=");
699                    sb.append(getCompanyId());
700                    sb.append(", classNameId=");
701                    sb.append(getClassNameId());
702                    sb.append(", classPK=");
703                    sb.append(getClassPK());
704                    sb.append(", name=");
705                    sb.append(getName());
706                    sb.append(", title=");
707                    sb.append(getTitle());
708                    sb.append(", description=");
709                    sb.append(getDescription());
710                    sb.append(", type=");
711                    sb.append(getType());
712                    sb.append(", subtype=");
713                    sb.append(getSubtype());
714                    sb.append("}");
715    
716                    return sb.toString();
717            }
718    
719            public String toXmlString() {
720                    StringBundler sb = new StringBundler(31);
721    
722                    sb.append("<model><model-name>");
723                    sb.append("com.liferay.portal.model.Role");
724                    sb.append("</model-name>");
725    
726                    sb.append(
727                            "<column><column-name>roleId</column-name><column-value><![CDATA[");
728                    sb.append(getRoleId());
729                    sb.append("]]></column-value></column>");
730                    sb.append(
731                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
732                    sb.append(getCompanyId());
733                    sb.append("]]></column-value></column>");
734                    sb.append(
735                            "<column><column-name>classNameId</column-name><column-value><![CDATA[");
736                    sb.append(getClassNameId());
737                    sb.append("]]></column-value></column>");
738                    sb.append(
739                            "<column><column-name>classPK</column-name><column-value><![CDATA[");
740                    sb.append(getClassPK());
741                    sb.append("]]></column-value></column>");
742                    sb.append(
743                            "<column><column-name>name</column-name><column-value><![CDATA[");
744                    sb.append(getName());
745                    sb.append("]]></column-value></column>");
746                    sb.append(
747                            "<column><column-name>title</column-name><column-value><![CDATA[");
748                    sb.append(getTitle());
749                    sb.append("]]></column-value></column>");
750                    sb.append(
751                            "<column><column-name>description</column-name><column-value><![CDATA[");
752                    sb.append(getDescription());
753                    sb.append("]]></column-value></column>");
754                    sb.append(
755                            "<column><column-name>type</column-name><column-value><![CDATA[");
756                    sb.append(getType());
757                    sb.append("]]></column-value></column>");
758                    sb.append(
759                            "<column><column-name>subtype</column-name><column-value><![CDATA[");
760                    sb.append(getSubtype());
761                    sb.append("]]></column-value></column>");
762    
763                    sb.append("</model>");
764    
765                    return sb.toString();
766            }
767    
768            private static ClassLoader _classLoader = Role.class.getClassLoader();
769            private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
770                            Role.class
771                    };
772            private long _roleId;
773            private long _companyId;
774            private long _originalCompanyId;
775            private boolean _setOriginalCompanyId;
776            private long _classNameId;
777            private long _originalClassNameId;
778            private boolean _setOriginalClassNameId;
779            private long _classPK;
780            private long _originalClassPK;
781            private boolean _setOriginalClassPK;
782            private String _name;
783            private String _originalName;
784            private String _title;
785            private String _titleCurrentLanguageId;
786            private String _description;
787            private String _descriptionCurrentLanguageId;
788            private int _type;
789            private int _originalType;
790            private boolean _setOriginalType;
791            private String _subtype;
792            private String _originalSubtype;
793            private transient ExpandoBridge _expandoBridge;
794            private long _columnBitmask;
795            private Role _escapedModelProxy;
796    }