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.exception.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            @Override
1137            public boolean isApproved() {
1138                    if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
1139                            return true;
1140                    }
1141                    else {
1142                            return false;
1143                    }
1144            }
1145    
1146            @Override
1147            public boolean isDenied() {
1148                    if (getStatus() == WorkflowConstants.STATUS_DENIED) {
1149                            return true;
1150                    }
1151                    else {
1152                            return false;
1153                    }
1154            }
1155    
1156            @Override
1157            public boolean isDraft() {
1158                    if (getStatus() == WorkflowConstants.STATUS_DRAFT) {
1159                            return true;
1160                    }
1161                    else {
1162                            return false;
1163                    }
1164            }
1165    
1166            @Override
1167            public boolean isExpired() {
1168                    if (getStatus() == WorkflowConstants.STATUS_EXPIRED) {
1169                            return true;
1170                    }
1171                    else {
1172                            return false;
1173                    }
1174            }
1175    
1176            @Override
1177            public boolean isInactive() {
1178                    if (getStatus() == WorkflowConstants.STATUS_INACTIVE) {
1179                            return true;
1180                    }
1181                    else {
1182                            return false;
1183                    }
1184            }
1185    
1186            @Override
1187            public boolean isIncomplete() {
1188                    if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) {
1189                            return true;
1190                    }
1191                    else {
1192                            return false;
1193                    }
1194            }
1195    
1196            @Override
1197            public boolean isPending() {
1198                    if (getStatus() == WorkflowConstants.STATUS_PENDING) {
1199                            return true;
1200                    }
1201                    else {
1202                            return false;
1203                    }
1204            }
1205    
1206            @Override
1207            public boolean isScheduled() {
1208                    if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) {
1209                            return true;
1210                    }
1211                    else {
1212                            return false;
1213                    }
1214            }
1215    
1216            public long getColumnBitmask() {
1217                    return _columnBitmask;
1218            }
1219    
1220            @Override
1221            public ExpandoBridge getExpandoBridge() {
1222                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
1223                            BlogsEntry.class.getName(), getPrimaryKey());
1224            }
1225    
1226            @Override
1227            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
1228                    ExpandoBridge expandoBridge = getExpandoBridge();
1229    
1230                    expandoBridge.setAttributes(serviceContext);
1231            }
1232    
1233            @Override
1234            public BlogsEntry toEscapedModel() {
1235                    if (_escapedModel == null) {
1236                            _escapedModel = (BlogsEntry)ProxyUtil.newProxyInstance(_classLoader,
1237                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
1238                    }
1239    
1240                    return _escapedModel;
1241            }
1242    
1243            @Override
1244            public Object clone() {
1245                    BlogsEntryImpl blogsEntryImpl = new BlogsEntryImpl();
1246    
1247                    blogsEntryImpl.setUuid(getUuid());
1248                    blogsEntryImpl.setEntryId(getEntryId());
1249                    blogsEntryImpl.setGroupId(getGroupId());
1250                    blogsEntryImpl.setCompanyId(getCompanyId());
1251                    blogsEntryImpl.setUserId(getUserId());
1252                    blogsEntryImpl.setUserName(getUserName());
1253                    blogsEntryImpl.setCreateDate(getCreateDate());
1254                    blogsEntryImpl.setModifiedDate(getModifiedDate());
1255                    blogsEntryImpl.setTitle(getTitle());
1256                    blogsEntryImpl.setSubtitle(getSubtitle());
1257                    blogsEntryImpl.setUrlTitle(getUrlTitle());
1258                    blogsEntryImpl.setDescription(getDescription());
1259                    blogsEntryImpl.setContent(getContent());
1260                    blogsEntryImpl.setDisplayDate(getDisplayDate());
1261                    blogsEntryImpl.setAllowPingbacks(getAllowPingbacks());
1262                    blogsEntryImpl.setAllowTrackbacks(getAllowTrackbacks());
1263                    blogsEntryImpl.setTrackbacks(getTrackbacks());
1264                    blogsEntryImpl.setCoverImageCaption(getCoverImageCaption());
1265                    blogsEntryImpl.setCoverImageFileEntryId(getCoverImageFileEntryId());
1266                    blogsEntryImpl.setCoverImageURL(getCoverImageURL());
1267                    blogsEntryImpl.setSmallImage(getSmallImage());
1268                    blogsEntryImpl.setSmallImageFileEntryId(getSmallImageFileEntryId());
1269                    blogsEntryImpl.setSmallImageId(getSmallImageId());
1270                    blogsEntryImpl.setSmallImageURL(getSmallImageURL());
1271                    blogsEntryImpl.setLastPublishDate(getLastPublishDate());
1272                    blogsEntryImpl.setStatus(getStatus());
1273                    blogsEntryImpl.setStatusByUserId(getStatusByUserId());
1274                    blogsEntryImpl.setStatusByUserName(getStatusByUserName());
1275                    blogsEntryImpl.setStatusDate(getStatusDate());
1276    
1277                    blogsEntryImpl.resetOriginalValues();
1278    
1279                    return blogsEntryImpl;
1280            }
1281    
1282            @Override
1283            public int compareTo(BlogsEntry blogsEntry) {
1284                    int value = 0;
1285    
1286                    value = DateUtil.compareTo(getDisplayDate(), blogsEntry.getDisplayDate());
1287    
1288                    value = value * -1;
1289    
1290                    if (value != 0) {
1291                            return value;
1292                    }
1293    
1294                    value = DateUtil.compareTo(getCreateDate(), blogsEntry.getCreateDate());
1295    
1296                    value = value * -1;
1297    
1298                    if (value != 0) {
1299                            return value;
1300                    }
1301    
1302                    return 0;
1303            }
1304    
1305            @Override
1306            public boolean equals(Object obj) {
1307                    if (this == obj) {
1308                            return true;
1309                    }
1310    
1311                    if (!(obj instanceof BlogsEntry)) {
1312                            return false;
1313                    }
1314    
1315                    BlogsEntry blogsEntry = (BlogsEntry)obj;
1316    
1317                    long primaryKey = blogsEntry.getPrimaryKey();
1318    
1319                    if (getPrimaryKey() == primaryKey) {
1320                            return true;
1321                    }
1322                    else {
1323                            return false;
1324                    }
1325            }
1326    
1327            @Override
1328            public int hashCode() {
1329                    return (int)getPrimaryKey();
1330            }
1331    
1332            @Override
1333            public boolean isEntityCacheEnabled() {
1334                    return ENTITY_CACHE_ENABLED;
1335            }
1336    
1337            @Override
1338            public boolean isFinderCacheEnabled() {
1339                    return FINDER_CACHE_ENABLED;
1340            }
1341    
1342            @Override
1343            public void resetOriginalValues() {
1344                    BlogsEntryModelImpl blogsEntryModelImpl = this;
1345    
1346                    blogsEntryModelImpl._originalUuid = blogsEntryModelImpl._uuid;
1347    
1348                    blogsEntryModelImpl._originalGroupId = blogsEntryModelImpl._groupId;
1349    
1350                    blogsEntryModelImpl._setOriginalGroupId = false;
1351    
1352                    blogsEntryModelImpl._originalCompanyId = blogsEntryModelImpl._companyId;
1353    
1354                    blogsEntryModelImpl._setOriginalCompanyId = false;
1355    
1356                    blogsEntryModelImpl._originalUserId = blogsEntryModelImpl._userId;
1357    
1358                    blogsEntryModelImpl._setOriginalUserId = false;
1359    
1360                    blogsEntryModelImpl._setModifiedDate = false;
1361    
1362                    blogsEntryModelImpl._originalUrlTitle = blogsEntryModelImpl._urlTitle;
1363    
1364                    blogsEntryModelImpl._originalDisplayDate = blogsEntryModelImpl._displayDate;
1365    
1366                    blogsEntryModelImpl._originalStatus = blogsEntryModelImpl._status;
1367    
1368                    blogsEntryModelImpl._setOriginalStatus = false;
1369    
1370                    blogsEntryModelImpl._columnBitmask = 0;
1371            }
1372    
1373            @Override
1374            public CacheModel<BlogsEntry> toCacheModel() {
1375                    BlogsEntryCacheModel blogsEntryCacheModel = new BlogsEntryCacheModel();
1376    
1377                    blogsEntryCacheModel.uuid = getUuid();
1378    
1379                    String uuid = blogsEntryCacheModel.uuid;
1380    
1381                    if ((uuid != null) && (uuid.length() == 0)) {
1382                            blogsEntryCacheModel.uuid = null;
1383                    }
1384    
1385                    blogsEntryCacheModel.entryId = getEntryId();
1386    
1387                    blogsEntryCacheModel.groupId = getGroupId();
1388    
1389                    blogsEntryCacheModel.companyId = getCompanyId();
1390    
1391                    blogsEntryCacheModel.userId = getUserId();
1392    
1393                    blogsEntryCacheModel.userName = getUserName();
1394    
1395                    String userName = blogsEntryCacheModel.userName;
1396    
1397                    if ((userName != null) && (userName.length() == 0)) {
1398                            blogsEntryCacheModel.userName = null;
1399                    }
1400    
1401                    Date createDate = getCreateDate();
1402    
1403                    if (createDate != null) {
1404                            blogsEntryCacheModel.createDate = createDate.getTime();
1405                    }
1406                    else {
1407                            blogsEntryCacheModel.createDate = Long.MIN_VALUE;
1408                    }
1409    
1410                    Date modifiedDate = getModifiedDate();
1411    
1412                    if (modifiedDate != null) {
1413                            blogsEntryCacheModel.modifiedDate = modifiedDate.getTime();
1414                    }
1415                    else {
1416                            blogsEntryCacheModel.modifiedDate = Long.MIN_VALUE;
1417                    }
1418    
1419                    blogsEntryCacheModel.title = getTitle();
1420    
1421                    String title = blogsEntryCacheModel.title;
1422    
1423                    if ((title != null) && (title.length() == 0)) {
1424                            blogsEntryCacheModel.title = null;
1425                    }
1426    
1427                    blogsEntryCacheModel.subtitle = getSubtitle();
1428    
1429                    String subtitle = blogsEntryCacheModel.subtitle;
1430    
1431                    if ((subtitle != null) && (subtitle.length() == 0)) {
1432                            blogsEntryCacheModel.subtitle = null;
1433                    }
1434    
1435                    blogsEntryCacheModel.urlTitle = getUrlTitle();
1436    
1437                    String urlTitle = blogsEntryCacheModel.urlTitle;
1438    
1439                    if ((urlTitle != null) && (urlTitle.length() == 0)) {
1440                            blogsEntryCacheModel.urlTitle = null;
1441                    }
1442    
1443                    blogsEntryCacheModel.description = getDescription();
1444    
1445                    String description = blogsEntryCacheModel.description;
1446    
1447                    if ((description != null) && (description.length() == 0)) {
1448                            blogsEntryCacheModel.description = null;
1449                    }
1450    
1451                    blogsEntryCacheModel.content = getContent();
1452    
1453                    String content = blogsEntryCacheModel.content;
1454    
1455                    if ((content != null) && (content.length() == 0)) {
1456                            blogsEntryCacheModel.content = null;
1457                    }
1458    
1459                    Date displayDate = getDisplayDate();
1460    
1461                    if (displayDate != null) {
1462                            blogsEntryCacheModel.displayDate = displayDate.getTime();
1463                    }
1464                    else {
1465                            blogsEntryCacheModel.displayDate = Long.MIN_VALUE;
1466                    }
1467    
1468                    blogsEntryCacheModel.allowPingbacks = getAllowPingbacks();
1469    
1470                    blogsEntryCacheModel.allowTrackbacks = getAllowTrackbacks();
1471    
1472                    blogsEntryCacheModel.trackbacks = getTrackbacks();
1473    
1474                    String trackbacks = blogsEntryCacheModel.trackbacks;
1475    
1476                    if ((trackbacks != null) && (trackbacks.length() == 0)) {
1477                            blogsEntryCacheModel.trackbacks = null;
1478                    }
1479    
1480                    blogsEntryCacheModel.coverImageCaption = getCoverImageCaption();
1481    
1482                    String coverImageCaption = blogsEntryCacheModel.coverImageCaption;
1483    
1484                    if ((coverImageCaption != null) && (coverImageCaption.length() == 0)) {
1485                            blogsEntryCacheModel.coverImageCaption = null;
1486                    }
1487    
1488                    blogsEntryCacheModel.coverImageFileEntryId = getCoverImageFileEntryId();
1489    
1490                    blogsEntryCacheModel.coverImageURL = getCoverImageURL();
1491    
1492                    String coverImageURL = blogsEntryCacheModel.coverImageURL;
1493    
1494                    if ((coverImageURL != null) && (coverImageURL.length() == 0)) {
1495                            blogsEntryCacheModel.coverImageURL = null;
1496                    }
1497    
1498                    blogsEntryCacheModel.smallImage = getSmallImage();
1499    
1500                    blogsEntryCacheModel.smallImageFileEntryId = getSmallImageFileEntryId();
1501    
1502                    blogsEntryCacheModel.smallImageId = getSmallImageId();
1503    
1504                    blogsEntryCacheModel.smallImageURL = getSmallImageURL();
1505    
1506                    String smallImageURL = blogsEntryCacheModel.smallImageURL;
1507    
1508                    if ((smallImageURL != null) && (smallImageURL.length() == 0)) {
1509                            blogsEntryCacheModel.smallImageURL = null;
1510                    }
1511    
1512                    Date lastPublishDate = getLastPublishDate();
1513    
1514                    if (lastPublishDate != null) {
1515                            blogsEntryCacheModel.lastPublishDate = lastPublishDate.getTime();
1516                    }
1517                    else {
1518                            blogsEntryCacheModel.lastPublishDate = Long.MIN_VALUE;
1519                    }
1520    
1521                    blogsEntryCacheModel.status = getStatus();
1522    
1523                    blogsEntryCacheModel.statusByUserId = getStatusByUserId();
1524    
1525                    blogsEntryCacheModel.statusByUserName = getStatusByUserName();
1526    
1527                    String statusByUserName = blogsEntryCacheModel.statusByUserName;
1528    
1529                    if ((statusByUserName != null) && (statusByUserName.length() == 0)) {
1530                            blogsEntryCacheModel.statusByUserName = null;
1531                    }
1532    
1533                    Date statusDate = getStatusDate();
1534    
1535                    if (statusDate != null) {
1536                            blogsEntryCacheModel.statusDate = statusDate.getTime();
1537                    }
1538                    else {
1539                            blogsEntryCacheModel.statusDate = Long.MIN_VALUE;
1540                    }
1541    
1542                    return blogsEntryCacheModel;
1543            }
1544    
1545            @Override
1546            public String toString() {
1547                    StringBundler sb = new StringBundler(59);
1548    
1549                    sb.append("{uuid=");
1550                    sb.append(getUuid());
1551                    sb.append(", entryId=");
1552                    sb.append(getEntryId());
1553                    sb.append(", groupId=");
1554                    sb.append(getGroupId());
1555                    sb.append(", companyId=");
1556                    sb.append(getCompanyId());
1557                    sb.append(", userId=");
1558                    sb.append(getUserId());
1559                    sb.append(", userName=");
1560                    sb.append(getUserName());
1561                    sb.append(", createDate=");
1562                    sb.append(getCreateDate());
1563                    sb.append(", modifiedDate=");
1564                    sb.append(getModifiedDate());
1565                    sb.append(", title=");
1566                    sb.append(getTitle());
1567                    sb.append(", subtitle=");
1568                    sb.append(getSubtitle());
1569                    sb.append(", urlTitle=");
1570                    sb.append(getUrlTitle());
1571                    sb.append(", description=");
1572                    sb.append(getDescription());
1573                    sb.append(", content=");
1574                    sb.append(getContent());
1575                    sb.append(", displayDate=");
1576                    sb.append(getDisplayDate());
1577                    sb.append(", allowPingbacks=");
1578                    sb.append(getAllowPingbacks());
1579                    sb.append(", allowTrackbacks=");
1580                    sb.append(getAllowTrackbacks());
1581                    sb.append(", trackbacks=");
1582                    sb.append(getTrackbacks());
1583                    sb.append(", coverImageCaption=");
1584                    sb.append(getCoverImageCaption());
1585                    sb.append(", coverImageFileEntryId=");
1586                    sb.append(getCoverImageFileEntryId());
1587                    sb.append(", coverImageURL=");
1588                    sb.append(getCoverImageURL());
1589                    sb.append(", smallImage=");
1590                    sb.append(getSmallImage());
1591                    sb.append(", smallImageFileEntryId=");
1592                    sb.append(getSmallImageFileEntryId());
1593                    sb.append(", smallImageId=");
1594                    sb.append(getSmallImageId());
1595                    sb.append(", smallImageURL=");
1596                    sb.append(getSmallImageURL());
1597                    sb.append(", lastPublishDate=");
1598                    sb.append(getLastPublishDate());
1599                    sb.append(", status=");
1600                    sb.append(getStatus());
1601                    sb.append(", statusByUserId=");
1602                    sb.append(getStatusByUserId());
1603                    sb.append(", statusByUserName=");
1604                    sb.append(getStatusByUserName());
1605                    sb.append(", statusDate=");
1606                    sb.append(getStatusDate());
1607                    sb.append("}");
1608    
1609                    return sb.toString();
1610            }
1611    
1612            @Override
1613            public String toXmlString() {
1614                    StringBundler sb = new StringBundler(91);
1615    
1616                    sb.append("<model><model-name>");
1617                    sb.append("com.liferay.portlet.blogs.model.BlogsEntry");
1618                    sb.append("</model-name>");
1619    
1620                    sb.append(
1621                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
1622                    sb.append(getUuid());
1623                    sb.append("]]></column-value></column>");
1624                    sb.append(
1625                            "<column><column-name>entryId</column-name><column-value><![CDATA[");
1626                    sb.append(getEntryId());
1627                    sb.append("]]></column-value></column>");
1628                    sb.append(
1629                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
1630                    sb.append(getGroupId());
1631                    sb.append("]]></column-value></column>");
1632                    sb.append(
1633                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
1634                    sb.append(getCompanyId());
1635                    sb.append("]]></column-value></column>");
1636                    sb.append(
1637                            "<column><column-name>userId</column-name><column-value><![CDATA[");
1638                    sb.append(getUserId());
1639                    sb.append("]]></column-value></column>");
1640                    sb.append(
1641                            "<column><column-name>userName</column-name><column-value><![CDATA[");
1642                    sb.append(getUserName());
1643                    sb.append("]]></column-value></column>");
1644                    sb.append(
1645                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
1646                    sb.append(getCreateDate());
1647                    sb.append("]]></column-value></column>");
1648                    sb.append(
1649                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
1650                    sb.append(getModifiedDate());
1651                    sb.append("]]></column-value></column>");
1652                    sb.append(
1653                            "<column><column-name>title</column-name><column-value><![CDATA[");
1654                    sb.append(getTitle());
1655                    sb.append("]]></column-value></column>");
1656                    sb.append(
1657                            "<column><column-name>subtitle</column-name><column-value><![CDATA[");
1658                    sb.append(getSubtitle());
1659                    sb.append("]]></column-value></column>");
1660                    sb.append(
1661                            "<column><column-name>urlTitle</column-name><column-value><![CDATA[");
1662                    sb.append(getUrlTitle());
1663                    sb.append("]]></column-value></column>");
1664                    sb.append(
1665                            "<column><column-name>description</column-name><column-value><![CDATA[");
1666                    sb.append(getDescription());
1667                    sb.append("]]></column-value></column>");
1668                    sb.append(
1669                            "<column><column-name>content</column-name><column-value><![CDATA[");
1670                    sb.append(getContent());
1671                    sb.append("]]></column-value></column>");
1672                    sb.append(
1673                            "<column><column-name>displayDate</column-name><column-value><![CDATA[");
1674                    sb.append(getDisplayDate());
1675                    sb.append("]]></column-value></column>");
1676                    sb.append(
1677                            "<column><column-name>allowPingbacks</column-name><column-value><![CDATA[");
1678                    sb.append(getAllowPingbacks());
1679                    sb.append("]]></column-value></column>");
1680                    sb.append(
1681                            "<column><column-name>allowTrackbacks</column-name><column-value><![CDATA[");
1682                    sb.append(getAllowTrackbacks());
1683                    sb.append("]]></column-value></column>");
1684                    sb.append(
1685                            "<column><column-name>trackbacks</column-name><column-value><![CDATA[");
1686                    sb.append(getTrackbacks());
1687                    sb.append("]]></column-value></column>");
1688                    sb.append(
1689                            "<column><column-name>coverImageCaption</column-name><column-value><![CDATA[");
1690                    sb.append(getCoverImageCaption());
1691                    sb.append("]]></column-value></column>");
1692                    sb.append(
1693                            "<column><column-name>coverImageFileEntryId</column-name><column-value><![CDATA[");
1694                    sb.append(getCoverImageFileEntryId());
1695                    sb.append("]]></column-value></column>");
1696                    sb.append(
1697                            "<column><column-name>coverImageURL</column-name><column-value><![CDATA[");
1698                    sb.append(getCoverImageURL());
1699                    sb.append("]]></column-value></column>");
1700                    sb.append(
1701                            "<column><column-name>smallImage</column-name><column-value><![CDATA[");
1702                    sb.append(getSmallImage());
1703                    sb.append("]]></column-value></column>");
1704                    sb.append(
1705                            "<column><column-name>smallImageFileEntryId</column-name><column-value><![CDATA[");
1706                    sb.append(getSmallImageFileEntryId());
1707                    sb.append("]]></column-value></column>");
1708                    sb.append(
1709                            "<column><column-name>smallImageId</column-name><column-value><![CDATA[");
1710                    sb.append(getSmallImageId());
1711                    sb.append("]]></column-value></column>");
1712                    sb.append(
1713                            "<column><column-name>smallImageURL</column-name><column-value><![CDATA[");
1714                    sb.append(getSmallImageURL());
1715                    sb.append("]]></column-value></column>");
1716                    sb.append(
1717                            "<column><column-name>lastPublishDate</column-name><column-value><![CDATA[");
1718                    sb.append(getLastPublishDate());
1719                    sb.append("]]></column-value></column>");
1720                    sb.append(
1721                            "<column><column-name>status</column-name><column-value><![CDATA[");
1722                    sb.append(getStatus());
1723                    sb.append("]]></column-value></column>");
1724                    sb.append(
1725                            "<column><column-name>statusByUserId</column-name><column-value><![CDATA[");
1726                    sb.append(getStatusByUserId());
1727                    sb.append("]]></column-value></column>");
1728                    sb.append(
1729                            "<column><column-name>statusByUserName</column-name><column-value><![CDATA[");
1730                    sb.append(getStatusByUserName());
1731                    sb.append("]]></column-value></column>");
1732                    sb.append(
1733                            "<column><column-name>statusDate</column-name><column-value><![CDATA[");
1734                    sb.append(getStatusDate());
1735                    sb.append("]]></column-value></column>");
1736    
1737                    sb.append("</model>");
1738    
1739                    return sb.toString();
1740            }
1741    
1742            private static final ClassLoader _classLoader = BlogsEntry.class.getClassLoader();
1743            private static final Class<?>[] _escapedModelInterfaces = new Class[] {
1744                            BlogsEntry.class
1745                    };
1746            private String _uuid;
1747            private String _originalUuid;
1748            private long _entryId;
1749            private long _groupId;
1750            private long _originalGroupId;
1751            private boolean _setOriginalGroupId;
1752            private long _companyId;
1753            private long _originalCompanyId;
1754            private boolean _setOriginalCompanyId;
1755            private long _userId;
1756            private long _originalUserId;
1757            private boolean _setOriginalUserId;
1758            private String _userName;
1759            private Date _createDate;
1760            private Date _modifiedDate;
1761            private boolean _setModifiedDate;
1762            private String _title;
1763            private String _subtitle;
1764            private String _urlTitle;
1765            private String _originalUrlTitle;
1766            private String _description;
1767            private String _content;
1768            private Date _displayDate;
1769            private Date _originalDisplayDate;
1770            private boolean _allowPingbacks;
1771            private boolean _allowTrackbacks;
1772            private String _trackbacks;
1773            private String _coverImageCaption;
1774            private long _coverImageFileEntryId;
1775            private String _coverImageURL;
1776            private boolean _smallImage;
1777            private long _smallImageFileEntryId;
1778            private long _smallImageId;
1779            private String _smallImageURL;
1780            private Date _lastPublishDate;
1781            private int _status;
1782            private int _originalStatus;
1783            private boolean _setOriginalStatus;
1784            private long _statusByUserId;
1785            private String _statusByUserName;
1786            private Date _statusDate;
1787            private long _columnBitmask;
1788            private BlogsEntry _escapedModel;
1789    }