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