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

com.liferay.commerce.product.model.impl.CPDefinitionModelImpl 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.CPDefinition;
import com.liferay.commerce.product.model.CPDefinitionLocalization;
import com.liferay.commerce.product.model.CPDefinitionModel;
import com.liferay.commerce.product.service.CPDefinitionLocalServiceUtil;
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.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.DateUtil;
import com.liferay.portal.kernel.util.GetterUtil;
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.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.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.BiConsumer;
import java.util.function.Function;

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

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

* * @author Marco Leo * @see CPDefinitionImpl * @generated */ @JSON(strict = true) public class CPDefinitionModelImpl extends BaseModelImpl implements CPDefinitionModel { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a cp definition model instance should use the CPDefinition interface instead. */ public static final String TABLE_NAME = "CPDefinition"; public static final Object[][] TABLE_COLUMNS = { {"mvccVersion", Types.BIGINT}, {"ctCollectionId", Types.BIGINT}, {"uuid_", Types.VARCHAR}, {"defaultLanguageId", Types.VARCHAR}, {"CPDefinitionId", Types.BIGINT}, {"groupId", Types.BIGINT}, {"companyId", Types.BIGINT}, {"userId", Types.BIGINT}, {"userName", Types.VARCHAR}, {"createDate", Types.TIMESTAMP}, {"modifiedDate", Types.TIMESTAMP}, {"CProductId", Types.BIGINT}, {"CPTaxCategoryId", Types.BIGINT}, {"productTypeName", Types.VARCHAR}, {"availableIndividually", Types.BOOLEAN}, {"ignoreSKUCombinations", Types.BOOLEAN}, {"shippable", Types.BOOLEAN}, {"freeShipping", Types.BOOLEAN}, {"shipSeparately", Types.BOOLEAN}, {"shippingExtraPrice", Types.DOUBLE}, {"width", Types.DOUBLE}, {"height", Types.DOUBLE}, {"depth", Types.DOUBLE}, {"weight", Types.DOUBLE}, {"taxExempt", Types.BOOLEAN}, {"telcoOrElectronics", Types.BOOLEAN}, {"DDMStructureKey", Types.VARCHAR}, {"published", Types.BOOLEAN}, {"displayDate", Types.TIMESTAMP}, {"expirationDate", Types.TIMESTAMP}, {"lastPublishDate", Types.TIMESTAMP}, {"subscriptionEnabled", Types.BOOLEAN}, {"subscriptionLength", Types.INTEGER}, {"subscriptionType", Types.VARCHAR}, {"subscriptionTypeSettings", Types.CLOB}, {"maxSubscriptionCycles", Types.BIGINT}, {"deliverySubscriptionEnabled", Types.BOOLEAN}, {"deliverySubscriptionLength", Types.INTEGER}, {"deliverySubscriptionType", Types.VARCHAR}, {"deliverySubTypeSettings", Types.VARCHAR}, {"deliveryMaxSubscriptionCycles", Types.BIGINT}, {"accountGroupFilterEnabled", Types.BOOLEAN}, {"channelFilterEnabled", Types.BOOLEAN}, {"version", Types.INTEGER}, {"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("defaultLanguageId", Types.VARCHAR); TABLE_COLUMNS_MAP.put("CPDefinitionId", 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("CProductId", Types.BIGINT); TABLE_COLUMNS_MAP.put("CPTaxCategoryId", Types.BIGINT); TABLE_COLUMNS_MAP.put("productTypeName", Types.VARCHAR); TABLE_COLUMNS_MAP.put("availableIndividually", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("ignoreSKUCombinations", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("shippable", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("freeShipping", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("shipSeparately", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("shippingExtraPrice", Types.DOUBLE); TABLE_COLUMNS_MAP.put("width", Types.DOUBLE); TABLE_COLUMNS_MAP.put("height", Types.DOUBLE); TABLE_COLUMNS_MAP.put("depth", Types.DOUBLE); TABLE_COLUMNS_MAP.put("weight", Types.DOUBLE); TABLE_COLUMNS_MAP.put("taxExempt", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("telcoOrElectronics", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("DDMStructureKey", Types.VARCHAR); TABLE_COLUMNS_MAP.put("published", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("displayDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("expirationDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("lastPublishDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("subscriptionEnabled", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("subscriptionLength", Types.INTEGER); TABLE_COLUMNS_MAP.put("subscriptionType", Types.VARCHAR); TABLE_COLUMNS_MAP.put("subscriptionTypeSettings", Types.CLOB); TABLE_COLUMNS_MAP.put("maxSubscriptionCycles", Types.BIGINT); TABLE_COLUMNS_MAP.put("deliverySubscriptionEnabled", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("deliverySubscriptionLength", Types.INTEGER); TABLE_COLUMNS_MAP.put("deliverySubscriptionType", Types.VARCHAR); TABLE_COLUMNS_MAP.put("deliverySubTypeSettings", Types.VARCHAR); TABLE_COLUMNS_MAP.put("deliveryMaxSubscriptionCycles", Types.BIGINT); TABLE_COLUMNS_MAP.put("accountGroupFilterEnabled", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("channelFilterEnabled", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("version", Types.INTEGER); 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 CPDefinition (mvccVersion LONG default 0 not null,ctCollectionId LONG default 0 not null,uuid_ VARCHAR(75) null,defaultLanguageId VARCHAR(75) null,CPDefinitionId LONG not null,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,CProductId LONG,CPTaxCategoryId LONG,productTypeName VARCHAR(75) null,availableIndividually BOOLEAN,ignoreSKUCombinations BOOLEAN,shippable BOOLEAN,freeShipping BOOLEAN,shipSeparately BOOLEAN,shippingExtraPrice DOUBLE,width DOUBLE,height DOUBLE,depth DOUBLE,weight DOUBLE,taxExempt BOOLEAN,telcoOrElectronics BOOLEAN,DDMStructureKey VARCHAR(75) null,published BOOLEAN,displayDate DATE null,expirationDate DATE null,lastPublishDate DATE null,subscriptionEnabled BOOLEAN,subscriptionLength INTEGER,subscriptionType VARCHAR(75) null,subscriptionTypeSettings TEXT null,maxSubscriptionCycles LONG,deliverySubscriptionEnabled BOOLEAN,deliverySubscriptionLength INTEGER,deliverySubscriptionType VARCHAR(75) null,deliverySubTypeSettings VARCHAR(75) null,deliveryMaxSubscriptionCycles LONG,accountGroupFilterEnabled BOOLEAN,channelFilterEnabled BOOLEAN,version INTEGER,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null,primary key (CPDefinitionId, ctCollectionId))"; public static final String TABLE_SQL_DROP = "drop table CPDefinition"; public static final String ORDER_BY_JPQL = " ORDER BY cpDefinition.displayDate DESC, cpDefinition.createDate DESC"; public static final String ORDER_BY_SQL = " ORDER BY CPDefinition.displayDate DESC, CPDefinition.createDate DESC"; public static final String ORDER_BY_SQL_INLINE_DISTINCT = " ORDER BY cpDefinition.displayDate DESC, cpDefinition.createDate DESC"; 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 CPTAXCATEGORYID_COLUMN_BITMASK = 1L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long CPRODUCTID_COLUMN_BITMASK = 2L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long COMPANYID_COLUMN_BITMASK = 4L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long DISPLAYDATE_COLUMN_BITMASK = 8L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long GROUPID_COLUMN_BITMASK = 16L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long STATUS_COLUMN_BITMASK = 32L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long SUBSCRIPTIONENABLED_COLUMN_BITMASK = 64L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long UUID_COLUMN_BITMASK = 128L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long VERSION_COLUMN_BITMASK = 256L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnBitmask(String)} */ @Deprecated public static final long CREATEDATE_COLUMN_BITMASK = 512L; /** * @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 CPDefinitionModelImpl() { } @Override public long getPrimaryKey() { return _CPDefinitionId; } @Override public void setPrimaryKey(long primaryKey) { setCPDefinitionId(primaryKey); } @Override public Serializable getPrimaryKeyObj() { return _CPDefinitionId; } @Override public void setPrimaryKeyObj(Serializable primaryKeyObj) { setPrimaryKey(((Long)primaryKeyObj).longValue()); } @Override public Class getModelClass() { return CPDefinition.class; } @Override public String getModelClassName() { return CPDefinition.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((CPDefinition)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( (CPDefinition)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", CPDefinition::getMvccVersion); attributeGetterFunctions.put( "ctCollectionId", CPDefinition::getCtCollectionId); attributeGetterFunctions.put("uuid", CPDefinition::getUuid); attributeGetterFunctions.put( "defaultLanguageId", CPDefinition::getDefaultLanguageId); attributeGetterFunctions.put( "CPDefinitionId", CPDefinition::getCPDefinitionId); attributeGetterFunctions.put("groupId", CPDefinition::getGroupId); attributeGetterFunctions.put( "companyId", CPDefinition::getCompanyId); attributeGetterFunctions.put("userId", CPDefinition::getUserId); attributeGetterFunctions.put("userName", CPDefinition::getUserName); attributeGetterFunctions.put( "createDate", CPDefinition::getCreateDate); attributeGetterFunctions.put( "modifiedDate", CPDefinition::getModifiedDate); attributeGetterFunctions.put( "CProductId", CPDefinition::getCProductId); attributeGetterFunctions.put( "CPTaxCategoryId", CPDefinition::getCPTaxCategoryId); attributeGetterFunctions.put( "productTypeName", CPDefinition::getProductTypeName); attributeGetterFunctions.put( "availableIndividually", CPDefinition::getAvailableIndividually); attributeGetterFunctions.put( "ignoreSKUCombinations", CPDefinition::getIgnoreSKUCombinations); attributeGetterFunctions.put( "shippable", CPDefinition::getShippable); attributeGetterFunctions.put( "freeShipping", CPDefinition::getFreeShipping); attributeGetterFunctions.put( "shipSeparately", CPDefinition::getShipSeparately); attributeGetterFunctions.put( "shippingExtraPrice", CPDefinition::getShippingExtraPrice); attributeGetterFunctions.put("width", CPDefinition::getWidth); attributeGetterFunctions.put("height", CPDefinition::getHeight); attributeGetterFunctions.put("depth", CPDefinition::getDepth); attributeGetterFunctions.put("weight", CPDefinition::getWeight); attributeGetterFunctions.put( "taxExempt", CPDefinition::getTaxExempt); attributeGetterFunctions.put( "telcoOrElectronics", CPDefinition::getTelcoOrElectronics); attributeGetterFunctions.put( "DDMStructureKey", CPDefinition::getDDMStructureKey); attributeGetterFunctions.put( "published", CPDefinition::getPublished); attributeGetterFunctions.put( "displayDate", CPDefinition::getDisplayDate); attributeGetterFunctions.put( "expirationDate", CPDefinition::getExpirationDate); attributeGetterFunctions.put( "lastPublishDate", CPDefinition::getLastPublishDate); attributeGetterFunctions.put( "subscriptionEnabled", CPDefinition::getSubscriptionEnabled); attributeGetterFunctions.put( "subscriptionLength", CPDefinition::getSubscriptionLength); attributeGetterFunctions.put( "subscriptionType", CPDefinition::getSubscriptionType); attributeGetterFunctions.put( "subscriptionTypeSettings", CPDefinition::getSubscriptionTypeSettings); attributeGetterFunctions.put( "maxSubscriptionCycles", CPDefinition::getMaxSubscriptionCycles); attributeGetterFunctions.put( "deliverySubscriptionEnabled", CPDefinition::getDeliverySubscriptionEnabled); attributeGetterFunctions.put( "deliverySubscriptionLength", CPDefinition::getDeliverySubscriptionLength); attributeGetterFunctions.put( "deliverySubscriptionType", CPDefinition::getDeliverySubscriptionType); attributeGetterFunctions.put( "deliverySubscriptionTypeSettings", CPDefinition::getDeliverySubscriptionTypeSettings); attributeGetterFunctions.put( "deliveryMaxSubscriptionCycles", CPDefinition::getDeliveryMaxSubscriptionCycles); attributeGetterFunctions.put( "accountGroupFilterEnabled", CPDefinition::getAccountGroupFilterEnabled); attributeGetterFunctions.put( "channelFilterEnabled", CPDefinition::getChannelFilterEnabled); attributeGetterFunctions.put("version", CPDefinition::getVersion); attributeGetterFunctions.put("status", CPDefinition::getStatus); attributeGetterFunctions.put( "statusByUserId", CPDefinition::getStatusByUserId); attributeGetterFunctions.put( "statusByUserName", CPDefinition::getStatusByUserName); attributeGetterFunctions.put( "statusDate", CPDefinition::getStatusDate); _attributeGetterFunctions = Collections.unmodifiableMap( attributeGetterFunctions); } } private static class AttributeSetterBiConsumersHolder { private static final Map> _attributeSetterBiConsumers; static { Map> attributeSetterBiConsumers = new LinkedHashMap>(); attributeSetterBiConsumers.put( "mvccVersion", (BiConsumer)CPDefinition::setMvccVersion); attributeSetterBiConsumers.put( "ctCollectionId", (BiConsumer) CPDefinition::setCtCollectionId); attributeSetterBiConsumers.put( "uuid", (BiConsumer)CPDefinition::setUuid); attributeSetterBiConsumers.put( "defaultLanguageId", (BiConsumer) CPDefinition::setDefaultLanguageId); attributeSetterBiConsumers.put( "CPDefinitionId", (BiConsumer) CPDefinition::setCPDefinitionId); attributeSetterBiConsumers.put( "groupId", (BiConsumer)CPDefinition::setGroupId); attributeSetterBiConsumers.put( "companyId", (BiConsumer)CPDefinition::setCompanyId); attributeSetterBiConsumers.put( "userId", (BiConsumer)CPDefinition::setUserId); attributeSetterBiConsumers.put( "userName", (BiConsumer)CPDefinition::setUserName); attributeSetterBiConsumers.put( "createDate", (BiConsumer)CPDefinition::setCreateDate); attributeSetterBiConsumers.put( "modifiedDate", (BiConsumer)CPDefinition::setModifiedDate); attributeSetterBiConsumers.put( "CProductId", (BiConsumer)CPDefinition::setCProductId); attributeSetterBiConsumers.put( "CPTaxCategoryId", (BiConsumer) CPDefinition::setCPTaxCategoryId); attributeSetterBiConsumers.put( "productTypeName", (BiConsumer) CPDefinition::setProductTypeName); attributeSetterBiConsumers.put( "availableIndividually", (BiConsumer) CPDefinition::setAvailableIndividually); attributeSetterBiConsumers.put( "ignoreSKUCombinations", (BiConsumer) CPDefinition::setIgnoreSKUCombinations); attributeSetterBiConsumers.put( "shippable", (BiConsumer)CPDefinition::setShippable); attributeSetterBiConsumers.put( "freeShipping", (BiConsumer) CPDefinition::setFreeShipping); attributeSetterBiConsumers.put( "shipSeparately", (BiConsumer) CPDefinition::setShipSeparately); attributeSetterBiConsumers.put( "shippingExtraPrice", (BiConsumer) CPDefinition::setShippingExtraPrice); attributeSetterBiConsumers.put( "width", (BiConsumer)CPDefinition::setWidth); attributeSetterBiConsumers.put( "height", (BiConsumer)CPDefinition::setHeight); attributeSetterBiConsumers.put( "depth", (BiConsumer)CPDefinition::setDepth); attributeSetterBiConsumers.put( "weight", (BiConsumer)CPDefinition::setWeight); attributeSetterBiConsumers.put( "taxExempt", (BiConsumer)CPDefinition::setTaxExempt); attributeSetterBiConsumers.put( "telcoOrElectronics", (BiConsumer) CPDefinition::setTelcoOrElectronics); attributeSetterBiConsumers.put( "DDMStructureKey", (BiConsumer) CPDefinition::setDDMStructureKey); attributeSetterBiConsumers.put( "published", (BiConsumer)CPDefinition::setPublished); attributeSetterBiConsumers.put( "displayDate", (BiConsumer)CPDefinition::setDisplayDate); attributeSetterBiConsumers.put( "expirationDate", (BiConsumer) CPDefinition::setExpirationDate); attributeSetterBiConsumers.put( "lastPublishDate", (BiConsumer) CPDefinition::setLastPublishDate); attributeSetterBiConsumers.put( "subscriptionEnabled", (BiConsumer) CPDefinition::setSubscriptionEnabled); attributeSetterBiConsumers.put( "subscriptionLength", (BiConsumer) CPDefinition::setSubscriptionLength); attributeSetterBiConsumers.put( "subscriptionType", (BiConsumer) CPDefinition::setSubscriptionType); attributeSetterBiConsumers.put( "subscriptionTypeSettings", (BiConsumer) CPDefinition::setSubscriptionTypeSettings); attributeSetterBiConsumers.put( "maxSubscriptionCycles", (BiConsumer) CPDefinition::setMaxSubscriptionCycles); attributeSetterBiConsumers.put( "deliverySubscriptionEnabled", (BiConsumer) CPDefinition::setDeliverySubscriptionEnabled); attributeSetterBiConsumers.put( "deliverySubscriptionLength", (BiConsumer) CPDefinition::setDeliverySubscriptionLength); attributeSetterBiConsumers.put( "deliverySubscriptionType", (BiConsumer) CPDefinition::setDeliverySubscriptionType); attributeSetterBiConsumers.put( "deliverySubscriptionTypeSettings", (BiConsumer) CPDefinition::setDeliverySubscriptionTypeSettings); attributeSetterBiConsumers.put( "deliveryMaxSubscriptionCycles", (BiConsumer) CPDefinition::setDeliveryMaxSubscriptionCycles); attributeSetterBiConsumers.put( "accountGroupFilterEnabled", (BiConsumer) CPDefinition::setAccountGroupFilterEnabled); attributeSetterBiConsumers.put( "channelFilterEnabled", (BiConsumer) CPDefinition::setChannelFilterEnabled); attributeSetterBiConsumers.put( "version", (BiConsumer)CPDefinition::setVersion); attributeSetterBiConsumers.put( "status", (BiConsumer)CPDefinition::setStatus); attributeSetterBiConsumers.put( "statusByUserId", (BiConsumer) CPDefinition::setStatusByUserId); attributeSetterBiConsumers.put( "statusByUserName", (BiConsumer) CPDefinition::setStatusByUserName); attributeSetterBiConsumers.put( "statusDate", (BiConsumer)CPDefinition::setStatusDate); _attributeSetterBiConsumers = Collections.unmodifiableMap( (Map)attributeSetterBiConsumers); } } @Override public String[] getAvailableLanguageIds() { List cpDefinitionLocalizations = CPDefinitionLocalServiceUtil.getCPDefinitionLocalizations( getPrimaryKey()); String[] availableLanguageIds = new String[cpDefinitionLocalizations.size()]; for (int i = 0; i < availableLanguageIds.length; i++) { CPDefinitionLocalization cpDefinitionLocalization = cpDefinitionLocalizations.get(i); availableLanguageIds[i] = cpDefinitionLocalization.getLanguageId(); } return availableLanguageIds; } @Override public String getName() { return getName(getDefaultLanguageId(), false); } @Override public String getName(String languageId) { return getName(languageId, true); } @Override public String getName(String languageId, boolean useDefault) { if (useDefault) { return LocalizationUtil.getLocalization( new Function() { @Override public String apply(String languageId) { return _getName(languageId); } }, languageId, getDefaultLanguageId()); } return _getName(languageId); } @Override public String getNameMapAsXML() { return LocalizationUtil.getXml( getLanguageIdToNameMap(), getDefaultLanguageId(), "Name"); } @Override public Map getLanguageIdToNameMap() { Map languageIdToNameMap = new HashMap(); List cpDefinitionLocalizations = CPDefinitionLocalServiceUtil.getCPDefinitionLocalizations( getPrimaryKey()); for (CPDefinitionLocalization cpDefinitionLocalization : cpDefinitionLocalizations) { languageIdToNameMap.put( cpDefinitionLocalization.getLanguageId(), cpDefinitionLocalization.getName()); } return languageIdToNameMap; } private String _getName(String languageId) { CPDefinitionLocalization cpDefinitionLocalization = CPDefinitionLocalServiceUtil.fetchCPDefinitionLocalization( getPrimaryKey(), languageId); if (cpDefinitionLocalization == null) { return ""; } return cpDefinitionLocalization.getName(); } @Override public String getShortDescription() { return getShortDescription(getDefaultLanguageId(), false); } @Override public String getShortDescription(String languageId) { return getShortDescription(languageId, true); } @Override public String getShortDescription(String languageId, boolean useDefault) { if (useDefault) { return LocalizationUtil.getLocalization( new Function() { @Override public String apply(String languageId) { return _getShortDescription(languageId); } }, languageId, getDefaultLanguageId()); } return _getShortDescription(languageId); } @Override public String getShortDescriptionMapAsXML() { return LocalizationUtil.getXml( getLanguageIdToShortDescriptionMap(), getDefaultLanguageId(), "ShortDescription"); } @Override public Map getLanguageIdToShortDescriptionMap() { Map languageIdToShortDescriptionMap = new HashMap(); List cpDefinitionLocalizations = CPDefinitionLocalServiceUtil.getCPDefinitionLocalizations( getPrimaryKey()); for (CPDefinitionLocalization cpDefinitionLocalization : cpDefinitionLocalizations) { languageIdToShortDescriptionMap.put( cpDefinitionLocalization.getLanguageId(), cpDefinitionLocalization.getShortDescription()); } return languageIdToShortDescriptionMap; } private String _getShortDescription(String languageId) { CPDefinitionLocalization cpDefinitionLocalization = CPDefinitionLocalServiceUtil.fetchCPDefinitionLocalization( getPrimaryKey(), languageId); if (cpDefinitionLocalization == null) { return ""; } return cpDefinitionLocalization.getShortDescription(); } @Override public String getDescription() { return getDescription(getDefaultLanguageId(), false); } @Override public String getDescription(String languageId) { return getDescription(languageId, true); } @Override public String getDescription(String languageId, boolean useDefault) { if (useDefault) { return LocalizationUtil.getLocalization( new Function() { @Override public String apply(String languageId) { return _getDescription(languageId); } }, languageId, getDefaultLanguageId()); } return _getDescription(languageId); } @Override public String getDescriptionMapAsXML() { return LocalizationUtil.getXml( getLanguageIdToDescriptionMap(), getDefaultLanguageId(), "Description"); } @Override public Map getLanguageIdToDescriptionMap() { Map languageIdToDescriptionMap = new HashMap(); List cpDefinitionLocalizations = CPDefinitionLocalServiceUtil.getCPDefinitionLocalizations( getPrimaryKey()); for (CPDefinitionLocalization cpDefinitionLocalization : cpDefinitionLocalizations) { languageIdToDescriptionMap.put( cpDefinitionLocalization.getLanguageId(), cpDefinitionLocalization.getDescription()); } return languageIdToDescriptionMap; } private String _getDescription(String languageId) { CPDefinitionLocalization cpDefinitionLocalization = CPDefinitionLocalServiceUtil.fetchCPDefinitionLocalization( getPrimaryKey(), languageId); if (cpDefinitionLocalization == null) { return ""; } return cpDefinitionLocalization.getDescription(); } @Override public String getMetaTitle() { return getMetaTitle(getDefaultLanguageId(), false); } @Override public String getMetaTitle(String languageId) { return getMetaTitle(languageId, true); } @Override public String getMetaTitle(String languageId, boolean useDefault) { if (useDefault) { return LocalizationUtil.getLocalization( new Function() { @Override public String apply(String languageId) { return _getMetaTitle(languageId); } }, languageId, getDefaultLanguageId()); } return _getMetaTitle(languageId); } @Override public String getMetaTitleMapAsXML() { return LocalizationUtil.getXml( getLanguageIdToMetaTitleMap(), getDefaultLanguageId(), "MetaTitle"); } @Override public Map getLanguageIdToMetaTitleMap() { Map languageIdToMetaTitleMap = new HashMap(); List cpDefinitionLocalizations = CPDefinitionLocalServiceUtil.getCPDefinitionLocalizations( getPrimaryKey()); for (CPDefinitionLocalization cpDefinitionLocalization : cpDefinitionLocalizations) { languageIdToMetaTitleMap.put( cpDefinitionLocalization.getLanguageId(), cpDefinitionLocalization.getMetaTitle()); } return languageIdToMetaTitleMap; } private String _getMetaTitle(String languageId) { CPDefinitionLocalization cpDefinitionLocalization = CPDefinitionLocalServiceUtil.fetchCPDefinitionLocalization( getPrimaryKey(), languageId); if (cpDefinitionLocalization == null) { return ""; } return cpDefinitionLocalization.getMetaTitle(); } @Override public String getMetaDescription() { return getMetaDescription(getDefaultLanguageId(), false); } @Override public String getMetaDescription(String languageId) { return getMetaDescription(languageId, true); } @Override public String getMetaDescription(String languageId, boolean useDefault) { if (useDefault) { return LocalizationUtil.getLocalization( new Function() { @Override public String apply(String languageId) { return _getMetaDescription(languageId); } }, languageId, getDefaultLanguageId()); } return _getMetaDescription(languageId); } @Override public String getMetaDescriptionMapAsXML() { return LocalizationUtil.getXml( getLanguageIdToMetaDescriptionMap(), getDefaultLanguageId(), "MetaDescription"); } @Override public Map getLanguageIdToMetaDescriptionMap() { Map languageIdToMetaDescriptionMap = new HashMap(); List cpDefinitionLocalizations = CPDefinitionLocalServiceUtil.getCPDefinitionLocalizations( getPrimaryKey()); for (CPDefinitionLocalization cpDefinitionLocalization : cpDefinitionLocalizations) { languageIdToMetaDescriptionMap.put( cpDefinitionLocalization.getLanguageId(), cpDefinitionLocalization.getMetaDescription()); } return languageIdToMetaDescriptionMap; } private String _getMetaDescription(String languageId) { CPDefinitionLocalization cpDefinitionLocalization = CPDefinitionLocalServiceUtil.fetchCPDefinitionLocalization( getPrimaryKey(), languageId); if (cpDefinitionLocalization == null) { return ""; } return cpDefinitionLocalization.getMetaDescription(); } @Override public String getMetaKeywords() { return getMetaKeywords(getDefaultLanguageId(), false); } @Override public String getMetaKeywords(String languageId) { return getMetaKeywords(languageId, true); } @Override public String getMetaKeywords(String languageId, boolean useDefault) { if (useDefault) { return LocalizationUtil.getLocalization( new Function() { @Override public String apply(String languageId) { return _getMetaKeywords(languageId); } }, languageId, getDefaultLanguageId()); } return _getMetaKeywords(languageId); } @Override public String getMetaKeywordsMapAsXML() { return LocalizationUtil.getXml( getLanguageIdToMetaKeywordsMap(), getDefaultLanguageId(), "MetaKeywords"); } @Override public Map getLanguageIdToMetaKeywordsMap() { Map languageIdToMetaKeywordsMap = new HashMap(); List cpDefinitionLocalizations = CPDefinitionLocalServiceUtil.getCPDefinitionLocalizations( getPrimaryKey()); for (CPDefinitionLocalization cpDefinitionLocalization : cpDefinitionLocalizations) { languageIdToMetaKeywordsMap.put( cpDefinitionLocalization.getLanguageId(), cpDefinitionLocalization.getMetaKeywords()); } return languageIdToMetaKeywordsMap; } private String _getMetaKeywords(String languageId) { CPDefinitionLocalization cpDefinitionLocalization = CPDefinitionLocalServiceUtil.fetchCPDefinitionLocalization( getPrimaryKey(), languageId); if (cpDefinitionLocalization == null) { return ""; } return cpDefinitionLocalization.getMetaKeywords(); } @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 getDefaultLanguageId() { if (_defaultLanguageId == null) { return ""; } else { return _defaultLanguageId; } } @Override public void setDefaultLanguageId(String defaultLanguageId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _defaultLanguageId = defaultLanguageId; } @JSON @Override public long getCPDefinitionId() { return _CPDefinitionId; } @Override public void setCPDefinitionId(long CPDefinitionId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _CPDefinitionId = CPDefinitionId; } @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; } @JSON @Override public long getCProductId() { return _CProductId; } @Override public void setCProductId(long CProductId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _CProductId = CProductId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalCProductId() { return GetterUtil.getLong( this.getColumnOriginalValue("CProductId")); } @JSON @Override public long getCPTaxCategoryId() { return _CPTaxCategoryId; } @Override public void setCPTaxCategoryId(long CPTaxCategoryId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _CPTaxCategoryId = CPTaxCategoryId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalCPTaxCategoryId() { return GetterUtil.getLong( this.getColumnOriginalValue("CPTaxCategoryId")); } @JSON @Override public String getProductTypeName() { if (_productTypeName == null) { return ""; } else { return _productTypeName; } } @Override public void setProductTypeName(String productTypeName) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _productTypeName = productTypeName; } @JSON @Override public boolean getAvailableIndividually() { return _availableIndividually; } @JSON @Override public boolean isAvailableIndividually() { return _availableIndividually; } @Override public void setAvailableIndividually(boolean availableIndividually) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _availableIndividually = availableIndividually; } @JSON @Override public boolean getIgnoreSKUCombinations() { return _ignoreSKUCombinations; } @JSON @Override public boolean isIgnoreSKUCombinations() { return _ignoreSKUCombinations; } @Override public void setIgnoreSKUCombinations(boolean ignoreSKUCombinations) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _ignoreSKUCombinations = ignoreSKUCombinations; } @JSON @Override public boolean getShippable() { return _shippable; } @JSON @Override public boolean isShippable() { return _shippable; } @Override public void setShippable(boolean shippable) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _shippable = shippable; } @JSON @Override public boolean getFreeShipping() { return _freeShipping; } @JSON @Override public boolean isFreeShipping() { return _freeShipping; } @Override public void setFreeShipping(boolean freeShipping) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _freeShipping = freeShipping; } @JSON @Override public boolean getShipSeparately() { return _shipSeparately; } @JSON @Override public boolean isShipSeparately() { return _shipSeparately; } @Override public void setShipSeparately(boolean shipSeparately) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _shipSeparately = shipSeparately; } @JSON @Override public double getShippingExtraPrice() { return _shippingExtraPrice; } @Override public void setShippingExtraPrice(double shippingExtraPrice) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _shippingExtraPrice = shippingExtraPrice; } @JSON @Override public double getWidth() { return _width; } @Override public void setWidth(double width) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _width = width; } @JSON @Override public double getHeight() { return _height; } @Override public void setHeight(double height) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _height = height; } @JSON @Override public double getDepth() { return _depth; } @Override public void setDepth(double depth) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _depth = depth; } @JSON @Override public double getWeight() { return _weight; } @Override public void setWeight(double weight) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _weight = weight; } @JSON @Override public boolean getTaxExempt() { return _taxExempt; } @JSON @Override public boolean isTaxExempt() { return _taxExempt; } @Override public void setTaxExempt(boolean taxExempt) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _taxExempt = taxExempt; } @JSON @Override public boolean getTelcoOrElectronics() { return _telcoOrElectronics; } @JSON @Override public boolean isTelcoOrElectronics() { return _telcoOrElectronics; } @Override public void setTelcoOrElectronics(boolean telcoOrElectronics) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _telcoOrElectronics = telcoOrElectronics; } @JSON @Override public String getDDMStructureKey() { if (_DDMStructureKey == null) { return ""; } else { return _DDMStructureKey; } } @Override public void setDDMStructureKey(String DDMStructureKey) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _DDMStructureKey = DDMStructureKey; } @JSON @Override public boolean getPublished() { return _published; } @JSON @Override public boolean isPublished() { return _published; } @Override public void setPublished(boolean published) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _published = published; } @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 Date getLastPublishDate() { return _lastPublishDate; } @Override public void setLastPublishDate(Date lastPublishDate) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _lastPublishDate = lastPublishDate; } @JSON @Override public boolean getSubscriptionEnabled() { return _subscriptionEnabled; } @JSON @Override public boolean isSubscriptionEnabled() { return _subscriptionEnabled; } @Override public void setSubscriptionEnabled(boolean subscriptionEnabled) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _subscriptionEnabled = subscriptionEnabled; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public boolean getOriginalSubscriptionEnabled() { return GetterUtil.getBoolean( this.getColumnOriginalValue("subscriptionEnabled")); } @JSON @Override public int getSubscriptionLength() { return _subscriptionLength; } @Override public void setSubscriptionLength(int subscriptionLength) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _subscriptionLength = subscriptionLength; } @JSON @Override public String getSubscriptionType() { if (_subscriptionType == null) { return ""; } else { return _subscriptionType; } } @Override public void setSubscriptionType(String subscriptionType) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _subscriptionType = subscriptionType; } @JSON @Override public String getSubscriptionTypeSettings() { if (_subscriptionTypeSettings == null) { return ""; } else { return _subscriptionTypeSettings; } } @Override public void setSubscriptionTypeSettings(String subscriptionTypeSettings) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _subscriptionTypeSettings = subscriptionTypeSettings; } @JSON @Override public long getMaxSubscriptionCycles() { return _maxSubscriptionCycles; } @Override public void setMaxSubscriptionCycles(long maxSubscriptionCycles) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _maxSubscriptionCycles = maxSubscriptionCycles; } @JSON @Override public boolean getDeliverySubscriptionEnabled() { return _deliverySubscriptionEnabled; } @JSON @Override public boolean isDeliverySubscriptionEnabled() { return _deliverySubscriptionEnabled; } @Override public void setDeliverySubscriptionEnabled( boolean deliverySubscriptionEnabled) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _deliverySubscriptionEnabled = deliverySubscriptionEnabled; } @JSON @Override public int getDeliverySubscriptionLength() { return _deliverySubscriptionLength; } @Override public void setDeliverySubscriptionLength(int deliverySubscriptionLength) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _deliverySubscriptionLength = deliverySubscriptionLength; } @JSON @Override public String getDeliverySubscriptionType() { if (_deliverySubscriptionType == null) { return ""; } else { return _deliverySubscriptionType; } } @Override public void setDeliverySubscriptionType(String deliverySubscriptionType) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _deliverySubscriptionType = deliverySubscriptionType; } @JSON @Override public String getDeliverySubscriptionTypeSettings() { if (_deliverySubscriptionTypeSettings == null) { return ""; } else { return _deliverySubscriptionTypeSettings; } } @Override public void setDeliverySubscriptionTypeSettings( String deliverySubscriptionTypeSettings) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _deliverySubscriptionTypeSettings = deliverySubscriptionTypeSettings; } @JSON @Override public long getDeliveryMaxSubscriptionCycles() { return _deliveryMaxSubscriptionCycles; } @Override public void setDeliveryMaxSubscriptionCycles( long deliveryMaxSubscriptionCycles) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _deliveryMaxSubscriptionCycles = deliveryMaxSubscriptionCycles; } @JSON @Override public boolean getAccountGroupFilterEnabled() { return _accountGroupFilterEnabled; } @JSON @Override public boolean isAccountGroupFilterEnabled() { return _accountGroupFilterEnabled; } @Override public void setAccountGroupFilterEnabled( boolean accountGroupFilterEnabled) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _accountGroupFilterEnabled = accountGroupFilterEnabled; } @JSON @Override public boolean getChannelFilterEnabled() { return _channelFilterEnabled; } @JSON @Override public boolean isChannelFilterEnabled() { return _channelFilterEnabled; } @Override public void setChannelFilterEnabled(boolean channelFilterEnabled) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _channelFilterEnabled = channelFilterEnabled; } @JSON @Override public int getVersion() { return _version; } @Override public void setVersion(int version) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _version = version; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public int getOriginalVersion() { return GetterUtil.getInteger( this.getColumnOriginalValue("version")); } @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(CPDefinition.class.getName())); } @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(), CPDefinition.class.getName(), getPrimaryKey()); } @Override public void setExpandoBridgeAttributes(ServiceContext serviceContext) { ExpandoBridge expandoBridge = getExpandoBridge(); expandoBridge.setAttributes(serviceContext); } @Override public CPDefinition toEscapedModel() { if (_escapedModel == null) { Function escapedModelProxyProviderFunction = EscapedModelProxyProviderFunctionHolder. _escapedModelProxyProviderFunction; _escapedModel = escapedModelProxyProviderFunction.apply( new AutoEscapeBeanHandler(this)); } return _escapedModel; } @Override public Object clone() { CPDefinitionImpl cpDefinitionImpl = new CPDefinitionImpl(); cpDefinitionImpl.setMvccVersion(getMvccVersion()); cpDefinitionImpl.setCtCollectionId(getCtCollectionId()); cpDefinitionImpl.setUuid(getUuid()); cpDefinitionImpl.setDefaultLanguageId(getDefaultLanguageId()); cpDefinitionImpl.setCPDefinitionId(getCPDefinitionId()); cpDefinitionImpl.setGroupId(getGroupId()); cpDefinitionImpl.setCompanyId(getCompanyId()); cpDefinitionImpl.setUserId(getUserId()); cpDefinitionImpl.setUserName(getUserName()); cpDefinitionImpl.setCreateDate(getCreateDate()); cpDefinitionImpl.setModifiedDate(getModifiedDate()); cpDefinitionImpl.setCProductId(getCProductId()); cpDefinitionImpl.setCPTaxCategoryId(getCPTaxCategoryId()); cpDefinitionImpl.setProductTypeName(getProductTypeName()); cpDefinitionImpl.setAvailableIndividually(isAvailableIndividually()); cpDefinitionImpl.setIgnoreSKUCombinations(isIgnoreSKUCombinations()); cpDefinitionImpl.setShippable(isShippable()); cpDefinitionImpl.setFreeShipping(isFreeShipping()); cpDefinitionImpl.setShipSeparately(isShipSeparately()); cpDefinitionImpl.setShippingExtraPrice(getShippingExtraPrice()); cpDefinitionImpl.setWidth(getWidth()); cpDefinitionImpl.setHeight(getHeight()); cpDefinitionImpl.setDepth(getDepth()); cpDefinitionImpl.setWeight(getWeight()); cpDefinitionImpl.setTaxExempt(isTaxExempt()); cpDefinitionImpl.setTelcoOrElectronics(isTelcoOrElectronics()); cpDefinitionImpl.setDDMStructureKey(getDDMStructureKey()); cpDefinitionImpl.setPublished(isPublished()); cpDefinitionImpl.setDisplayDate(getDisplayDate()); cpDefinitionImpl.setExpirationDate(getExpirationDate()); cpDefinitionImpl.setLastPublishDate(getLastPublishDate()); cpDefinitionImpl.setSubscriptionEnabled(isSubscriptionEnabled()); cpDefinitionImpl.setSubscriptionLength(getSubscriptionLength()); cpDefinitionImpl.setSubscriptionType(getSubscriptionType()); cpDefinitionImpl.setSubscriptionTypeSettings( getSubscriptionTypeSettings()); cpDefinitionImpl.setMaxSubscriptionCycles(getMaxSubscriptionCycles()); cpDefinitionImpl.setDeliverySubscriptionEnabled( isDeliverySubscriptionEnabled()); cpDefinitionImpl.setDeliverySubscriptionLength( getDeliverySubscriptionLength()); cpDefinitionImpl.setDeliverySubscriptionType( getDeliverySubscriptionType()); cpDefinitionImpl.setDeliverySubscriptionTypeSettings( getDeliverySubscriptionTypeSettings()); cpDefinitionImpl.setDeliveryMaxSubscriptionCycles( getDeliveryMaxSubscriptionCycles()); cpDefinitionImpl.setAccountGroupFilterEnabled( isAccountGroupFilterEnabled()); cpDefinitionImpl.setChannelFilterEnabled(isChannelFilterEnabled()); cpDefinitionImpl.setVersion(getVersion()); cpDefinitionImpl.setStatus(getStatus()); cpDefinitionImpl.setStatusByUserId(getStatusByUserId()); cpDefinitionImpl.setStatusByUserName(getStatusByUserName()); cpDefinitionImpl.setStatusDate(getStatusDate()); cpDefinitionImpl.resetOriginalValues(); return cpDefinitionImpl; } @Override public CPDefinition cloneWithOriginalValues() { CPDefinitionImpl cpDefinitionImpl = new CPDefinitionImpl(); cpDefinitionImpl.setMvccVersion( this.getColumnOriginalValue("mvccVersion")); cpDefinitionImpl.setCtCollectionId( this.getColumnOriginalValue("ctCollectionId")); cpDefinitionImpl.setUuid(this.getColumnOriginalValue("uuid_")); cpDefinitionImpl.setDefaultLanguageId( this.getColumnOriginalValue("defaultLanguageId")); cpDefinitionImpl.setCPDefinitionId( this.getColumnOriginalValue("CPDefinitionId")); cpDefinitionImpl.setGroupId( this.getColumnOriginalValue("groupId")); cpDefinitionImpl.setCompanyId( this.getColumnOriginalValue("companyId")); cpDefinitionImpl.setUserId(this.getColumnOriginalValue("userId")); cpDefinitionImpl.setUserName( this.getColumnOriginalValue("userName")); cpDefinitionImpl.setCreateDate( this.getColumnOriginalValue("createDate")); cpDefinitionImpl.setModifiedDate( this.getColumnOriginalValue("modifiedDate")); cpDefinitionImpl.setCProductId( this.getColumnOriginalValue("CProductId")); cpDefinitionImpl.setCPTaxCategoryId( this.getColumnOriginalValue("CPTaxCategoryId")); cpDefinitionImpl.setProductTypeName( this.getColumnOriginalValue("productTypeName")); cpDefinitionImpl.setAvailableIndividually( this.getColumnOriginalValue("availableIndividually")); cpDefinitionImpl.setIgnoreSKUCombinations( this.getColumnOriginalValue("ignoreSKUCombinations")); cpDefinitionImpl.setShippable( this.getColumnOriginalValue("shippable")); cpDefinitionImpl.setFreeShipping( this.getColumnOriginalValue("freeShipping")); cpDefinitionImpl.setShipSeparately( this.getColumnOriginalValue("shipSeparately")); cpDefinitionImpl.setShippingExtraPrice( this.getColumnOriginalValue("shippingExtraPrice")); cpDefinitionImpl.setWidth(this.getColumnOriginalValue("width")); cpDefinitionImpl.setHeight( this.getColumnOriginalValue("height")); cpDefinitionImpl.setDepth(this.getColumnOriginalValue("depth")); cpDefinitionImpl.setWeight( this.getColumnOriginalValue("weight")); cpDefinitionImpl.setTaxExempt( this.getColumnOriginalValue("taxExempt")); cpDefinitionImpl.setTelcoOrElectronics( this.getColumnOriginalValue("telcoOrElectronics")); cpDefinitionImpl.setDDMStructureKey( this.getColumnOriginalValue("DDMStructureKey")); cpDefinitionImpl.setPublished( this.getColumnOriginalValue("published")); cpDefinitionImpl.setDisplayDate( this.getColumnOriginalValue("displayDate")); cpDefinitionImpl.setExpirationDate( this.getColumnOriginalValue("expirationDate")); cpDefinitionImpl.setLastPublishDate( this.getColumnOriginalValue("lastPublishDate")); cpDefinitionImpl.setSubscriptionEnabled( this.getColumnOriginalValue("subscriptionEnabled")); cpDefinitionImpl.setSubscriptionLength( this.getColumnOriginalValue("subscriptionLength")); cpDefinitionImpl.setSubscriptionType( this.getColumnOriginalValue("subscriptionType")); cpDefinitionImpl.setSubscriptionTypeSettings( this.getColumnOriginalValue("subscriptionTypeSettings")); cpDefinitionImpl.setMaxSubscriptionCycles( this.getColumnOriginalValue("maxSubscriptionCycles")); cpDefinitionImpl.setDeliverySubscriptionEnabled( this.getColumnOriginalValue( "deliverySubscriptionEnabled")); cpDefinitionImpl.setDeliverySubscriptionLength( this.getColumnOriginalValue("deliverySubscriptionLength")); cpDefinitionImpl.setDeliverySubscriptionType( this.getColumnOriginalValue("deliverySubscriptionType")); cpDefinitionImpl.setDeliverySubscriptionTypeSettings( this.getColumnOriginalValue("deliverySubTypeSettings")); cpDefinitionImpl.setDeliveryMaxSubscriptionCycles( this.getColumnOriginalValue("deliveryMaxSubscriptionCycles")); cpDefinitionImpl.setAccountGroupFilterEnabled( this.getColumnOriginalValue("accountGroupFilterEnabled")); cpDefinitionImpl.setChannelFilterEnabled( this.getColumnOriginalValue("channelFilterEnabled")); cpDefinitionImpl.setVersion( this.getColumnOriginalValue("version")); cpDefinitionImpl.setStatus( this.getColumnOriginalValue("status")); cpDefinitionImpl.setStatusByUserId( this.getColumnOriginalValue("statusByUserId")); cpDefinitionImpl.setStatusByUserName( this.getColumnOriginalValue("statusByUserName")); cpDefinitionImpl.setStatusDate( this.getColumnOriginalValue("statusDate")); return cpDefinitionImpl; } @Override public int compareTo(CPDefinition cpDefinition) { int value = 0; value = DateUtil.compareTo( getDisplayDate(), cpDefinition.getDisplayDate()); value = value * -1; if (value != 0) { return value; } value = DateUtil.compareTo( getCreateDate(), cpDefinition.getCreateDate()); value = value * -1; if (value != 0) { return value; } return 0; } @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof CPDefinition)) { return false; } CPDefinition cpDefinition = (CPDefinition)object; long primaryKey = cpDefinition.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() { CPDefinitionCacheModel cpDefinitionCacheModel = new CPDefinitionCacheModel(); cpDefinitionCacheModel.mvccVersion = getMvccVersion(); cpDefinitionCacheModel.ctCollectionId = getCtCollectionId(); cpDefinitionCacheModel.uuid = getUuid(); String uuid = cpDefinitionCacheModel.uuid; if ((uuid != null) && (uuid.length() == 0)) { cpDefinitionCacheModel.uuid = null; } cpDefinitionCacheModel.defaultLanguageId = getDefaultLanguageId(); String defaultLanguageId = cpDefinitionCacheModel.defaultLanguageId; if ((defaultLanguageId != null) && (defaultLanguageId.length() == 0)) { cpDefinitionCacheModel.defaultLanguageId = null; } cpDefinitionCacheModel.CPDefinitionId = getCPDefinitionId(); cpDefinitionCacheModel.groupId = getGroupId(); cpDefinitionCacheModel.companyId = getCompanyId(); cpDefinitionCacheModel.userId = getUserId(); cpDefinitionCacheModel.userName = getUserName(); String userName = cpDefinitionCacheModel.userName; if ((userName != null) && (userName.length() == 0)) { cpDefinitionCacheModel.userName = null; } Date createDate = getCreateDate(); if (createDate != null) { cpDefinitionCacheModel.createDate = createDate.getTime(); } else { cpDefinitionCacheModel.createDate = Long.MIN_VALUE; } Date modifiedDate = getModifiedDate(); if (modifiedDate != null) { cpDefinitionCacheModel.modifiedDate = modifiedDate.getTime(); } else { cpDefinitionCacheModel.modifiedDate = Long.MIN_VALUE; } cpDefinitionCacheModel.CProductId = getCProductId(); cpDefinitionCacheModel.CPTaxCategoryId = getCPTaxCategoryId(); cpDefinitionCacheModel.productTypeName = getProductTypeName(); String productTypeName = cpDefinitionCacheModel.productTypeName; if ((productTypeName != null) && (productTypeName.length() == 0)) { cpDefinitionCacheModel.productTypeName = null; } cpDefinitionCacheModel.availableIndividually = isAvailableIndividually(); cpDefinitionCacheModel.ignoreSKUCombinations = isIgnoreSKUCombinations(); cpDefinitionCacheModel.shippable = isShippable(); cpDefinitionCacheModel.freeShipping = isFreeShipping(); cpDefinitionCacheModel.shipSeparately = isShipSeparately(); cpDefinitionCacheModel.shippingExtraPrice = getShippingExtraPrice(); cpDefinitionCacheModel.width = getWidth(); cpDefinitionCacheModel.height = getHeight(); cpDefinitionCacheModel.depth = getDepth(); cpDefinitionCacheModel.weight = getWeight(); cpDefinitionCacheModel.taxExempt = isTaxExempt(); cpDefinitionCacheModel.telcoOrElectronics = isTelcoOrElectronics(); cpDefinitionCacheModel.DDMStructureKey = getDDMStructureKey(); String DDMStructureKey = cpDefinitionCacheModel.DDMStructureKey; if ((DDMStructureKey != null) && (DDMStructureKey.length() == 0)) { cpDefinitionCacheModel.DDMStructureKey = null; } cpDefinitionCacheModel.published = isPublished(); Date displayDate = getDisplayDate(); if (displayDate != null) { cpDefinitionCacheModel.displayDate = displayDate.getTime(); } else { cpDefinitionCacheModel.displayDate = Long.MIN_VALUE; } Date expirationDate = getExpirationDate(); if (expirationDate != null) { cpDefinitionCacheModel.expirationDate = expirationDate.getTime(); } else { cpDefinitionCacheModel.expirationDate = Long.MIN_VALUE; } Date lastPublishDate = getLastPublishDate(); if (lastPublishDate != null) { cpDefinitionCacheModel.lastPublishDate = lastPublishDate.getTime(); } else { cpDefinitionCacheModel.lastPublishDate = Long.MIN_VALUE; } cpDefinitionCacheModel.subscriptionEnabled = isSubscriptionEnabled(); cpDefinitionCacheModel.subscriptionLength = getSubscriptionLength(); cpDefinitionCacheModel.subscriptionType = getSubscriptionType(); String subscriptionType = cpDefinitionCacheModel.subscriptionType; if ((subscriptionType != null) && (subscriptionType.length() == 0)) { cpDefinitionCacheModel.subscriptionType = null; } cpDefinitionCacheModel.subscriptionTypeSettings = getSubscriptionTypeSettings(); String subscriptionTypeSettings = cpDefinitionCacheModel.subscriptionTypeSettings; if ((subscriptionTypeSettings != null) && (subscriptionTypeSettings.length() == 0)) { cpDefinitionCacheModel.subscriptionTypeSettings = null; } cpDefinitionCacheModel.maxSubscriptionCycles = getMaxSubscriptionCycles(); cpDefinitionCacheModel.deliverySubscriptionEnabled = isDeliverySubscriptionEnabled(); cpDefinitionCacheModel.deliverySubscriptionLength = getDeliverySubscriptionLength(); cpDefinitionCacheModel.deliverySubscriptionType = getDeliverySubscriptionType(); String deliverySubscriptionType = cpDefinitionCacheModel.deliverySubscriptionType; if ((deliverySubscriptionType != null) && (deliverySubscriptionType.length() == 0)) { cpDefinitionCacheModel.deliverySubscriptionType = null; } cpDefinitionCacheModel.deliverySubscriptionTypeSettings = getDeliverySubscriptionTypeSettings(); String deliverySubscriptionTypeSettings = cpDefinitionCacheModel.deliverySubscriptionTypeSettings; if ((deliverySubscriptionTypeSettings != null) && (deliverySubscriptionTypeSettings.length() == 0)) { cpDefinitionCacheModel.deliverySubscriptionTypeSettings = null; } cpDefinitionCacheModel.deliveryMaxSubscriptionCycles = getDeliveryMaxSubscriptionCycles(); cpDefinitionCacheModel.accountGroupFilterEnabled = isAccountGroupFilterEnabled(); cpDefinitionCacheModel.channelFilterEnabled = isChannelFilterEnabled(); cpDefinitionCacheModel.version = getVersion(); cpDefinitionCacheModel.status = getStatus(); cpDefinitionCacheModel.statusByUserId = getStatusByUserId(); cpDefinitionCacheModel.statusByUserName = getStatusByUserName(); String statusByUserName = cpDefinitionCacheModel.statusByUserName; if ((statusByUserName != null) && (statusByUserName.length() == 0)) { cpDefinitionCacheModel.statusByUserName = null; } Date statusDate = getStatusDate(); if (statusDate != null) { cpDefinitionCacheModel.statusDate = statusDate.getTime(); } else { cpDefinitionCacheModel.statusDate = Long.MIN_VALUE; } return cpDefinitionCacheModel; } @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((CPDefinition)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( CPDefinition.class, ModelWrapper.class); } private long _mvccVersion; private long _ctCollectionId; private String _uuid; private String _defaultLanguageId; private long _CPDefinitionId; private long _groupId; private long _companyId; private long _userId; private String _userName; private Date _createDate; private Date _modifiedDate; private boolean _setModifiedDate; private long _CProductId; private long _CPTaxCategoryId; private String _productTypeName; private boolean _availableIndividually; private boolean _ignoreSKUCombinations; private boolean _shippable; private boolean _freeShipping; private boolean _shipSeparately; private double _shippingExtraPrice; private double _width; private double _height; private double _depth; private double _weight; private boolean _taxExempt; private boolean _telcoOrElectronics; private String _DDMStructureKey; private boolean _published; private Date _displayDate; private Date _expirationDate; private Date _lastPublishDate; private boolean _subscriptionEnabled; private int _subscriptionLength; private String _subscriptionType; private String _subscriptionTypeSettings; private long _maxSubscriptionCycles; private boolean _deliverySubscriptionEnabled; private int _deliverySubscriptionLength; private String _deliverySubscriptionType; private String _deliverySubscriptionTypeSettings; private long _deliveryMaxSubscriptionCycles; private boolean _accountGroupFilterEnabled; private boolean _channelFilterEnabled; private int _version; 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((CPDefinition)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("defaultLanguageId", _defaultLanguageId); _columnOriginalValues.put("CPDefinitionId", _CPDefinitionId); _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("CProductId", _CProductId); _columnOriginalValues.put("CPTaxCategoryId", _CPTaxCategoryId); _columnOriginalValues.put("productTypeName", _productTypeName); _columnOriginalValues.put( "availableIndividually", _availableIndividually); _columnOriginalValues.put( "ignoreSKUCombinations", _ignoreSKUCombinations); _columnOriginalValues.put("shippable", _shippable); _columnOriginalValues.put("freeShipping", _freeShipping); _columnOriginalValues.put("shipSeparately", _shipSeparately); _columnOriginalValues.put("shippingExtraPrice", _shippingExtraPrice); _columnOriginalValues.put("width", _width); _columnOriginalValues.put("height", _height); _columnOriginalValues.put("depth", _depth); _columnOriginalValues.put("weight", _weight); _columnOriginalValues.put("taxExempt", _taxExempt); _columnOriginalValues.put("telcoOrElectronics", _telcoOrElectronics); _columnOriginalValues.put("DDMStructureKey", _DDMStructureKey); _columnOriginalValues.put("published", _published); _columnOriginalValues.put("displayDate", _displayDate); _columnOriginalValues.put("expirationDate", _expirationDate); _columnOriginalValues.put("lastPublishDate", _lastPublishDate); _columnOriginalValues.put("subscriptionEnabled", _subscriptionEnabled); _columnOriginalValues.put("subscriptionLength", _subscriptionLength); _columnOriginalValues.put("subscriptionType", _subscriptionType); _columnOriginalValues.put( "subscriptionTypeSettings", _subscriptionTypeSettings); _columnOriginalValues.put( "maxSubscriptionCycles", _maxSubscriptionCycles); _columnOriginalValues.put( "deliverySubscriptionEnabled", _deliverySubscriptionEnabled); _columnOriginalValues.put( "deliverySubscriptionLength", _deliverySubscriptionLength); _columnOriginalValues.put( "deliverySubscriptionType", _deliverySubscriptionType); _columnOriginalValues.put( "deliverySubTypeSettings", _deliverySubscriptionTypeSettings); _columnOriginalValues.put( "deliveryMaxSubscriptionCycles", _deliveryMaxSubscriptionCycles); _columnOriginalValues.put( "accountGroupFilterEnabled", _accountGroupFilterEnabled); _columnOriginalValues.put( "channelFilterEnabled", _channelFilterEnabled); _columnOriginalValues.put("version", _version); _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( "deliverySubTypeSettings", "deliverySubscriptionTypeSettings"); _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("defaultLanguageId", 8L); columnBitmasks.put("CPDefinitionId", 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("CProductId", 2048L); columnBitmasks.put("CPTaxCategoryId", 4096L); columnBitmasks.put("productTypeName", 8192L); columnBitmasks.put("availableIndividually", 16384L); columnBitmasks.put("ignoreSKUCombinations", 32768L); columnBitmasks.put("shippable", 65536L); columnBitmasks.put("freeShipping", 131072L); columnBitmasks.put("shipSeparately", 262144L); columnBitmasks.put("shippingExtraPrice", 524288L); columnBitmasks.put("width", 1048576L); columnBitmasks.put("height", 2097152L); columnBitmasks.put("depth", 4194304L); columnBitmasks.put("weight", 8388608L); columnBitmasks.put("taxExempt", 16777216L); columnBitmasks.put("telcoOrElectronics", 33554432L); columnBitmasks.put("DDMStructureKey", 67108864L); columnBitmasks.put("published", 134217728L); columnBitmasks.put("displayDate", 268435456L); columnBitmasks.put("expirationDate", 536870912L); columnBitmasks.put("lastPublishDate", 1073741824L); columnBitmasks.put("subscriptionEnabled", 2147483648L); columnBitmasks.put("subscriptionLength", 4294967296L); columnBitmasks.put("subscriptionType", 8589934592L); columnBitmasks.put("subscriptionTypeSettings", 17179869184L); columnBitmasks.put("maxSubscriptionCycles", 34359738368L); columnBitmasks.put("deliverySubscriptionEnabled", 68719476736L); columnBitmasks.put("deliverySubscriptionLength", 137438953472L); columnBitmasks.put("deliverySubscriptionType", 274877906944L); columnBitmasks.put("deliverySubTypeSettings", 549755813888L); columnBitmasks.put("deliveryMaxSubscriptionCycles", 1099511627776L); columnBitmasks.put("accountGroupFilterEnabled", 2199023255552L); columnBitmasks.put("channelFilterEnabled", 4398046511104L); columnBitmasks.put("version", 8796093022208L); columnBitmasks.put("status", 17592186044416L); columnBitmasks.put("statusByUserId", 35184372088832L); columnBitmasks.put("statusByUserName", 70368744177664L); columnBitmasks.put("statusDate", 140737488355328L); _columnBitmasks = Collections.unmodifiableMap(columnBitmasks); } private long _columnBitmask; private CPDefinition _escapedModel; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy