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