001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.blogs.model.impl;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.NoSuchModelException;
020    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
021    import com.liferay.portal.kernel.exception.PortalException;
022    import com.liferay.portal.kernel.json.JSON;
023    import com.liferay.portal.kernel.trash.TrashHandler;
024    import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil;
025    import com.liferay.portal.kernel.util.DateUtil;
026    import com.liferay.portal.kernel.util.GetterUtil;
027    import com.liferay.portal.kernel.util.ProxyUtil;
028    import com.liferay.portal.kernel.util.StringBundler;
029    import com.liferay.portal.kernel.util.StringPool;
030    import com.liferay.portal.kernel.util.Validator;
031    import com.liferay.portal.kernel.workflow.WorkflowConstants;
032    import com.liferay.portal.model.CacheModel;
033    import com.liferay.portal.model.ContainerModel;
034    import com.liferay.portal.model.TrashedModel;
035    import com.liferay.portal.model.User;
036    import com.liferay.portal.model.impl.BaseModelImpl;
037    import com.liferay.portal.service.ServiceContext;
038    import com.liferay.portal.service.UserLocalServiceUtil;
039    import com.liferay.portal.util.PortalUtil;
040    
041    import com.liferay.portlet.blogs.model.BlogsEntry;
042    import com.liferay.portlet.blogs.model.BlogsEntryModel;
043    import com.liferay.portlet.blogs.model.BlogsEntrySoap;
044    import com.liferay.portlet.expando.model.ExpandoBridge;
045    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
046    import com.liferay.portlet.exportimport.lar.StagedModelType;
047    import com.liferay.portlet.trash.model.TrashEntry;
048    import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil;
049    
050    import java.io.Serializable;
051    
052    import java.sql.Types;
053    
054    import java.util.ArrayList;
055    import java.util.Date;
056    import java.util.HashMap;
057    import java.util.List;
058    import java.util.Map;
059    
060    /**
061     * The base model implementation for the BlogsEntry service. Represents a row in the "BlogsEntry" database table, with each column mapped to a property of this class.
062     *
063     * <p>
064     * This implementation and its corresponding interface {@link BlogsEntryModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link BlogsEntryImpl}.
065     * </p>
066     *
067     * @author Brian Wing Shun Chan
068     * @see BlogsEntryImpl
069     * @see BlogsEntry
070     * @see BlogsEntryModel
071     * @generated
072     */
073    @JSON(strict = true)
074    @ProviderType
075    public class BlogsEntryModelImpl extends BaseModelImpl<BlogsEntry>
076            implements BlogsEntryModel {
077            /*
078             * NOTE FOR DEVELOPERS:
079             *
080             * Never modify or reference this class directly. All methods that expect a blogs entry model instance should use the {@link BlogsEntry} interface instead.
081             */
082            public static final String TABLE_NAME = "BlogsEntry";
083            public static final Object[][] TABLE_COLUMNS = {
084                            { "uuid_", Types.VARCHAR },
085                            { "entryId", Types.BIGINT },
086                            { "groupId", Types.BIGINT },
087                            { "companyId", Types.BIGINT },
088                            { "userId", Types.BIGINT },
089                            { "userName", Types.VARCHAR },
090                            { "createDate", Types.TIMESTAMP },
091                            { "modifiedDate", Types.TIMESTAMP },
092                            { "title", Types.VARCHAR },
093                            { "subtitle", Types.VARCHAR },
094                            { "urlTitle", Types.VARCHAR },
095                            { "description", Types.VARCHAR },
096                            { "content", Types.CLOB },
097                            { "displayDate", Types.TIMESTAMP },
098                            { "allowPingbacks", Types.BOOLEAN },
099                            { "allowTrackbacks", Types.BOOLEAN },
100                            { "trackbacks", Types.CLOB },
101                            { "coverImageCaption", Types.VARCHAR },
102                            { "coverImageFileEntryId", Types.BIGINT },
103                            { "coverImageURL", Types.VARCHAR },
104                            { "smallImage", Types.BOOLEAN },
105                            { "smallImageFileEntryId", Types.BIGINT },
106                            { "smallImageId", Types.BIGINT },
107                            { "smallImageURL", Types.VARCHAR },
108                            { "lastPublishDate", Types.TIMESTAMP },
109                            { "status", Types.INTEGER },
110                            { "statusByUserId", Types.BIGINT },
111                            { "statusByUserName", Types.VARCHAR },
112                            { "statusDate", Types.TIMESTAMP }
113                    };
114            public static final Map<String, Integer> TABLE_COLUMNS_MAP = new HashMap<String, Integer>();
115    
116            static {
117                    TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR);
118                    TABLE_COLUMNS_MAP.put("entryId", Types.BIGINT);
119                    TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT);
120                    TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT);
121                    TABLE_COLUMNS_MAP.put("userId", Types.BIGINT);
122                    TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR);
123                    TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP);
124                    TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP);
125                    TABLE_COLUMNS_MAP.put("title", Types.VARCHAR);
126                    TABLE_COLUMNS_MAP.put("subtitle", Types.VARCHAR);
127                    TABLE_COLUMNS_MAP.put("urlTitle", Types.VARCHAR);
128                    TABLE_COLUMNS_MAP.put("description", Types.VARCHAR);
129                    TABLE_COLUMNS_MAP.put("content", Types.CLOB);
130                    TABLE_COLUMNS_MAP.put("displayDate", Types.TIMESTAMP);
131                    TABLE_COLUMNS_MAP.put("allowPingbacks", Types.BOOLEAN);
132                    TABLE_COLUMNS_MAP.put("allowTrackbacks", Types.BOOLEAN);
133                    TABLE_COLUMNS_MAP.put("trackbacks", Types.CLOB);
134                    TABLE_COLUMNS_MAP.put("coverImageCaption", Types.VARCHAR);
135                    TABLE_COLUMNS_MAP.put("coverImageFileEntryId", Types.BIGINT);
136                    TABLE_COLUMNS_MAP.put("coverImageURL", Types.VARCHAR);
137                    TABLE_COLUMNS_MAP.put("smallImage", Types.BOOLEAN);
138                    TABLE_COLUMNS_MAP.put("smallImageFileEntryId", Types.BIGINT);
139                    TABLE_COLUMNS_MAP.put("smallImageId", Types.BIGINT);
140                    TABLE_COLUMNS_MAP.put("smallImageURL", Types.VARCHAR);
141                    TABLE_COLUMNS_MAP.put("lastPublishDate", Types.TIMESTAMP);
142                    TABLE_COLUMNS_MAP.put("status", Types.INTEGER);
143                    TABLE_COLUMNS_MAP.put("statusByUserId", Types.BIGINT);
144                    TABLE_COLUMNS_MAP.put("statusByUserName", Types.VARCHAR);
145                    TABLE_COLUMNS_MAP.put("statusDate", Types.TIMESTAMP);
146            }
147    
148            public static final String TABLE_SQL_CREATE = "create table BlogsEntry (uuid_ VARCHAR(75) null,entryId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,title VARCHAR(150) null,subtitle STRING null,urlTitle VARCHAR(150) null,description STRING null,content TEXT null,displayDate DATE null,allowPingbacks BOOLEAN,allowTrackbacks BOOLEAN,trackbacks TEXT null,coverImageCaption STRING null,coverImageFileEntryId LONG,coverImageURL STRING null,smallImage BOOLEAN,smallImageFileEntryId LONG,smallImageId LONG,smallImageURL STRING null,lastPublishDate DATE null,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)";
149            public static final String TABLE_SQL_DROP = "drop table BlogsEntry";
150            public static final String ORDER_BY_JPQL = " ORDER BY blogsEntry.displayDate DESC, blogsEntry.createDate DESC";
151            public static final String ORDER_BY_SQL = " ORDER BY BlogsEntry.displayDate DESC, BlogsEntry.createDate DESC";
152            public static final String DATA_SOURCE = "liferayDataSource";
153            public static final String SESSION_FACTORY = "liferaySessionFactory";
154            public static final String TX_MANAGER = "liferayTransactionManager";
155            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
156                                    "value.object.entity.cache.enabled.com.liferay.portlet.blogs.model.BlogsEntry"),
157                            true);
158            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
159                                    "value.object.finder.cache.enabled.com.liferay.portlet.blogs.model.BlogsEntry"),
160                            true);
161            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
162                                    "value.object.column.bitmask.enabled.com.liferay.portlet.blogs.model.BlogsEntry"),
163                            true);
164            public static final long COMPANYID_COLUMN_BITMASK = 1L;
165            public static final long DISPLAYDATE_COLUMN_BITMASK = 2L;
166            public static final long GROUPID_COLUMN_BITMASK = 4L;
167            public static final long STATUS_COLUMN_BITMASK = 8L;
168            public static final long URLTITLE_COLUMN_BITMASK = 16L;
169            public static final long USERID_COLUMN_BITMASK = 32L;
170            public static final long UUID_COLUMN_BITMASK = 64L;
171            public static final long CREATEDATE_COLUMN_BITMASK = 128L;
172    
173            /**
174             * Converts the soap model instance into a normal model instance.
175             *
176             * @param soapModel the soap model instance to convert
177             * @return the normal model instance
178             */
179            public static BlogsEntry toModel(BlogsEntrySoap soapModel) {
180                    if (soapModel == null) {
181                            return null;
182                    }
183    
184                    BlogsEntry model = new BlogsEntryImpl();
185    
186                    model.setUuid(soapModel.getUuid());
187                    model.setEntryId(soapModel.getEntryId());
188                    model.setGroupId(soapModel.getGroupId());
189                    model.setCompanyId(soapModel.getCompanyId());
190                    model.setUserId(soapModel.getUserId());
191                    model.setUserName(soapModel.getUserName());
192                    model.setCreateDate(soapModel.getCreateDate());
193                    model.setModifiedDate(soapModel.getModifiedDate());
194                    model.setTitle(soapModel.getTitle());
195                    model.setSubtitle(soapModel.getSubtitle());
196                    model.setUrlTitle(soapModel.getUrlTitle());
197                    model.setDescription(soapModel.getDescription());
198                    model.setContent(soapModel.getContent());
199                    model.setDisplayDate(soapModel.getDisplayDate());
200                    model.setAllowPingbacks(soapModel.getAllowPingbacks());
201                    model.setAllowTrackbacks(soapModel.getAllowTrackbacks());
202                    model.setTrackbacks(soapModel.getTrackbacks());
203                    model.setCoverImageCaption(soapModel.getCoverImageCaption());
204                    model.setCoverImageFileEntryId(soapModel.getCoverImageFileEntryId());
205                    model.setCoverImageURL(soapModel.getCoverImageURL());
206                    model.setSmallImage(soapModel.getSmallImage());
207                    model.setSmallImageFileEntryId(soapModel.getSmallImageFileEntryId());
208                    model.setSmallImageId(soapModel.getSmallImageId());
209                    model.setSmallImageURL(soapModel.getSmallImageURL());
210                    model.setLastPublishDate(soapModel.getLastPublishDate());
211                    model.setStatus(soapModel.getStatus());
212                    model.setStatusByUserId(soapModel.getStatusByUserId());
213                    model.setStatusByUserName(soapModel.getStatusByUserName());
214                    model.setStatusDate(soapModel.getStatusDate());
215    
216                    return model;
217            }
218    
219            /**
220             * Converts the soap model instances into normal model instances.
221             *
222             * @param soapModels the soap model instances to convert
223             * @return the normal model instances
224             */
225            public static List<BlogsEntry> toModels(BlogsEntrySoap[] soapModels) {
226                    if (soapModels == null) {
227                            return null;
228                    }
229    
230                    List<BlogsEntry> models = new ArrayList<BlogsEntry>(soapModels.length);
231    
232                    for (BlogsEntrySoap soapModel : soapModels) {
233                            models.add(toModel(soapModel));
234                    }
235    
236                    return models;
237            }
238    
239            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
240                                    "lock.expiration.time.com.liferay.portlet.blogs.model.BlogsEntry"));
241    
242            public BlogsEntryModelImpl() {
243            }
244    
245            @Override
246            public long getPrimaryKey() {
247                    return _entryId;
248            }
249    
250            @Override
251            public void setPrimaryKey(long primaryKey) {
252                    setEntryId(primaryKey);
253            }
254    
255            @Override
256            public Serializable getPrimaryKeyObj() {
257                    return _entryId;
258            }
259    
260            @Override
261            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
262                    setPrimaryKey(((Long)primaryKeyObj).longValue());
263            }
264    
265            @Override
266            public Class<?> getModelClass() {
267                    return BlogsEntry.class;
268            }
269    
270            @Override
271            public String getModelClassName() {
272                    return BlogsEntry.class.getName();
273            }
274    
275            @Override
276            public Map<String, Object> getModelAttributes() {
277                    Map<String, Object> attributes = new HashMap<String, Object>();
278    
279                    attributes.put("uuid", getUuid());
280                    attributes.put("entryId", getEntryId());
281                    attributes.put("groupId", getGroupId());
282                    attributes.put("companyId", getCompanyId());
283                    attributes.put("userId", getUserId());
284                    attributes.put("userName", getUserName());
285                    attributes.put("createDate", getCreateDate());
286                    attributes.put("modifiedDate", getModifiedDate());
287                    attributes.put("title", getTitle());
288                    attributes.put("subtitle", getSubtitle());
289                    attributes.put("urlTitle", getUrlTitle());
290                    attributes.put("description", getDescription());
291                    attributes.put("content", getContent());
292                    attributes.put("displayDate", getDisplayDate());
293                    attributes.put("allowPingbacks", getAllowPingbacks());
294                    attributes.put("allowTrackbacks", getAllowTrackbacks());
295                    attributes.put("trackbacks", getTrackbacks());
296                    attributes.put("coverImageCaption", getCoverImageCaption());
297                    attributes.put("coverImageFileEntryId", getCoverImageFileEntryId());
298                    attributes.put("coverImageURL", getCoverImageURL());
299                    attributes.put("smallImage", getSmallImage());
300                    attributes.put("smallImageFileEntryId", getSmallImageFileEntryId());
301                    attributes.put("smallImageId", getSmallImageId());
302                    attributes.put("smallImageURL", getSmallImageURL());
303                    attributes.put("lastPublishDate", getLastPublishDate());
304                    attributes.put("status", getStatus());
305                    attributes.put("statusByUserId", getStatusByUserId());
306                    attributes.put("statusByUserName", getStatusByUserName());
307                    attributes.put("statusDate", getStatusDate());
308    
309                    attributes.put("entityCacheEnabled", isEntityCacheEnabled());
310                    attributes.put("finderCacheEnabled", isFinderCacheEnabled());
311    
312                    return attributes;
313            }
314    
315            @Override
316            public void setModelAttributes(Map<String, Object> attributes) {
317                    String uuid = (String)attributes.get("uuid");
318    
319                    if (uuid != null) {
320                            setUuid(uuid);
321                    }
322    
323                    Long entryId = (Long)attributes.get("entryId");
324    
325                    if (entryId != null) {
326                            setEntryId(entryId);
327                    }
328    
329                    Long groupId = (Long)attributes.get("groupId");
330    
331                    if (groupId != null) {
332                            setGroupId(groupId);
333                    }
334    
335                    Long companyId = (Long)attributes.get("companyId");
336    
337                    if (companyId != null) {
338                            setCompanyId(companyId);
339                    }
340    
341                    Long userId = (Long)attributes.get("userId");
342    
343                    if (userId != null) {
344                            setUserId(userId);
345                    }
346    
347                    String userName = (String)attributes.get("userName");
348    
349                    if (userName != null) {
350                            setUserName(userName);
351                    }
352    
353                    Date createDate = (Date)attributes.get("createDate");
354    
355                    if (createDate != null) {
356                            setCreateDate(createDate);
357                    }
358    
359                    Date modifiedDate = (Date)attributes.get("modifiedDate");
360    
361                    if (modifiedDate != null) {
362                            setModifiedDate(modifiedDate);
363                    }
364    
365                    String title = (String)attributes.get("title");
366    
367                    if (title != null) {
368                            setTitle(title);
369                    }
370    
371                    String subtitle = (String)attributes.get("subtitle");
372    
373                    if (subtitle != null) {
374                            setSubtitle(subtitle);
375                    }
376    
377                    String urlTitle = (String)attributes.get("urlTitle");
378    
379                    if (urlTitle != null) {
380                            setUrlTitle(urlTitle);
381                    }
382    
383                    String description = (String)attributes.get("description");
384    
385                    if (description != null) {
386                            setDescription(description);
387                    }
388    
389                    String content = (String)attributes.get("content");
390    
391                    if (content != null) {
392                            setContent(content);
393                    }
394    
395                    Date displayDate = (Date)attributes.get("displayDate");
396    
397                    if (displayDate != null) {
398                            setDisplayDate(displayDate);
399                    }
400    
401                    Boolean allowPingbacks = (Boolean)attributes.get("allowPingbacks");
402    
403                    if (allowPingbacks != null) {
404                            setAllowPingbacks(allowPingbacks);
405                    }
406    
407                    Boolean allowTrackbacks = (Boolean)attributes.get("allowTrackbacks");
408    
409                    if (allowTrackbacks != null) {
410                            setAllowTrackbacks(allowTrackbacks);
411                    }
412    
413                    String trackbacks = (String)attributes.get("trackbacks");
414    
415                    if (trackbacks != null) {
416                            setTrackbacks(trackbacks);
417                    }
418    
419                    String coverImageCaption = (String)attributes.get("coverImageCaption");
420    
421                    if (coverImageCaption != null) {
422                            setCoverImageCaption(coverImageCaption);
423                    }
424    
425                    Long coverImageFileEntryId = (Long)attributes.get(
426                                    "coverImageFileEntryId");
427    
428                    if (coverImageFileEntryId != null) {
429                            setCoverImageFileEntryId(coverImageFileEntryId);
430                    }
431    
432                    String coverImageURL = (String)attributes.get("coverImageURL");
433    
434                    if (coverImageURL != null) {
435                            setCoverImageURL(coverImageURL);
436                    }
437    
438                    Boolean smallImage = (Boolean)attributes.get("smallImage");
439    
440                    if (smallImage != null) {
441                            setSmallImage(smallImage);
442                    }
443    
444                    Long smallImageFileEntryId = (Long)attributes.get(
445                                    "smallImageFileEntryId");
446    
447                    if (smallImageFileEntryId != null) {
448                            setSmallImageFileEntryId(smallImageFileEntryId);
449                    }
450    
451                    Long smallImageId = (Long)attributes.get("smallImageId");
452    
453                    if (smallImageId != null) {
454                            setSmallImageId(smallImageId);
455                    }
456    
457                    String smallImageURL = (String)attributes.get("smallImageURL");
458    
459                    if (smallImageURL != null) {
460                            setSmallImageURL(smallImageURL);
461                    }
462    
463                    Date lastPublishDate = (Date)attributes.get("lastPublishDate");
464    
465                    if (lastPublishDate != null) {
466                            setLastPublishDate(lastPublishDate);
467                    }
468    
469                    Integer status = (Integer)attributes.get("status");
470    
471                    if (status != null) {
472                            setStatus(status);
473                    }
474    
475                    Long statusByUserId = (Long)attributes.get("statusByUserId");
476    
477                    if (statusByUserId != null) {
478                            setStatusByUserId(statusByUserId);
479                    }
480    
481                    String statusByUserName = (String)attributes.get("statusByUserName");
482    
483                    if (statusByUserName != null) {
484                            setStatusByUserName(statusByUserName);
485                    }
486    
487                    Date statusDate = (Date)attributes.get("statusDate");
488    
489                    if (statusDate != null) {
490                            setStatusDate(statusDate);
491                    }
492            }
493    
494            @JSON
495            @Override
496            public String getUuid() {
497                    if (_uuid == null) {
498                            return StringPool.BLANK;
499                    }
500                    else {
501                            return _uuid;
502                    }
503            }
504    
505            @Override
506            public void setUuid(String uuid) {
507                    if (_originalUuid == null) {
508                            _originalUuid = _uuid;
509                    }
510    
511                    _uuid = uuid;
512            }
513    
514            public String getOriginalUuid() {
515                    return GetterUtil.getString(_originalUuid);
516            }
517    
518            @JSON
519            @Override
520            public long getEntryId() {
521                    return _entryId;
522            }
523    
524            @Override
525            public void setEntryId(long entryId) {
526                    _entryId = entryId;
527            }
528    
529            @JSON
530            @Override
531            public long getGroupId() {
532                    return _groupId;
533            }
534    
535            @Override
536            public void setGroupId(long groupId) {
537                    _columnBitmask |= GROUPID_COLUMN_BITMASK;
538    
539                    if (!_setOriginalGroupId) {
540                            _setOriginalGroupId = true;
541    
542                            _originalGroupId = _groupId;
543                    }
544    
545                    _groupId = groupId;
546            }
547    
548            public long getOriginalGroupId() {
549                    return _originalGroupId;
550            }
551    
552            @JSON
553            @Override
554            public long getCompanyId() {
555                    return _companyId;
556            }
557    
558            @Override
559            public void setCompanyId(long companyId) {
560                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
561    
562                    if (!_setOriginalCompanyId) {
563                            _setOriginalCompanyId = true;
564    
565                            _originalCompanyId = _companyId;
566                    }
567    
568                    _companyId = companyId;
569            }
570    
571            public long getOriginalCompanyId() {
572                    return _originalCompanyId;
573            }
574    
575            @JSON
576            @Override
577            public long getUserId() {
578                    return _userId;
579            }
580    
581            @Override
582            public void setUserId(long userId) {
583                    _columnBitmask |= USERID_COLUMN_BITMASK;
584    
585                    if (!_setOriginalUserId) {
586                            _setOriginalUserId = true;
587    
588                            _originalUserId = _userId;
589                    }
590    
591                    _userId = userId;
592            }
593    
594            @Override
595            public String getUserUuid() {
596                    try {
597                            User user = UserLocalServiceUtil.getUserById(getUserId());
598    
599                            return user.getUuid();
600                    }
601                    catch (PortalException pe) {
602                            return StringPool.BLANK;
603                    }
604            }
605    
606            @Override
607            public void setUserUuid(String userUuid) {
608            }
609    
610            public long getOriginalUserId() {
611                    return _originalUserId;
612            }
613    
614            @JSON
615            @Override
616            public String getUserName() {
617                    if (_userName == null) {
618                            return StringPool.BLANK;
619                    }
620                    else {
621                            return _userName;
622                    }
623            }
624    
625            @Override
626            public void setUserName(String userName) {
627                    _userName = userName;
628            }
629    
630            @JSON
631            @Override
632            public Date getCreateDate() {
633                    return _createDate;
634            }
635    
636            @Override
637            public void setCreateDate(Date createDate) {
638                    _columnBitmask = -1L;
639    
640                    _createDate = createDate;
641            }
642    
643            @JSON
644            @Override
645            public Date getModifiedDate() {
646                    return _modifiedDate;
647            }
648    
649            public boolean hasSetModifiedDate() {
650                    return _setModifiedDate;
651            }
652    
653            @Override
654            public void setModifiedDate(Date modifiedDate) {
655                    _setModifiedDate = true;
656    
657                    _modifiedDate = modifiedDate;
658            }
659    
660            @JSON
661            @Override
662            public String getTitle() {
663                    if (_title == null) {
664                            return StringPool.BLANK;
665                    }
666                    else {
667                            return _title;
668                    }
669            }
670    
671            @Override
672            public void setTitle(String title) {
673                    _title = title;
674            }
675    
676            @JSON
677            @Override
678            public String getSubtitle() {
679                    if (_subtitle == null) {
680                            return StringPool.BLANK;
681                    }
682                    else {
683                            return _subtitle;
684                    }
685            }
686    
687            @Override
688            public void setSubtitle(String subtitle) {
689                    _subtitle = subtitle;
690            }
691    
692            @JSON
693            @Override
694            public String getUrlTitle() {
695                    if (_urlTitle == null) {
696                            return StringPool.BLANK;
697                    }
698                    else {
699                            return _urlTitle;
700                    }
701            }
702    
703            @Override
704            public void setUrlTitle(String urlTitle) {
705                    _columnBitmask |= URLTITLE_COLUMN_BITMASK;
706    
707                    if (_originalUrlTitle == null) {
708                            _originalUrlTitle = _urlTitle;
709                    }
710    
711                    _urlTitle = urlTitle;
712            }
713    
714            public String getOriginalUrlTitle() {
715                    return GetterUtil.getString(_originalUrlTitle);
716            }
717    
718            @JSON
719            @Override
720            public String getDescription() {
721                    if (_description == null) {
722                            return StringPool.BLANK;
723                    }
724                    else {
725                            return _description;
726                    }
727            }
728    
729            @Override
730            public void setDescription(String description) {
731                    _description = description;
732            }
733    
734            @JSON
735            @Override
736            public String getContent() {
737                    if (_content == null) {
738                            return StringPool.BLANK;
739                    }
740                    else {
741                            return _content;
742                    }
743            }
744    
745            @Override
746            public void setContent(String content) {
747                    _content = content;
748            }
749    
750            @JSON
751            @Override
752            public Date getDisplayDate() {
753                    return _displayDate;
754            }
755    
756            @Override
757            public void setDisplayDate(Date displayDate) {
758                    _columnBitmask = -1L;
759    
760                    if (_originalDisplayDate == null) {
761                            _originalDisplayDate = _displayDate;
762                    }
763    
764                    _displayDate = displayDate;
765            }
766    
767            public Date getOriginalDisplayDate() {
768                    return _originalDisplayDate;
769            }
770    
771            @JSON
772            @Override
773            public boolean getAllowPingbacks() {
774                    return _allowPingbacks;
775            }
776    
777            @Override
778            public boolean isAllowPingbacks() {
779                    return _allowPingbacks;
780            }
781    
782            @Override
783            public void setAllowPingbacks(boolean allowPingbacks) {
784                    _allowPingbacks = allowPingbacks;
785            }
786    
787            @JSON
788            @Override
789            public boolean getAllowTrackbacks() {
790                    return _allowTrackbacks;
791            }
792    
793            @Override
794            public boolean isAllowTrackbacks() {
795                    return _allowTrackbacks;
796            }
797    
798            @Override
799            public void setAllowTrackbacks(boolean allowTrackbacks) {
800                    _allowTrackbacks = allowTrackbacks;
801            }
802    
803            @JSON
804            @Override
805            public String getTrackbacks() {
806                    if (_trackbacks == null) {
807                            return StringPool.BLANK;
808                    }
809                    else {
810                            return _trackbacks;
811                    }
812            }
813    
814            @Override
815            public void setTrackbacks(String trackbacks) {
816                    _trackbacks = trackbacks;
817            }
818    
819            @JSON
820            @Override
821            public String getCoverImageCaption() {
822                    if (_coverImageCaption == null) {
823                            return StringPool.BLANK;
824                    }
825                    else {
826                            return _coverImageCaption;
827                    }
828            }
829    
830            @Override
831            public void setCoverImageCaption(String coverImageCaption) {
832                    _coverImageCaption = coverImageCaption;
833            }
834    
835            @JSON
836            @Override
837            public long getCoverImageFileEntryId() {
838                    return _coverImageFileEntryId;
839            }
840    
841            @Override
842            public void setCoverImageFileEntryId(long coverImageFileEntryId) {
843                    _coverImageFileEntryId = coverImageFileEntryId;
844            }
845    
846            @JSON
847            @Override
848            public String getCoverImageURL() {
849                    if (_coverImageURL == null) {
850                            return StringPool.BLANK;
851                    }
852                    else {
853                            return _coverImageURL;
854                    }
855            }
856    
857            @Override
858            public void setCoverImageURL(String coverImageURL) {
859                    _coverImageURL = coverImageURL;
860            }
861    
862            @JSON
863            @Override
864            public boolean getSmallImage() {
865                    return _smallImage;
866            }
867    
868            @Override
869            public boolean isSmallImage() {
870                    return _smallImage;
871            }
872    
873            @Override
874            public void setSmallImage(boolean smallImage) {
875                    _smallImage = smallImage;
876            }
877    
878            @JSON
879            @Override
880            public long getSmallImageFileEntryId() {
881                    return _smallImageFileEntryId;
882            }
883    
884            @Override
885            public void setSmallImageFileEntryId(long smallImageFileEntryId) {
886                    _smallImageFileEntryId = smallImageFileEntryId;
887            }
888    
889            @JSON
890            @Override
891            public long getSmallImageId() {
892                    return _smallImageId;
893            }
894    
895            @Override
896            public void setSmallImageId(long smallImageId) {
897                    _smallImageId = smallImageId;
898            }
899    
900            @JSON
901            @Override
902            public String getSmallImageURL() {
903                    if (_smallImageURL == null) {
904                            return StringPool.BLANK;
905                    }
906                    else {
907                            return _smallImageURL;
908                    }
909            }
910    
911            @Override
912            public void setSmallImageURL(String smallImageURL) {
913                    _smallImageURL = smallImageURL;
914            }
915    
916            @JSON
917            @Override
918            public Date getLastPublishDate() {
919                    return _lastPublishDate;
920            }
921    
922            @Override
923            public void setLastPublishDate(Date lastPublishDate) {
924                    _lastPublishDate = lastPublishDate;
925            }
926    
927            @JSON
928            @Override
929            public int getStatus() {
930                    return _status;
931            }
932    
933            @Override
934            public void setStatus(int status) {
935                    _columnBitmask |= STATUS_COLUMN_BITMASK;
936    
937                    if (!_setOriginalStatus) {
938                            _setOriginalStatus = true;
939    
940                            _originalStatus = _status;
941                    }
942    
943                    _status = status;
944            }
945    
946            public int getOriginalStatus() {
947                    return _originalStatus;
948            }
949    
950            @JSON
951            @Override
952            public long getStatusByUserId() {
953                    return _statusByUserId;
954            }
955    
956            @Override
957            public void setStatusByUserId(long statusByUserId) {
958                    _statusByUserId = statusByUserId;
959            }
960    
961            @Override
962            public String getStatusByUserUuid() {
963                    try {
964                            User user = UserLocalServiceUtil.getUserById(getStatusByUserId());
965    
966                            return user.getUuid();
967                    }
968                    catch (PortalException pe) {
969                            return StringPool.BLANK;
970                    }
971            }
972    
973            @Override
974            public void setStatusByUserUuid(String statusByUserUuid) {
975            }
976    
977            @JSON
978            @Override
979            public String getStatusByUserName() {
980                    if (_statusByUserName == null) {
981                            return StringPool.BLANK;
982                    }
983                    else {
984                            return _statusByUserName;
985                    }
986            }
987    
988            @Override
989            public void setStatusByUserName(String statusByUserName) {
990                    _statusByUserName = statusByUserName;
991            }
992    
993            @JSON
994            @Override
995            public Date getStatusDate() {
996                    return _statusDate;
997            }
998    
999            @Override
1000            public void setStatusDate(Date statusDate) {
1001                    _statusDate = statusDate;
1002            }
1003    
1004            @Override
1005            public StagedModelType getStagedModelType() {
1006                    return new StagedModelType(PortalUtil.getClassNameId(
1007                                    BlogsEntry.class.getName()));
1008            }
1009    
1010            @Override
1011            public TrashEntry getTrashEntry() throws PortalException {
1012                    if (!isInTrash()) {
1013                            return null;
1014                    }
1015    
1016                    TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(),
1017                                    getTrashEntryClassPK());
1018    
1019                    if (trashEntry != null) {
1020                            return trashEntry;
1021                    }
1022    
1023                    TrashHandler trashHandler = getTrashHandler();
1024    
1025                    if (!Validator.isNull(trashHandler.getContainerModelClassName(
1026                                                    getPrimaryKey()))) {
1027                            ContainerModel containerModel = null;
1028    
1029                            try {
1030                                    containerModel = trashHandler.getParentContainerModel(this);
1031                            }
1032                            catch (NoSuchModelException nsme) {
1033                                    return null;
1034                            }
1035    
1036                            while (containerModel != null) {
1037                                    if (containerModel instanceof TrashedModel) {
1038                                            TrashedModel trashedModel = (TrashedModel)containerModel;
1039    
1040                                            return trashedModel.getTrashEntry();
1041                                    }
1042    
1043                                    trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName(
1044                                                            containerModel.getContainerModelId()));
1045    
1046                                    if (trashHandler == null) {
1047                                            return null;
1048                                    }
1049    
1050                                    containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId());
1051                            }
1052                    }
1053    
1054                    return null;
1055            }
1056    
1057            @Override
1058            public long getTrashEntryClassPK() {
1059                    return getPrimaryKey();
1060            }
1061    
1062            @Override
1063            public TrashHandler getTrashHandler() {
1064                    return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName());
1065            }
1066    
1067            @Override
1068            public boolean isInTrash() {
1069                    if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) {
1070                            return true;
1071                    }
1072                    else {
1073                            return false;
1074                    }
1075            }
1076    
1077            @Override
1078            public boolean isInTrashContainer() {
1079                    TrashHandler trashHandler = getTrashHandler();
1080    
1081                    if ((trashHandler == null) ||
1082                                    Validator.isNull(trashHandler.getContainerModelClassName(
1083                                                    getPrimaryKey()))) {
1084                            return false;
1085                    }
1086    
1087                    try {
1088                            ContainerModel containerModel = trashHandler.getParentContainerModel(this);
1089    
1090                            if (containerModel == null) {
1091                                    return false;
1092                            }
1093    
1094                            if (containerModel instanceof TrashedModel) {
1095                                    return ((TrashedModel)containerModel).isInTrash();
1096                            }
1097                    }
1098                    catch (Exception e) {
1099                    }
1100    
1101                    return false;
1102            }
1103    
1104            @Override
1105            public boolean isInTrashExplicitly() {
1106                    if (!isInTrash()) {
1107                            return false;
1108                    }
1109    
1110                    TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(),
1111                                    getTrashEntryClassPK());
1112    
1113                    if (trashEntry != null) {
1114                            return true;
1115                    }
1116    
1117                    return false;
1118            }
1119    
1120            @Override
1121            public boolean isInTrashImplicitly() {
1122                    if (!isInTrash()) {
1123                            return false;
1124                    }
1125    
1126                    TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(),
1127                                    getTrashEntryClassPK());
1128    
1129                    if (trashEntry != null) {
1130                            return false;
1131                    }
1132    
1133                    return true;
1134            }
1135    
1136            /**
1137             * @deprecated As of 6.1.0, replaced by {@link #isApproved}
1138             */
1139            @Deprecated
1140            @Override
1141            public boolean getApproved() {
1142                    return isApproved();
1143            }
1144    
1145            @Override
1146            public boolean isApproved() {
1147                    if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
1148                            return true;
1149                    }
1150                    else {
1151                            return false;
1152                    }
1153            }
1154    
1155            @Override
1156            public boolean isDenied() {
1157                    if (getStatus() == WorkflowConstants.STATUS_DENIED) {
1158                            return true;
1159                    }
1160                    else {
1161                            return false;
1162                    }
1163            }
1164    
1165            @Override
1166            public boolean isDraft() {
1167                    if (getStatus() == WorkflowConstants.STATUS_DRAFT) {
1168                            return true;
1169                    }
1170                    else {
1171                            return false;
1172                    }
1173            }
1174    
1175            @Override
1176            public boolean isExpired() {
1177                    if (getStatus() == WorkflowConstants.STATUS_EXPIRED) {
1178                            return true;
1179                    }
1180                    else {
1181                            return false;
1182                    }
1183            }
1184    
1185            @Override
1186            public boolean isInactive() {
1187                    if (getStatus() == WorkflowConstants.STATUS_INACTIVE) {
1188                            return true;
1189                    }
1190                    else {
1191                            return false;
1192                    }
1193            }
1194    
1195            @Override
1196            public boolean isIncomplete() {
1197                    if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) {
1198                            return true;
1199                    }
1200                    else {
1201                            return false;
1202                    }
1203            }
1204    
1205            @Override
1206            public boolean isPending() {
1207                    if (getStatus() == WorkflowConstants.STATUS_PENDING) {
1208                            return true;
1209                    }
1210                    else {
1211                            return false;
1212                    }
1213            }
1214    
1215            @Override
1216            public boolean isScheduled() {
1217                    if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) {
1218                            return true;
1219                    }
1220                    else {
1221                            return false;
1222                    }
1223            }
1224    
1225            public long getColumnBitmask() {
1226                    return _columnBitmask;
1227            }
1228    
1229            @Override
1230            public ExpandoBridge getExpandoBridge() {
1231                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
1232                            BlogsEntry.class.getName(), getPrimaryKey());
1233            }
1234    
1235            @Override
1236            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
1237                    ExpandoBridge expandoBridge = getExpandoBridge();
1238    
1239                    expandoBridge.setAttributes(serviceContext);
1240            }
1241    
1242            @Override
1243            public BlogsEntry toEscapedModel() {
1244                    if (_escapedModel == null) {
1245                            _escapedModel = (BlogsEntry)ProxyUtil.newProxyInstance(_classLoader,
1246                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
1247                    }
1248    
1249                    return _escapedModel;
1250            }
1251    
1252            @Override
1253            public Object clone() {
1254                    BlogsEntryImpl blogsEntryImpl = new BlogsEntryImpl();
1255    
1256                    blogsEntryImpl.setUuid(getUuid());
1257                    blogsEntryImpl.setEntryId(getEntryId());
1258                    blogsEntryImpl.setGroupId(getGroupId());
1259                    blogsEntryImpl.setCompanyId(getCompanyId());
1260                    blogsEntryImpl.setUserId(getUserId());
1261                    blogsEntryImpl.setUserName(getUserName());
1262                    blogsEntryImpl.setCreateDate(getCreateDate());
1263                    blogsEntryImpl.setModifiedDate(getModifiedDate());
1264                    blogsEntryImpl.setTitle(getTitle());
1265                    blogsEntryImpl.setSubtitle(getSubtitle());
1266                    blogsEntryImpl.setUrlTitle(getUrlTitle());
1267                    blogsEntryImpl.setDescription(getDescription());
1268                    blogsEntryImpl.setContent(getContent());
1269                    blogsEntryImpl.setDisplayDate(getDisplayDate());
1270                    blogsEntryImpl.setAllowPingbacks(getAllowPingbacks());
1271                    blogsEntryImpl.setAllowTrackbacks(getAllowTrackbacks());
1272                    blogsEntryImpl.setTrackbacks(getTrackbacks());
1273                    blogsEntryImpl.setCoverImageCaption(getCoverImageCaption());
1274                    blogsEntryImpl.setCoverImageFileEntryId(getCoverImageFileEntryId());
1275                    blogsEntryImpl.setCoverImageURL(getCoverImageURL());
1276                    blogsEntryImpl.setSmallImage(getSmallImage());
1277                    blogsEntryImpl.setSmallImageFileEntryId(getSmallImageFileEntryId());
1278                    blogsEntryImpl.setSmallImageId(getSmallImageId());
1279                    blogsEntryImpl.setSmallImageURL(getSmallImageURL());
1280                    blogsEntryImpl.setLastPublishDate(getLastPublishDate());
1281                    blogsEntryImpl.setStatus(getStatus());
1282                    blogsEntryImpl.setStatusByUserId(getStatusByUserId());
1283                    blogsEntryImpl.setStatusByUserName(getStatusByUserName());
1284                    blogsEntryImpl.setStatusDate(getStatusDate());
1285    
1286                    blogsEntryImpl.resetOriginalValues();
1287    
1288                    return blogsEntryImpl;
1289            }
1290    
1291            @Override
1292            public int compareTo(BlogsEntry blogsEntry) {
1293                    int value = 0;
1294    
1295                    value = DateUtil.compareTo(getDisplayDate(), blogsEntry.getDisplayDate());
1296    
1297                    value = value * -1;
1298    
1299                    if (value != 0) {
1300                            return value;
1301                    }
1302    
1303                    value = DateUtil.compareTo(getCreateDate(), blogsEntry.getCreateDate());
1304    
1305                    value = value * -1;
1306    
1307                    if (value != 0) {
1308                            return value;
1309                    }
1310    
1311                    return 0;
1312            }
1313    
1314            @Override
1315            public boolean equals(Object obj) {
1316                    if (this == obj) {
1317                            return true;
1318                    }
1319    
1320                    if (!(obj instanceof BlogsEntry)) {
1321                            return false;
1322                    }
1323    
1324                    BlogsEntry blogsEntry = (BlogsEntry)obj;
1325    
1326                    long primaryKey = blogsEntry.getPrimaryKey();
1327    
1328                    if (getPrimaryKey() == primaryKey) {
1329                            return true;
1330                    }
1331                    else {
1332                            return false;
1333                    }
1334            }
1335    
1336            @Override
1337            public int hashCode() {
1338                    return (int)getPrimaryKey();
1339            }
1340    
1341            @Override
1342            public boolean isEntityCacheEnabled() {
1343                    return ENTITY_CACHE_ENABLED;
1344            }
1345    
1346            @Override
1347            public boolean isFinderCacheEnabled() {
1348                    return FINDER_CACHE_ENABLED;
1349            }
1350    
1351            @Override
1352            public void resetOriginalValues() {
1353                    BlogsEntryModelImpl blogsEntryModelImpl = this;
1354    
1355                    blogsEntryModelImpl._originalUuid = blogsEntryModelImpl._uuid;
1356    
1357                    blogsEntryModelImpl._originalGroupId = blogsEntryModelImpl._groupId;
1358    
1359                    blogsEntryModelImpl._setOriginalGroupId = false;
1360    
1361                    blogsEntryModelImpl._originalCompanyId = blogsEntryModelImpl._companyId;
1362    
1363                    blogsEntryModelImpl._setOriginalCompanyId = false;
1364    
1365                    blogsEntryModelImpl._originalUserId = blogsEntryModelImpl._userId;
1366    
1367                    blogsEntryModelImpl._setOriginalUserId = false;
1368    
1369                    blogsEntryModelImpl._setModifiedDate = false;
1370    
1371                    blogsEntryModelImpl._originalUrlTitle = blogsEntryModelImpl._urlTitle;
1372    
1373                    blogsEntryModelImpl._originalDisplayDate = blogsEntryModelImpl._displayDate;
1374    
1375                    blogsEntryModelImpl._originalStatus = blogsEntryModelImpl._status;
1376    
1377                    blogsEntryModelImpl._setOriginalStatus = false;
1378    
1379                    blogsEntryModelImpl._columnBitmask = 0;
1380            }
1381    
1382            @Override
1383            public CacheModel<BlogsEntry> toCacheModel() {
1384                    BlogsEntryCacheModel blogsEntryCacheModel = new BlogsEntryCacheModel();
1385    
1386                    blogsEntryCacheModel.uuid = getUuid();
1387    
1388                    String uuid = blogsEntryCacheModel.uuid;
1389    
1390                    if ((uuid != null) && (uuid.length() == 0)) {
1391                            blogsEntryCacheModel.uuid = null;
1392                    }
1393    
1394                    blogsEntryCacheModel.entryId = getEntryId();
1395    
1396                    blogsEntryCacheModel.groupId = getGroupId();
1397    
1398                    blogsEntryCacheModel.companyId = getCompanyId();
1399    
1400                    blogsEntryCacheModel.userId = getUserId();
1401    
1402                    blogsEntryCacheModel.userName = getUserName();
1403    
1404                    String userName = blogsEntryCacheModel.userName;
1405    
1406                    if ((userName != null) && (userName.length() == 0)) {
1407                            blogsEntryCacheModel.userName = null;
1408                    }
1409    
1410                    Date createDate = getCreateDate();
1411    
1412                    if (createDate != null) {
1413                            blogsEntryCacheModel.createDate = createDate.getTime();
1414                    }
1415                    else {
1416                            blogsEntryCacheModel.createDate = Long.MIN_VALUE;
1417                    }
1418    
1419                    Date modifiedDate = getModifiedDate();
1420    
1421                    if (modifiedDate != null) {
1422                            blogsEntryCacheModel.modifiedDate = modifiedDate.getTime();
1423                    }
1424                    else {
1425                            blogsEntryCacheModel.modifiedDate = Long.MIN_VALUE;
1426                    }
1427    
1428                    blogsEntryCacheModel.title = getTitle();
1429    
1430                    String title = blogsEntryCacheModel.title;
1431    
1432                    if ((title != null) && (title.length() == 0)) {
1433                            blogsEntryCacheModel.title = null;
1434                    }
1435    
1436                    blogsEntryCacheModel.subtitle = getSubtitle();
1437    
1438                    String subtitle = blogsEntryCacheModel.subtitle;
1439    
1440                    if ((subtitle != null) && (subtitle.length() == 0)) {
1441                            blogsEntryCacheModel.subtitle = null;
1442                    }
1443    
1444                    blogsEntryCacheModel.urlTitle = getUrlTitle();
1445    
1446                    String urlTitle = blogsEntryCacheModel.urlTitle;
1447    
1448                    if ((urlTitle != null) && (urlTitle.length() == 0)) {
1449                            blogsEntryCacheModel.urlTitle = null;
1450                    }
1451    
1452                    blogsEntryCacheModel.description = getDescription();
1453    
1454                    String description = blogsEntryCacheModel.description;
1455    
1456                    if ((description != null) && (description.length() == 0)) {
1457                            blogsEntryCacheModel.description = null;
1458                    }
1459    
1460                    blogsEntryCacheModel.content = getContent();
1461    
1462                    String content = blogsEntryCacheModel.content;
1463    
1464                    if ((content != null) && (content.length() == 0)) {
1465                            blogsEntryCacheModel.content = null;
1466                    }
1467    
1468                    Date displayDate = getDisplayDate();
1469    
1470                    if (displayDate != null) {
1471                            blogsEntryCacheModel.displayDate = displayDate.getTime();
1472                    }
1473                    else {
1474                            blogsEntryCacheModel.displayDate = Long.MIN_VALUE;
1475                    }
1476    
1477                    blogsEntryCacheModel.allowPingbacks = getAllowPingbacks();
1478    
1479                    blogsEntryCacheModel.allowTrackbacks = getAllowTrackbacks();
1480    
1481                    blogsEntryCacheModel.trackbacks = getTrackbacks();
1482    
1483                    String trackbacks = blogsEntryCacheModel.trackbacks;
1484    
1485                    if ((trackbacks != null) && (trackbacks.length() == 0)) {
1486                            blogsEntryCacheModel.trackbacks = null;
1487                    }
1488    
1489                    blogsEntryCacheModel.coverImageCaption = getCoverImageCaption();
1490    
1491                    String coverImageCaption = blogsEntryCacheModel.coverImageCaption;
1492    
1493                    if ((coverImageCaption != null) && (coverImageCaption.length() == 0)) {
1494                            blogsEntryCacheModel.coverImageCaption = null;
1495                    }
1496    
1497                    blogsEntryCacheModel.coverImageFileEntryId = getCoverImageFileEntryId();
1498    
1499                    blogsEntryCacheModel.coverImageURL = getCoverImageURL();
1500    
1501                    String coverImageURL = blogsEntryCacheModel.coverImageURL;
1502    
1503                    if ((coverImageURL != null) && (coverImageURL.length() == 0)) {
1504                            blogsEntryCacheModel.coverImageURL = null;
1505                    }
1506    
1507                    blogsEntryCacheModel.smallImage = getSmallImage();
1508    
1509                    blogsEntryCacheModel.smallImageFileEntryId = getSmallImageFileEntryId();
1510    
1511                    blogsEntryCacheModel.smallImageId = getSmallImageId();
1512    
1513                    blogsEntryCacheModel.smallImageURL = getSmallImageURL();
1514    
1515                    String smallImageURL = blogsEntryCacheModel.smallImageURL;
1516    
1517                    if ((smallImageURL != null) && (smallImageURL.length() == 0)) {
1518                            blogsEntryCacheModel.smallImageURL = null;
1519                    }
1520    
1521                    Date lastPublishDate = getLastPublishDate();
1522    
1523                    if (lastPublishDate != null) {
1524                            blogsEntryCacheModel.lastPublishDate = lastPublishDate.getTime();
1525                    }
1526                    else {
1527                            blogsEntryCacheModel.lastPublishDate = Long.MIN_VALUE;
1528                    }
1529    
1530                    blogsEntryCacheModel.status = getStatus();
1531    
1532                    blogsEntryCacheModel.statusByUserId = getStatusByUserId();
1533    
1534                    blogsEntryCacheModel.statusByUserName = getStatusByUserName();
1535    
1536                    String statusByUserName = blogsEntryCacheModel.statusByUserName;
1537    
1538                    if ((statusByUserName != null) && (statusByUserName.length() == 0)) {
1539                            blogsEntryCacheModel.statusByUserName = null;
1540                    }
1541    
1542                    Date statusDate = getStatusDate();
1543    
1544                    if (statusDate != null) {
1545                            blogsEntryCacheModel.statusDate = statusDate.getTime();
1546                    }
1547                    else {
1548                            blogsEntryCacheModel.statusDate = Long.MIN_VALUE;
1549                    }
1550    
1551                    return blogsEntryCacheModel;
1552            }
1553    
1554            @Override
1555            public String toString() {
1556                    StringBundler sb = new StringBundler(59);
1557    
1558                    sb.append("{uuid=");
1559                    sb.append(getUuid());
1560                    sb.append(", entryId=");
1561                    sb.append(getEntryId());
1562                    sb.append(", groupId=");
1563                    sb.append(getGroupId());
1564                    sb.append(", companyId=");
1565                    sb.append(getCompanyId());
1566                    sb.append(", userId=");
1567                    sb.append(getUserId());
1568                    sb.append(", userName=");
1569                    sb.append(getUserName());
1570                    sb.append(", createDate=");
1571                    sb.append(getCreateDate());
1572                    sb.append(", modifiedDate=");
1573                    sb.append(getModifiedDate());
1574                    sb.append(", title=");
1575                    sb.append(getTitle());
1576                    sb.append(", subtitle=");
1577                    sb.append(getSubtitle());
1578                    sb.append(", urlTitle=");
1579                    sb.append(getUrlTitle());
1580                    sb.append(", description=");
1581                    sb.append(getDescription());
1582                    sb.append(", content=");
1583                    sb.append(getContent());
1584                    sb.append(", displayDate=");
1585                    sb.append(getDisplayDate());
1586                    sb.append(", allowPingbacks=");
1587                    sb.append(getAllowPingbacks());
1588                    sb.append(", allowTrackbacks=");
1589                    sb.append(getAllowTrackbacks());
1590                    sb.append(", trackbacks=");
1591                    sb.append(getTrackbacks());
1592                    sb.append(", coverImageCaption=");
1593                    sb.append(getCoverImageCaption());
1594                    sb.append(", coverImageFileEntryId=");
1595                    sb.append(getCoverImageFileEntryId());
1596                    sb.append(", coverImageURL=");
1597                    sb.append(getCoverImageURL());
1598                    sb.append(", smallImage=");
1599                    sb.append(getSmallImage());
1600                    sb.append(", smallImageFileEntryId=");
1601                    sb.append(getSmallImageFileEntryId());
1602                    sb.append(", smallImageId=");
1603                    sb.append(getSmallImageId());
1604                    sb.append(", smallImageURL=");
1605                    sb.append(getSmallImageURL());
1606                    sb.append(", lastPublishDate=");
1607                    sb.append(getLastPublishDate());
1608                    sb.append(", status=");
1609                    sb.append(getStatus());
1610                    sb.append(", statusByUserId=");
1611                    sb.append(getStatusByUserId());
1612                    sb.append(", statusByUserName=");
1613                    sb.append(getStatusByUserName());
1614                    sb.append(", statusDate=");
1615                    sb.append(getStatusDate());
1616                    sb.append("}");
1617    
1618                    return sb.toString();
1619            }
1620    
1621            @Override
1622            public String toXmlString() {
1623                    StringBundler sb = new StringBundler(91);
1624    
1625                    sb.append("<model><model-name>");
1626                    sb.append("com.liferay.portlet.blogs.model.BlogsEntry");
1627                    sb.append("</model-name>");
1628    
1629                    sb.append(
1630                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
1631                    sb.append(getUuid());
1632                    sb.append("]]></column-value></column>");
1633                    sb.append(
1634                            "<column><column-name>entryId</column-name><column-value><![CDATA[");
1635                    sb.append(getEntryId());
1636                    sb.append("]]></column-value></column>");
1637                    sb.append(
1638                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
1639                    sb.append(getGroupId());
1640                    sb.append("]]></column-value></column>");
1641                    sb.append(
1642                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
1643                    sb.append(getCompanyId());
1644                    sb.append("]]></column-value></column>");
1645                    sb.append(
1646                            "<column><column-name>userId</column-name><column-value><![CDATA[");
1647                    sb.append(getUserId());
1648                    sb.append("]]></column-value></column>");
1649                    sb.append(
1650                            "<column><column-name>userName</column-name><column-value><![CDATA[");
1651                    sb.append(getUserName());
1652                    sb.append("]]></column-value></column>");
1653                    sb.append(
1654                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
1655                    sb.append(getCreateDate());
1656                    sb.append("]]></column-value></column>");
1657                    sb.append(
1658                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
1659                    sb.append(getModifiedDate());
1660                    sb.append("]]></column-value></column>");
1661                    sb.append(
1662                            "<column><column-name>title</column-name><column-value><![CDATA[");
1663                    sb.append(getTitle());
1664                    sb.append("]]></column-value></column>");
1665                    sb.append(
1666                            "<column><column-name>subtitle</column-name><column-value><![CDATA[");
1667                    sb.append(getSubtitle());
1668                    sb.append("]]></column-value></column>");
1669                    sb.append(
1670                            "<column><column-name>urlTitle</column-name><column-value><![CDATA[");
1671                    sb.append(getUrlTitle());
1672                    sb.append("]]></column-value></column>");
1673                    sb.append(
1674                            "<column><column-name>description</column-name><column-value><![CDATA[");
1675                    sb.append(getDescription());
1676                    sb.append("]]></column-value></column>");
1677                    sb.append(
1678                            "<column><column-name>content</column-name><column-value><![CDATA[");
1679                    sb.append(getContent());
1680                    sb.append("]]></column-value></column>");
1681                    sb.append(
1682                            "<column><column-name>displayDate</column-name><column-value><![CDATA[");
1683                    sb.append(getDisplayDate());
1684                    sb.append("]]></column-value></column>");
1685                    sb.append(
1686                            "<column><column-name>allowPingbacks</column-name><column-value><![CDATA[");
1687                    sb.append(getAllowPingbacks());
1688                    sb.append("]]></column-value></column>");
1689                    sb.append(
1690                            "<column><column-name>allowTrackbacks</column-name><column-value><![CDATA[");
1691                    sb.append(getAllowTrackbacks());
1692                    sb.append("]]></column-value></column>");
1693                    sb.append(
1694                            "<column><column-name>trackbacks</column-name><column-value><![CDATA[");
1695                    sb.append(getTrackbacks());
1696                    sb.append("]]></column-value></column>");
1697                    sb.append(
1698                            "<column><column-name>coverImageCaption</column-name><column-value><![CDATA[");
1699                    sb.append(getCoverImageCaption());
1700                    sb.append("]]></column-value></column>");
1701                    sb.append(
1702                            "<column><column-name>coverImageFileEntryId</column-name><column-value><![CDATA[");
1703                    sb.append(getCoverImageFileEntryId());
1704                    sb.append("]]></column-value></column>");
1705                    sb.append(
1706                            "<column><column-name>coverImageURL</column-name><column-value><![CDATA[");
1707                    sb.append(getCoverImageURL());
1708                    sb.append("]]></column-value></column>");
1709                    sb.append(
1710                            "<column><column-name>smallImage</column-name><column-value><![CDATA[");
1711                    sb.append(getSmallImage());
1712                    sb.append("]]></column-value></column>");
1713                    sb.append(
1714                            "<column><column-name>smallImageFileEntryId</column-name><column-value><![CDATA[");
1715                    sb.append(getSmallImageFileEntryId());
1716                    sb.append("]]></column-value></column>");
1717                    sb.append(
1718                            "<column><column-name>smallImageId</column-name><column-value><![CDATA[");
1719                    sb.append(getSmallImageId());
1720                    sb.append("]]></column-value></column>");
1721                    sb.append(
1722                            "<column><column-name>smallImageURL</column-name><column-value><![CDATA[");
1723                    sb.append(getSmallImageURL());
1724                    sb.append("]]></column-value></column>");
1725                    sb.append(
1726                            "<column><column-name>lastPublishDate</column-name><column-value><![CDATA[");
1727                    sb.append(getLastPublishDate());
1728                    sb.append("]]></column-value></column>");
1729                    sb.append(
1730                            "<column><column-name>status</column-name><column-value><![CDATA[");
1731                    sb.append(getStatus());
1732                    sb.append("]]></column-value></column>");
1733                    sb.append(
1734                            "<column><column-name>statusByUserId</column-name><column-value><![CDATA[");
1735                    sb.append(getStatusByUserId());
1736                    sb.append("]]></column-value></column>");
1737                    sb.append(
1738                            "<column><column-name>statusByUserName</column-name><column-value><![CDATA[");
1739                    sb.append(getStatusByUserName());
1740                    sb.append("]]></column-value></column>");
1741                    sb.append(
1742                            "<column><column-name>statusDate</column-name><column-value><![CDATA[");
1743                    sb.append(getStatusDate());
1744                    sb.append("]]></column-value></column>");
1745    
1746                    sb.append("</model>");
1747    
1748                    return sb.toString();
1749            }
1750    
1751            private static final ClassLoader _classLoader = BlogsEntry.class.getClassLoader();
1752            private static final Class<?>[] _escapedModelInterfaces = new Class[] {
1753                            BlogsEntry.class
1754                    };
1755            private String _uuid;
1756            private String _originalUuid;
1757            private long _entryId;
1758            private long _groupId;
1759            private long _originalGroupId;
1760            private boolean _setOriginalGroupId;
1761            private long _companyId;
1762            private long _originalCompanyId;
1763            private boolean _setOriginalCompanyId;
1764            private long _userId;
1765            private long _originalUserId;
1766            private boolean _setOriginalUserId;
1767            private String _userName;
1768            private Date _createDate;
1769            private Date _modifiedDate;
1770            private boolean _setModifiedDate;
1771            private String _title;
1772            private String _subtitle;
1773            private String _urlTitle;
1774            private String _originalUrlTitle;
1775            private String _description;
1776            private String _content;
1777            private Date _displayDate;
1778            private Date _originalDisplayDate;
1779            private boolean _allowPingbacks;
1780            private boolean _allowTrackbacks;
1781            private String _trackbacks;
1782            private String _coverImageCaption;
1783            private long _coverImageFileEntryId;
1784            private String _coverImageURL;
1785            private boolean _smallImage;
1786            private long _smallImageFileEntryId;
1787            private long _smallImageId;
1788            private String _smallImageURL;
1789            private Date _lastPublishDate;
1790            private int _status;
1791            private int _originalStatus;
1792            private boolean _setOriginalStatus;
1793            private long _statusByUserId;
1794            private String _statusByUserName;
1795            private Date _statusDate;
1796            private long _columnBitmask;
1797            private BlogsEntry _escapedModel;
1798    }