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