All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.commerce.product.model.impl.CPAttachmentFileEntryModelImpl Maven / Gradle / Ivy

The newest version!
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

package com.liferay.commerce.product.model.impl;

import com.liferay.commerce.product.model.CPAttachmentFileEntry;
import com.liferay.commerce.product.model.CPAttachmentFileEntryModel;
import com.liferay.expando.kernel.model.ExpandoBridge;
import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil;
import com.liferay.exportimport.kernel.lar.StagedModelType;
import com.liferay.petra.string.StringBundler;
import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.LocaleException;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.model.CacheModel;
import com.liferay.portal.kernel.model.ModelWrapper;
import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.model.impl.BaseModelImpl;
import com.liferay.portal.kernel.service.ServiceContext;
import com.liferay.portal.kernel.service.UserLocalServiceUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.LocalizationUtil;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants;

import java.io.Serializable;

import java.lang.reflect.InvocationHandler;

import java.sql.Blob;
import java.sql.Types;

import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import java.util.function.BiConsumer;
import java.util.function.Function;

/**
 * The base model implementation for the CPAttachmentFileEntry service. Represents a row in the "CPAttachmentFileEntry" database table, with each column mapped to a property of this class.
 *
 * 

* This implementation and its corresponding interface CPAttachmentFileEntryModel exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CPAttachmentFileEntryImpl}. *

* * @author Marco Leo * @see CPAttachmentFileEntryImpl * @generated */ @JSON(strict = true) public class CPAttachmentFileEntryModelImpl extends BaseModelImpl implements CPAttachmentFileEntryModel { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a cp attachment file entry model instance should use the CPAttachmentFileEntry interface instead. */ public static final String TABLE_NAME = "CPAttachmentFileEntry"; public static final Object[][] TABLE_COLUMNS = { {"mvccVersion", Types.BIGINT}, {"ctCollectionId", Types.BIGINT}, {"uuid_", Types.VARCHAR}, {"externalReferenceCode", Types.VARCHAR}, {"CPAttachmentFileEntryId", Types.BIGINT}, {"groupId", Types.BIGINT}, {"companyId", Types.BIGINT}, {"userId", Types.BIGINT}, {"userName", Types.VARCHAR}, {"createDate", Types.TIMESTAMP}, {"modifiedDate", Types.TIMESTAMP}, {"classNameId", Types.BIGINT}, {"classPK", Types.BIGINT}, {"fileEntryId", Types.BIGINT}, {"cdnEnabled", Types.BOOLEAN}, {"cdnURL", Types.VARCHAR}, {"displayDate", Types.TIMESTAMP}, {"expirationDate", Types.TIMESTAMP}, {"galleryEnabled", Types.BOOLEAN}, {"title", Types.VARCHAR}, {"json", Types.CLOB}, {"priority", Types.DOUBLE}, {"type_", Types.INTEGER}, {"lastPublishDate", Types.TIMESTAMP}, {"status", Types.INTEGER}, {"statusByUserId", Types.BIGINT}, {"statusByUserName", Types.VARCHAR}, {"statusDate", Types.TIMESTAMP} }; public static final Map TABLE_COLUMNS_MAP = new HashMap(); static { TABLE_COLUMNS_MAP.put("mvccVersion", Types.BIGINT); TABLE_COLUMNS_MAP.put("ctCollectionId", Types.BIGINT); TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); TABLE_COLUMNS_MAP.put("externalReferenceCode", Types.VARCHAR); TABLE_COLUMNS_MAP.put("CPAttachmentFileEntryId", Types.BIGINT); TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT); TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR); TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("classNameId", Types.BIGINT); TABLE_COLUMNS_MAP.put("classPK", Types.BIGINT); TABLE_COLUMNS_MAP.put("fileEntryId", Types.BIGINT); TABLE_COLUMNS_MAP.put("cdnEnabled", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("cdnURL", Types.VARCHAR); TABLE_COLUMNS_MAP.put("displayDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("expirationDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("galleryEnabled", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("title", Types.VARCHAR); TABLE_COLUMNS_MAP.put("json", Types.CLOB); TABLE_COLUMNS_MAP.put("priority", Types.DOUBLE); TABLE_COLUMNS_MAP.put("type_", Types.INTEGER); TABLE_COLUMNS_MAP.put("lastPublishDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("status", Types.INTEGER); TABLE_COLUMNS_MAP.put("statusByUserId", Types.BIGINT); TABLE_COLUMNS_MAP.put("statusByUserName", Types.VARCHAR); TABLE_COLUMNS_MAP.put("statusDate", Types.TIMESTAMP); } public static final String TABLE_SQL_CREATE = "create table CPAttachmentFileEntry (mvccVersion LONG default 0 not null,ctCollectionId LONG default 0 not null,uuid_ VARCHAR(75) null,externalReferenceCode VARCHAR(75) null,CPAttachmentFileEntryId LONG not null,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,fileEntryId LONG,cdnEnabled BOOLEAN,cdnURL STRING null,displayDate DATE null,expirationDate DATE null,galleryEnabled BOOLEAN,title STRING null,json TEXT null,priority DOUBLE,type_ INTEGER,lastPublishDate DATE null,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null,primary key (CPAttachmentFileEntryId, ctCollectionId))"; public static final String TABLE_SQL_DROP = "drop table CPAttachmentFileEntry"; public static final String ORDER_BY_JPQL = " ORDER BY cpAttachmentFileEntry.priority ASC"; public static final String ORDER_BY_SQL = " ORDER BY CPAttachmentFileEntry.priority ASC"; public static final String DATA_SOURCE = "liferayDataSource"; public static final String SESSION_FACTORY = "liferaySessionFactory"; public static final String TX_MANAGER = "liferayTransactionManager"; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long CDNURL_COLUMN_BITMASK = 1L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long CLASSNAMEID_COLUMN_BITMASK = 2L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long CLASSPK_COLUMN_BITMASK = 4L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long COMPANYID_COLUMN_BITMASK = 8L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long DISPLAYDATE_COLUMN_BITMASK = 16L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long EXTERNALREFERENCECODE_COLUMN_BITMASK = 32L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long FILEENTRYID_COLUMN_BITMASK = 64L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long GALLERYENABLED_COLUMN_BITMASK = 128L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long GROUPID_COLUMN_BITMASK = 256L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long STATUS_COLUMN_BITMASK = 512L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long TYPE_COLUMN_BITMASK = 1024L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long UUID_COLUMN_BITMASK = 2048L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnBitmask(String)} */ @Deprecated public static final long PRIORITY_COLUMN_BITMASK = 4096L; /** * @deprecated As of Athanasius (7.3.x), with no direct replacement */ @Deprecated public static void setEntityCacheEnabled(boolean entityCacheEnabled) { } /** * @deprecated As of Athanasius (7.3.x), with no direct replacement */ @Deprecated public static void setFinderCacheEnabled(boolean finderCacheEnabled) { } public CPAttachmentFileEntryModelImpl() { } @Override public long getPrimaryKey() { return _CPAttachmentFileEntryId; } @Override public void setPrimaryKey(long primaryKey) { setCPAttachmentFileEntryId(primaryKey); } @Override public Serializable getPrimaryKeyObj() { return _CPAttachmentFileEntryId; } @Override public void setPrimaryKeyObj(Serializable primaryKeyObj) { setPrimaryKey(((Long)primaryKeyObj).longValue()); } @Override public Class getModelClass() { return CPAttachmentFileEntry.class; } @Override public String getModelClassName() { return CPAttachmentFileEntry.class.getName(); } @Override public Map getModelAttributes() { Map attributes = new HashMap(); Map> attributeGetterFunctions = getAttributeGetterFunctions(); for (Map.Entry> entry : attributeGetterFunctions.entrySet()) { String attributeName = entry.getKey(); Function attributeGetterFunction = entry.getValue(); attributes.put( attributeName, attributeGetterFunction.apply((CPAttachmentFileEntry)this)); } return attributes; } @Override public void setModelAttributes(Map attributes) { Map> attributeSetterBiConsumers = getAttributeSetterBiConsumers(); for (Map.Entry entry : attributes.entrySet()) { String attributeName = entry.getKey(); BiConsumer attributeSetterBiConsumer = attributeSetterBiConsumers.get( attributeName); if (attributeSetterBiConsumer != null) { attributeSetterBiConsumer.accept( (CPAttachmentFileEntry)this, entry.getValue()); } } } public Map> getAttributeGetterFunctions() { return AttributeGetterFunctionsHolder._attributeGetterFunctions; } public Map> getAttributeSetterBiConsumers() { return AttributeSetterBiConsumersHolder._attributeSetterBiConsumers; } private static class AttributeGetterFunctionsHolder { private static final Map > _attributeGetterFunctions; static { Map> attributeGetterFunctions = new LinkedHashMap >(); attributeGetterFunctions.put( "mvccVersion", CPAttachmentFileEntry::getMvccVersion); attributeGetterFunctions.put( "ctCollectionId", CPAttachmentFileEntry::getCtCollectionId); attributeGetterFunctions.put( "uuid", CPAttachmentFileEntry::getUuid); attributeGetterFunctions.put( "externalReferenceCode", CPAttachmentFileEntry::getExternalReferenceCode); attributeGetterFunctions.put( "CPAttachmentFileEntryId", CPAttachmentFileEntry::getCPAttachmentFileEntryId); attributeGetterFunctions.put( "groupId", CPAttachmentFileEntry::getGroupId); attributeGetterFunctions.put( "companyId", CPAttachmentFileEntry::getCompanyId); attributeGetterFunctions.put( "userId", CPAttachmentFileEntry::getUserId); attributeGetterFunctions.put( "userName", CPAttachmentFileEntry::getUserName); attributeGetterFunctions.put( "createDate", CPAttachmentFileEntry::getCreateDate); attributeGetterFunctions.put( "modifiedDate", CPAttachmentFileEntry::getModifiedDate); attributeGetterFunctions.put( "classNameId", CPAttachmentFileEntry::getClassNameId); attributeGetterFunctions.put( "classPK", CPAttachmentFileEntry::getClassPK); attributeGetterFunctions.put( "fileEntryId", CPAttachmentFileEntry::getFileEntryId); attributeGetterFunctions.put( "cdnEnabled", CPAttachmentFileEntry::getCDNEnabled); attributeGetterFunctions.put( "cdnURL", CPAttachmentFileEntry::getCDNURL); attributeGetterFunctions.put( "displayDate", CPAttachmentFileEntry::getDisplayDate); attributeGetterFunctions.put( "expirationDate", CPAttachmentFileEntry::getExpirationDate); attributeGetterFunctions.put( "galleryEnabled", CPAttachmentFileEntry::getGalleryEnabled); attributeGetterFunctions.put( "title", CPAttachmentFileEntry::getTitle); attributeGetterFunctions.put( "json", CPAttachmentFileEntry::getJson); attributeGetterFunctions.put( "priority", CPAttachmentFileEntry::getPriority); attributeGetterFunctions.put( "type", CPAttachmentFileEntry::getType); attributeGetterFunctions.put( "lastPublishDate", CPAttachmentFileEntry::getLastPublishDate); attributeGetterFunctions.put( "status", CPAttachmentFileEntry::getStatus); attributeGetterFunctions.put( "statusByUserId", CPAttachmentFileEntry::getStatusByUserId); attributeGetterFunctions.put( "statusByUserName", CPAttachmentFileEntry::getStatusByUserName); attributeGetterFunctions.put( "statusDate", CPAttachmentFileEntry::getStatusDate); _attributeGetterFunctions = Collections.unmodifiableMap( attributeGetterFunctions); } } private static class AttributeSetterBiConsumersHolder { private static final Map > _attributeSetterBiConsumers; static { Map> attributeSetterBiConsumers = new LinkedHashMap >(); attributeSetterBiConsumers.put( "mvccVersion", (BiConsumer) CPAttachmentFileEntry::setMvccVersion); attributeSetterBiConsumers.put( "ctCollectionId", (BiConsumer) CPAttachmentFileEntry::setCtCollectionId); attributeSetterBiConsumers.put( "uuid", (BiConsumer) CPAttachmentFileEntry::setUuid); attributeSetterBiConsumers.put( "externalReferenceCode", (BiConsumer) CPAttachmentFileEntry::setExternalReferenceCode); attributeSetterBiConsumers.put( "CPAttachmentFileEntryId", (BiConsumer) CPAttachmentFileEntry::setCPAttachmentFileEntryId); attributeSetterBiConsumers.put( "groupId", (BiConsumer) CPAttachmentFileEntry::setGroupId); attributeSetterBiConsumers.put( "companyId", (BiConsumer) CPAttachmentFileEntry::setCompanyId); attributeSetterBiConsumers.put( "userId", (BiConsumer) CPAttachmentFileEntry::setUserId); attributeSetterBiConsumers.put( "userName", (BiConsumer) CPAttachmentFileEntry::setUserName); attributeSetterBiConsumers.put( "createDate", (BiConsumer) CPAttachmentFileEntry::setCreateDate); attributeSetterBiConsumers.put( "modifiedDate", (BiConsumer) CPAttachmentFileEntry::setModifiedDate); attributeSetterBiConsumers.put( "classNameId", (BiConsumer) CPAttachmentFileEntry::setClassNameId); attributeSetterBiConsumers.put( "classPK", (BiConsumer) CPAttachmentFileEntry::setClassPK); attributeSetterBiConsumers.put( "fileEntryId", (BiConsumer) CPAttachmentFileEntry::setFileEntryId); attributeSetterBiConsumers.put( "cdnEnabled", (BiConsumer) CPAttachmentFileEntry::setCDNEnabled); attributeSetterBiConsumers.put( "cdnURL", (BiConsumer) CPAttachmentFileEntry::setCDNURL); attributeSetterBiConsumers.put( "displayDate", (BiConsumer) CPAttachmentFileEntry::setDisplayDate); attributeSetterBiConsumers.put( "expirationDate", (BiConsumer) CPAttachmentFileEntry::setExpirationDate); attributeSetterBiConsumers.put( "galleryEnabled", (BiConsumer) CPAttachmentFileEntry::setGalleryEnabled); attributeSetterBiConsumers.put( "title", (BiConsumer) CPAttachmentFileEntry::setTitle); attributeSetterBiConsumers.put( "json", (BiConsumer) CPAttachmentFileEntry::setJson); attributeSetterBiConsumers.put( "priority", (BiConsumer) CPAttachmentFileEntry::setPriority); attributeSetterBiConsumers.put( "type", (BiConsumer) CPAttachmentFileEntry::setType); attributeSetterBiConsumers.put( "lastPublishDate", (BiConsumer) CPAttachmentFileEntry::setLastPublishDate); attributeSetterBiConsumers.put( "status", (BiConsumer) CPAttachmentFileEntry::setStatus); attributeSetterBiConsumers.put( "statusByUserId", (BiConsumer) CPAttachmentFileEntry::setStatusByUserId); attributeSetterBiConsumers.put( "statusByUserName", (BiConsumer) CPAttachmentFileEntry::setStatusByUserName); attributeSetterBiConsumers.put( "statusDate", (BiConsumer) CPAttachmentFileEntry::setStatusDate); _attributeSetterBiConsumers = Collections.unmodifiableMap( (Map)attributeSetterBiConsumers); } } @JSON @Override public long getMvccVersion() { return _mvccVersion; } @Override public void setMvccVersion(long mvccVersion) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _mvccVersion = mvccVersion; } @JSON @Override public long getCtCollectionId() { return _ctCollectionId; } @Override public void setCtCollectionId(long ctCollectionId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _ctCollectionId = ctCollectionId; } @JSON @Override public String getUuid() { if (_uuid == null) { return ""; } else { return _uuid; } } @Override public void setUuid(String uuid) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _uuid = uuid; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public String getOriginalUuid() { return getColumnOriginalValue("uuid_"); } @JSON @Override public String getExternalReferenceCode() { if (_externalReferenceCode == null) { return ""; } else { return _externalReferenceCode; } } @Override public void setExternalReferenceCode(String externalReferenceCode) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _externalReferenceCode = externalReferenceCode; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public String getOriginalExternalReferenceCode() { return getColumnOriginalValue("externalReferenceCode"); } @JSON @Override public long getCPAttachmentFileEntryId() { return _CPAttachmentFileEntryId; } @Override public void setCPAttachmentFileEntryId(long CPAttachmentFileEntryId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _CPAttachmentFileEntryId = CPAttachmentFileEntryId; } @JSON @Override public long getGroupId() { return _groupId; } @Override public void setGroupId(long groupId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _groupId = groupId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalGroupId() { return GetterUtil.getLong(this.getColumnOriginalValue("groupId")); } @JSON @Override public long getCompanyId() { return _companyId; } @Override public void setCompanyId(long companyId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _companyId = companyId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalCompanyId() { return GetterUtil.getLong( this.getColumnOriginalValue("companyId")); } @JSON @Override public long getUserId() { return _userId; } @Override public void setUserId(long userId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _userId = userId; } @Override public String getUserUuid() { try { User user = UserLocalServiceUtil.getUserById(getUserId()); return user.getUuid(); } catch (PortalException portalException) { return ""; } } @Override public void setUserUuid(String userUuid) { } @JSON @Override public String getUserName() { if (_userName == null) { return ""; } else { return _userName; } } @Override public void setUserName(String userName) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _userName = userName; } @JSON @Override public Date getCreateDate() { return _createDate; } @Override public void setCreateDate(Date createDate) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _createDate = createDate; } @JSON @Override public Date getModifiedDate() { return _modifiedDate; } public boolean hasSetModifiedDate() { return _setModifiedDate; } @Override public void setModifiedDate(Date modifiedDate) { _setModifiedDate = true; if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _modifiedDate = modifiedDate; } @Override public String getClassName() { if (getClassNameId() <= 0) { return ""; } return PortalUtil.getClassName(getClassNameId()); } @Override public void setClassName(String className) { long classNameId = 0; if (Validator.isNotNull(className)) { classNameId = PortalUtil.getClassNameId(className); } setClassNameId(classNameId); } @JSON @Override public long getClassNameId() { return _classNameId; } @Override public void setClassNameId(long classNameId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _classNameId = classNameId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalClassNameId() { return GetterUtil.getLong( this.getColumnOriginalValue("classNameId")); } @JSON @Override public long getClassPK() { return _classPK; } @Override public void setClassPK(long classPK) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _classPK = classPK; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalClassPK() { return GetterUtil.getLong(this.getColumnOriginalValue("classPK")); } @JSON @Override public long getFileEntryId() { return _fileEntryId; } @Override public void setFileEntryId(long fileEntryId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _fileEntryId = fileEntryId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalFileEntryId() { return GetterUtil.getLong( this.getColumnOriginalValue("fileEntryId")); } @JSON @Override public boolean getCDNEnabled() { return _cdnEnabled; } @JSON @Override public boolean isCDNEnabled() { return _cdnEnabled; } @Override public void setCDNEnabled(boolean cdnEnabled) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _cdnEnabled = cdnEnabled; } @JSON @Override public String getCDNURL() { if (_cdnURL == null) { return ""; } else { return _cdnURL; } } @Override public void setCDNURL(String cdnURL) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _cdnURL = cdnURL; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public String getOriginalCDNURL() { return getColumnOriginalValue("cdnURL"); } @JSON @Override public Date getDisplayDate() { return _displayDate; } @Override public void setDisplayDate(Date displayDate) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _displayDate = displayDate; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public Date getOriginalDisplayDate() { return getColumnOriginalValue("displayDate"); } @JSON @Override public Date getExpirationDate() { return _expirationDate; } @Override public void setExpirationDate(Date expirationDate) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _expirationDate = expirationDate; } @JSON @Override public boolean getGalleryEnabled() { return _galleryEnabled; } @JSON @Override public boolean isGalleryEnabled() { return _galleryEnabled; } @Override public void setGalleryEnabled(boolean galleryEnabled) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _galleryEnabled = galleryEnabled; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public boolean getOriginalGalleryEnabled() { return GetterUtil.getBoolean( this.getColumnOriginalValue("galleryEnabled")); } @JSON @Override public String getTitle() { if (_title == null) { return ""; } else { return _title; } } @Override public String getTitle(Locale locale) { String languageId = LocaleUtil.toLanguageId(locale); return getTitle(languageId); } @Override public String getTitle(Locale locale, boolean useDefault) { String languageId = LocaleUtil.toLanguageId(locale); return getTitle(languageId, useDefault); } @Override public String getTitle(String languageId) { return LocalizationUtil.getLocalization(getTitle(), languageId); } @Override public String getTitle(String languageId, boolean useDefault) { return LocalizationUtil.getLocalization( getTitle(), languageId, useDefault); } @Override public String getTitleCurrentLanguageId() { return _titleCurrentLanguageId; } @JSON @Override public String getTitleCurrentValue() { Locale locale = getLocale(_titleCurrentLanguageId); return getTitle(locale); } @Override public Map getTitleMap() { return LocalizationUtil.getLocalizationMap(getTitle()); } @Override public void setTitle(String title) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _title = title; } @Override public void setTitle(String title, Locale locale) { setTitle(title, locale, LocaleUtil.getSiteDefault()); } @Override public void setTitle(String title, Locale locale, Locale defaultLocale) { String languageId = LocaleUtil.toLanguageId(locale); String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale); if (Validator.isNotNull(title)) { setTitle( LocalizationUtil.updateLocalization( getTitle(), "Title", title, languageId, defaultLanguageId)); } else { setTitle( LocalizationUtil.removeLocalization( getTitle(), "Title", languageId)); } } @Override public void setTitleCurrentLanguageId(String languageId) { _titleCurrentLanguageId = languageId; } @Override public void setTitleMap(Map titleMap) { setTitleMap(titleMap, LocaleUtil.getSiteDefault()); } @Override public void setTitleMap( Map titleMap, Locale defaultLocale) { if (titleMap == null) { return; } setTitle( LocalizationUtil.updateLocalization( titleMap, getTitle(), "Title", LocaleUtil.toLanguageId(defaultLocale))); } @JSON @Override public String getJson() { if (_json == null) { return ""; } else { return _json; } } @Override public void setJson(String json) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _json = json; } @JSON @Override public double getPriority() { return _priority; } @Override public void setPriority(double priority) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _priority = priority; } @JSON @Override public int getType() { return _type; } @Override public void setType(int type) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _type = type; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public int getOriginalType() { return GetterUtil.getInteger( this.getColumnOriginalValue("type_")); } @JSON @Override public Date getLastPublishDate() { return _lastPublishDate; } @Override public void setLastPublishDate(Date lastPublishDate) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _lastPublishDate = lastPublishDate; } @JSON @Override public int getStatus() { return _status; } @Override public void setStatus(int status) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _status = status; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public int getOriginalStatus() { return GetterUtil.getInteger( this.getColumnOriginalValue("status")); } @JSON @Override public long getStatusByUserId() { return _statusByUserId; } @Override public void setStatusByUserId(long statusByUserId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _statusByUserId = statusByUserId; } @Override public String getStatusByUserUuid() { try { User user = UserLocalServiceUtil.getUserById(getStatusByUserId()); return user.getUuid(); } catch (PortalException portalException) { return ""; } } @Override public void setStatusByUserUuid(String statusByUserUuid) { } @JSON @Override public String getStatusByUserName() { if (_statusByUserName == null) { return ""; } else { return _statusByUserName; } } @Override public void setStatusByUserName(String statusByUserName) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _statusByUserName = statusByUserName; } @JSON @Override public Date getStatusDate() { return _statusDate; } @Override public void setStatusDate(Date statusDate) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _statusDate = statusDate; } @Override public StagedModelType getStagedModelType() { return new StagedModelType( PortalUtil.getClassNameId(CPAttachmentFileEntry.class.getName()), getClassNameId()); } @Override public boolean isApproved() { if (getStatus() == WorkflowConstants.STATUS_APPROVED) { return true; } else { return false; } } @Override public boolean isDenied() { if (getStatus() == WorkflowConstants.STATUS_DENIED) { return true; } else { return false; } } @Override public boolean isDraft() { if (getStatus() == WorkflowConstants.STATUS_DRAFT) { return true; } else { return false; } } @Override public boolean isExpired() { if (getStatus() == WorkflowConstants.STATUS_EXPIRED) { return true; } else { return false; } } @Override public boolean isInactive() { if (getStatus() == WorkflowConstants.STATUS_INACTIVE) { return true; } else { return false; } } @Override public boolean isIncomplete() { if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) { return true; } else { return false; } } @Override public boolean isPending() { if (getStatus() == WorkflowConstants.STATUS_PENDING) { return true; } else { return false; } } @Override public boolean isScheduled() { if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) { return true; } else { return false; } } public long getColumnBitmask() { if (_columnBitmask > 0) { return _columnBitmask; } if ((_columnOriginalValues == null) || (_columnOriginalValues == Collections.EMPTY_MAP)) { return 0; } for (Map.Entry entry : _columnOriginalValues.entrySet()) { if (!Objects.equals( entry.getValue(), getColumnValue(entry.getKey()))) { _columnBitmask |= _columnBitmasks.get(entry.getKey()); } } return _columnBitmask; } @Override public ExpandoBridge getExpandoBridge() { return ExpandoBridgeFactoryUtil.getExpandoBridge( getCompanyId(), CPAttachmentFileEntry.class.getName(), getPrimaryKey()); } @Override public void setExpandoBridgeAttributes(ServiceContext serviceContext) { ExpandoBridge expandoBridge = getExpandoBridge(); expandoBridge.setAttributes(serviceContext); } @Override public String[] getAvailableLanguageIds() { Set availableLanguageIds = new TreeSet(); Map titleMap = getTitleMap(); for (Map.Entry entry : titleMap.entrySet()) { Locale locale = entry.getKey(); String value = entry.getValue(); if (Validator.isNotNull(value)) { availableLanguageIds.add(LocaleUtil.toLanguageId(locale)); } } return availableLanguageIds.toArray( new String[availableLanguageIds.size()]); } @Override public String getDefaultLanguageId() { String xml = getTitle(); if (xml == null) { return ""; } Locale defaultLocale = LocaleUtil.getSiteDefault(); return LocalizationUtil.getDefaultLanguageId(xml, defaultLocale); } @Override public void prepareLocalizedFieldsForImport() throws LocaleException { Locale defaultLocale = LocaleUtil.fromLanguageId( getDefaultLanguageId()); Locale[] availableLocales = LocaleUtil.fromLanguageIds( getAvailableLanguageIds()); Locale defaultImportLocale = LocalizationUtil.getDefaultImportLocale( CPAttachmentFileEntry.class.getName(), getPrimaryKey(), defaultLocale, availableLocales); prepareLocalizedFieldsForImport(defaultImportLocale); } @Override @SuppressWarnings("unused") public void prepareLocalizedFieldsForImport(Locale defaultImportLocale) throws LocaleException { Locale defaultLocale = LocaleUtil.getSiteDefault(); String modelDefaultLanguageId = getDefaultLanguageId(); String title = getTitle(defaultLocale); if (Validator.isNull(title)) { setTitle(getTitle(modelDefaultLanguageId), defaultLocale); } else { setTitle(getTitle(defaultLocale), defaultLocale, defaultLocale); } } @Override public CPAttachmentFileEntry toEscapedModel() { if (_escapedModel == null) { Function escapedModelProxyProviderFunction = EscapedModelProxyProviderFunctionHolder. _escapedModelProxyProviderFunction; _escapedModel = escapedModelProxyProviderFunction.apply( new AutoEscapeBeanHandler(this)); } return _escapedModel; } @Override public Object clone() { CPAttachmentFileEntryImpl cpAttachmentFileEntryImpl = new CPAttachmentFileEntryImpl(); cpAttachmentFileEntryImpl.setMvccVersion(getMvccVersion()); cpAttachmentFileEntryImpl.setCtCollectionId(getCtCollectionId()); cpAttachmentFileEntryImpl.setUuid(getUuid()); cpAttachmentFileEntryImpl.setExternalReferenceCode( getExternalReferenceCode()); cpAttachmentFileEntryImpl.setCPAttachmentFileEntryId( getCPAttachmentFileEntryId()); cpAttachmentFileEntryImpl.setGroupId(getGroupId()); cpAttachmentFileEntryImpl.setCompanyId(getCompanyId()); cpAttachmentFileEntryImpl.setUserId(getUserId()); cpAttachmentFileEntryImpl.setUserName(getUserName()); cpAttachmentFileEntryImpl.setCreateDate(getCreateDate()); cpAttachmentFileEntryImpl.setModifiedDate(getModifiedDate()); cpAttachmentFileEntryImpl.setClassNameId(getClassNameId()); cpAttachmentFileEntryImpl.setClassPK(getClassPK()); cpAttachmentFileEntryImpl.setFileEntryId(getFileEntryId()); cpAttachmentFileEntryImpl.setCDNEnabled(isCDNEnabled()); cpAttachmentFileEntryImpl.setCDNURL(getCDNURL()); cpAttachmentFileEntryImpl.setDisplayDate(getDisplayDate()); cpAttachmentFileEntryImpl.setExpirationDate(getExpirationDate()); cpAttachmentFileEntryImpl.setGalleryEnabled(isGalleryEnabled()); cpAttachmentFileEntryImpl.setTitle(getTitle()); cpAttachmentFileEntryImpl.setJson(getJson()); cpAttachmentFileEntryImpl.setPriority(getPriority()); cpAttachmentFileEntryImpl.setType(getType()); cpAttachmentFileEntryImpl.setLastPublishDate(getLastPublishDate()); cpAttachmentFileEntryImpl.setStatus(getStatus()); cpAttachmentFileEntryImpl.setStatusByUserId(getStatusByUserId()); cpAttachmentFileEntryImpl.setStatusByUserName(getStatusByUserName()); cpAttachmentFileEntryImpl.setStatusDate(getStatusDate()); cpAttachmentFileEntryImpl.resetOriginalValues(); return cpAttachmentFileEntryImpl; } @Override public CPAttachmentFileEntry cloneWithOriginalValues() { CPAttachmentFileEntryImpl cpAttachmentFileEntryImpl = new CPAttachmentFileEntryImpl(); cpAttachmentFileEntryImpl.setMvccVersion( this.getColumnOriginalValue("mvccVersion")); cpAttachmentFileEntryImpl.setCtCollectionId( this.getColumnOriginalValue("ctCollectionId")); cpAttachmentFileEntryImpl.setUuid( this.getColumnOriginalValue("uuid_")); cpAttachmentFileEntryImpl.setExternalReferenceCode( this.getColumnOriginalValue("externalReferenceCode")); cpAttachmentFileEntryImpl.setCPAttachmentFileEntryId( this.getColumnOriginalValue("CPAttachmentFileEntryId")); cpAttachmentFileEntryImpl.setGroupId( this.getColumnOriginalValue("groupId")); cpAttachmentFileEntryImpl.setCompanyId( this.getColumnOriginalValue("companyId")); cpAttachmentFileEntryImpl.setUserId( this.getColumnOriginalValue("userId")); cpAttachmentFileEntryImpl.setUserName( this.getColumnOriginalValue("userName")); cpAttachmentFileEntryImpl.setCreateDate( this.getColumnOriginalValue("createDate")); cpAttachmentFileEntryImpl.setModifiedDate( this.getColumnOriginalValue("modifiedDate")); cpAttachmentFileEntryImpl.setClassNameId( this.getColumnOriginalValue("classNameId")); cpAttachmentFileEntryImpl.setClassPK( this.getColumnOriginalValue("classPK")); cpAttachmentFileEntryImpl.setFileEntryId( this.getColumnOriginalValue("fileEntryId")); cpAttachmentFileEntryImpl.setCDNEnabled( this.getColumnOriginalValue("cdnEnabled")); cpAttachmentFileEntryImpl.setCDNURL( this.getColumnOriginalValue("cdnURL")); cpAttachmentFileEntryImpl.setDisplayDate( this.getColumnOriginalValue("displayDate")); cpAttachmentFileEntryImpl.setExpirationDate( this.getColumnOriginalValue("expirationDate")); cpAttachmentFileEntryImpl.setGalleryEnabled( this.getColumnOriginalValue("galleryEnabled")); cpAttachmentFileEntryImpl.setTitle( this.getColumnOriginalValue("title")); cpAttachmentFileEntryImpl.setJson( this.getColumnOriginalValue("json")); cpAttachmentFileEntryImpl.setPriority( this.getColumnOriginalValue("priority")); cpAttachmentFileEntryImpl.setType( this.getColumnOriginalValue("type_")); cpAttachmentFileEntryImpl.setLastPublishDate( this.getColumnOriginalValue("lastPublishDate")); cpAttachmentFileEntryImpl.setStatus( this.getColumnOriginalValue("status")); cpAttachmentFileEntryImpl.setStatusByUserId( this.getColumnOriginalValue("statusByUserId")); cpAttachmentFileEntryImpl.setStatusByUserName( this.getColumnOriginalValue("statusByUserName")); cpAttachmentFileEntryImpl.setStatusDate( this.getColumnOriginalValue("statusDate")); return cpAttachmentFileEntryImpl; } @Override public int compareTo(CPAttachmentFileEntry cpAttachmentFileEntry) { int value = 0; if (getPriority() < cpAttachmentFileEntry.getPriority()) { value = -1; } else if (getPriority() > cpAttachmentFileEntry.getPriority()) { value = 1; } else { value = 0; } if (value != 0) { return value; } return 0; } @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof CPAttachmentFileEntry)) { return false; } CPAttachmentFileEntry cpAttachmentFileEntry = (CPAttachmentFileEntry)object; long primaryKey = cpAttachmentFileEntry.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } } @Override public int hashCode() { return (int)getPrimaryKey(); } /** * @deprecated As of Athanasius (7.3.x), with no direct replacement */ @Deprecated @Override public boolean isEntityCacheEnabled() { return true; } /** * @deprecated As of Athanasius (7.3.x), with no direct replacement */ @Deprecated @Override public boolean isFinderCacheEnabled() { return true; } @Override public void resetOriginalValues() { _columnOriginalValues = Collections.emptyMap(); _setModifiedDate = false; _columnBitmask = 0; } @Override public CacheModel toCacheModel() { CPAttachmentFileEntryCacheModel cpAttachmentFileEntryCacheModel = new CPAttachmentFileEntryCacheModel(); cpAttachmentFileEntryCacheModel.mvccVersion = getMvccVersion(); cpAttachmentFileEntryCacheModel.ctCollectionId = getCtCollectionId(); cpAttachmentFileEntryCacheModel.uuid = getUuid(); String uuid = cpAttachmentFileEntryCacheModel.uuid; if ((uuid != null) && (uuid.length() == 0)) { cpAttachmentFileEntryCacheModel.uuid = null; } cpAttachmentFileEntryCacheModel.externalReferenceCode = getExternalReferenceCode(); String externalReferenceCode = cpAttachmentFileEntryCacheModel.externalReferenceCode; if ((externalReferenceCode != null) && (externalReferenceCode.length() == 0)) { cpAttachmentFileEntryCacheModel.externalReferenceCode = null; } cpAttachmentFileEntryCacheModel.CPAttachmentFileEntryId = getCPAttachmentFileEntryId(); cpAttachmentFileEntryCacheModel.groupId = getGroupId(); cpAttachmentFileEntryCacheModel.companyId = getCompanyId(); cpAttachmentFileEntryCacheModel.userId = getUserId(); cpAttachmentFileEntryCacheModel.userName = getUserName(); String userName = cpAttachmentFileEntryCacheModel.userName; if ((userName != null) && (userName.length() == 0)) { cpAttachmentFileEntryCacheModel.userName = null; } Date createDate = getCreateDate(); if (createDate != null) { cpAttachmentFileEntryCacheModel.createDate = createDate.getTime(); } else { cpAttachmentFileEntryCacheModel.createDate = Long.MIN_VALUE; } Date modifiedDate = getModifiedDate(); if (modifiedDate != null) { cpAttachmentFileEntryCacheModel.modifiedDate = modifiedDate.getTime(); } else { cpAttachmentFileEntryCacheModel.modifiedDate = Long.MIN_VALUE; } cpAttachmentFileEntryCacheModel.classNameId = getClassNameId(); cpAttachmentFileEntryCacheModel.classPK = getClassPK(); cpAttachmentFileEntryCacheModel.fileEntryId = getFileEntryId(); cpAttachmentFileEntryCacheModel.cdnEnabled = isCDNEnabled(); cpAttachmentFileEntryCacheModel.cdnURL = getCDNURL(); String cdnURL = cpAttachmentFileEntryCacheModel.cdnURL; if ((cdnURL != null) && (cdnURL.length() == 0)) { cpAttachmentFileEntryCacheModel.cdnURL = null; } Date displayDate = getDisplayDate(); if (displayDate != null) { cpAttachmentFileEntryCacheModel.displayDate = displayDate.getTime(); } else { cpAttachmentFileEntryCacheModel.displayDate = Long.MIN_VALUE; } Date expirationDate = getExpirationDate(); if (expirationDate != null) { cpAttachmentFileEntryCacheModel.expirationDate = expirationDate.getTime(); } else { cpAttachmentFileEntryCacheModel.expirationDate = Long.MIN_VALUE; } cpAttachmentFileEntryCacheModel.galleryEnabled = isGalleryEnabled(); cpAttachmentFileEntryCacheModel.title = getTitle(); String title = cpAttachmentFileEntryCacheModel.title; if ((title != null) && (title.length() == 0)) { cpAttachmentFileEntryCacheModel.title = null; } cpAttachmentFileEntryCacheModel.json = getJson(); String json = cpAttachmentFileEntryCacheModel.json; if ((json != null) && (json.length() == 0)) { cpAttachmentFileEntryCacheModel.json = null; } cpAttachmentFileEntryCacheModel.priority = getPriority(); cpAttachmentFileEntryCacheModel.type = getType(); Date lastPublishDate = getLastPublishDate(); if (lastPublishDate != null) { cpAttachmentFileEntryCacheModel.lastPublishDate = lastPublishDate.getTime(); } else { cpAttachmentFileEntryCacheModel.lastPublishDate = Long.MIN_VALUE; } cpAttachmentFileEntryCacheModel.status = getStatus(); cpAttachmentFileEntryCacheModel.statusByUserId = getStatusByUserId(); cpAttachmentFileEntryCacheModel.statusByUserName = getStatusByUserName(); String statusByUserName = cpAttachmentFileEntryCacheModel.statusByUserName; if ((statusByUserName != null) && (statusByUserName.length() == 0)) { cpAttachmentFileEntryCacheModel.statusByUserName = null; } Date statusDate = getStatusDate(); if (statusDate != null) { cpAttachmentFileEntryCacheModel.statusDate = statusDate.getTime(); } else { cpAttachmentFileEntryCacheModel.statusDate = Long.MIN_VALUE; } return cpAttachmentFileEntryCacheModel; } @Override public String toString() { Map> attributeGetterFunctions = getAttributeGetterFunctions(); StringBundler sb = new StringBundler( (5 * attributeGetterFunctions.size()) + 2); sb.append("{"); for (Map.Entry> entry : attributeGetterFunctions.entrySet()) { String attributeName = entry.getKey(); Function attributeGetterFunction = entry.getValue(); sb.append("\""); sb.append(attributeName); sb.append("\": "); Object value = attributeGetterFunction.apply( (CPAttachmentFileEntry)this); if (value == null) { sb.append("null"); } else if (value instanceof Blob || value instanceof Date || value instanceof Map || value instanceof String) { sb.append( "\"" + StringUtil.replace(value.toString(), "\"", "'") + "\""); } else { sb.append(value); } sb.append(", "); } if (sb.index() > 1) { sb.setIndex(sb.index() - 1); } sb.append("}"); return sb.toString(); } private static class EscapedModelProxyProviderFunctionHolder { private static final Function _escapedModelProxyProviderFunction = ProxyUtil.getProxyProviderFunction( CPAttachmentFileEntry.class, ModelWrapper.class); } private long _mvccVersion; private long _ctCollectionId; private String _uuid; private String _externalReferenceCode; private long _CPAttachmentFileEntryId; private long _groupId; private long _companyId; private long _userId; private String _userName; private Date _createDate; private Date _modifiedDate; private boolean _setModifiedDate; private long _classNameId; private long _classPK; private long _fileEntryId; private boolean _cdnEnabled; private String _cdnURL; private Date _displayDate; private Date _expirationDate; private boolean _galleryEnabled; private String _title; private String _titleCurrentLanguageId; private String _json; private double _priority; private int _type; private Date _lastPublishDate; private int _status; private long _statusByUserId; private String _statusByUserName; private Date _statusDate; public T getColumnValue(String columnName) { columnName = _attributeNames.getOrDefault(columnName, columnName); Function function = AttributeGetterFunctionsHolder._attributeGetterFunctions.get( columnName); if (function == null) { throw new IllegalArgumentException( "No attribute getter function found for " + columnName); } return (T)function.apply((CPAttachmentFileEntry)this); } public T getColumnOriginalValue(String columnName) { if (_columnOriginalValues == null) { return null; } if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } return (T)_columnOriginalValues.get(columnName); } private void _setColumnOriginalValues() { _columnOriginalValues = new HashMap(); _columnOriginalValues.put("mvccVersion", _mvccVersion); _columnOriginalValues.put("ctCollectionId", _ctCollectionId); _columnOriginalValues.put("uuid_", _uuid); _columnOriginalValues.put( "externalReferenceCode", _externalReferenceCode); _columnOriginalValues.put( "CPAttachmentFileEntryId", _CPAttachmentFileEntryId); _columnOriginalValues.put("groupId", _groupId); _columnOriginalValues.put("companyId", _companyId); _columnOriginalValues.put("userId", _userId); _columnOriginalValues.put("userName", _userName); _columnOriginalValues.put("createDate", _createDate); _columnOriginalValues.put("modifiedDate", _modifiedDate); _columnOriginalValues.put("classNameId", _classNameId); _columnOriginalValues.put("classPK", _classPK); _columnOriginalValues.put("fileEntryId", _fileEntryId); _columnOriginalValues.put("cdnEnabled", _cdnEnabled); _columnOriginalValues.put("cdnURL", _cdnURL); _columnOriginalValues.put("displayDate", _displayDate); _columnOriginalValues.put("expirationDate", _expirationDate); _columnOriginalValues.put("galleryEnabled", _galleryEnabled); _columnOriginalValues.put("title", _title); _columnOriginalValues.put("json", _json); _columnOriginalValues.put("priority", _priority); _columnOriginalValues.put("type_", _type); _columnOriginalValues.put("lastPublishDate", _lastPublishDate); _columnOriginalValues.put("status", _status); _columnOriginalValues.put("statusByUserId", _statusByUserId); _columnOriginalValues.put("statusByUserName", _statusByUserName); _columnOriginalValues.put("statusDate", _statusDate); } private static final Map _attributeNames; static { Map attributeNames = new HashMap<>(); attributeNames.put("uuid_", "uuid"); attributeNames.put("type_", "type"); _attributeNames = Collections.unmodifiableMap(attributeNames); } private transient Map _columnOriginalValues; public static long getColumnBitmask(String columnName) { return _columnBitmasks.get(columnName); } private static final Map _columnBitmasks; static { Map columnBitmasks = new HashMap<>(); columnBitmasks.put("mvccVersion", 1L); columnBitmasks.put("ctCollectionId", 2L); columnBitmasks.put("uuid_", 4L); columnBitmasks.put("externalReferenceCode", 8L); columnBitmasks.put("CPAttachmentFileEntryId", 16L); columnBitmasks.put("groupId", 32L); columnBitmasks.put("companyId", 64L); columnBitmasks.put("userId", 128L); columnBitmasks.put("userName", 256L); columnBitmasks.put("createDate", 512L); columnBitmasks.put("modifiedDate", 1024L); columnBitmasks.put("classNameId", 2048L); columnBitmasks.put("classPK", 4096L); columnBitmasks.put("fileEntryId", 8192L); columnBitmasks.put("cdnEnabled", 16384L); columnBitmasks.put("cdnURL", 32768L); columnBitmasks.put("displayDate", 65536L); columnBitmasks.put("expirationDate", 131072L); columnBitmasks.put("galleryEnabled", 262144L); columnBitmasks.put("title", 524288L); columnBitmasks.put("json", 1048576L); columnBitmasks.put("priority", 2097152L); columnBitmasks.put("type_", 4194304L); columnBitmasks.put("lastPublishDate", 8388608L); columnBitmasks.put("status", 16777216L); columnBitmasks.put("statusByUserId", 33554432L); columnBitmasks.put("statusByUserName", 67108864L); columnBitmasks.put("statusDate", 134217728L); _columnBitmasks = Collections.unmodifiableMap(columnBitmasks); } private long _columnBitmask; private CPAttachmentFileEntry _escapedModel; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy