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

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

There is a newer version: 6.0.151
Show newest version
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

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.model.CPDefinitionSoap;
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.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.StringBundler;
import com.liferay.portal.kernel.workflow.WorkflowConstants;

import java.io.Serializable;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationHandler;

import java.sql.Types;

import java.util.ArrayList;
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.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 = { {"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("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 (uuid_ VARCHAR(75) null,defaultLanguageId VARCHAR(75) null,CPDefinitionId LONG not null primary key,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)"; 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 DATA_SOURCE = "liferayDataSource"; public static final String SESSION_FACTORY = "liferaySessionFactory"; public static final String TX_MANAGER = "liferayTransactionManager"; public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean( com.liferay.commerce.product.service.util.ServiceProps.get( "value.object.entity.cache.enabled.com.liferay.commerce.product.model.CPDefinition"), true); public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean( com.liferay.commerce.product.service.util.ServiceProps.get( "value.object.finder.cache.enabled.com.liferay.commerce.product.model.CPDefinition"), true); public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean( com.liferay.commerce.product.service.util.ServiceProps.get( "value.object.column.bitmask.enabled.com.liferay.commerce.product.model.CPDefinition"), true); public static final long CPTAXCATEGORYID_COLUMN_BITMASK = 1L; public static final long CPRODUCTID_COLUMN_BITMASK = 2L; public static final long COMPANYID_COLUMN_BITMASK = 4L; public static final long DISPLAYDATE_COLUMN_BITMASK = 8L; public static final long GROUPID_COLUMN_BITMASK = 16L; public static final long STATUS_COLUMN_BITMASK = 32L; public static final long SUBSCRIPTIONENABLED_COLUMN_BITMASK = 64L; public static final long UUID_COLUMN_BITMASK = 128L; public static final long VERSION_COLUMN_BITMASK = 256L; public static final long CREATEDATE_COLUMN_BITMASK = 512L; /** * Converts the soap model instance into a normal model instance. * * @param soapModel the soap model instance to convert * @return the normal model instance */ public static CPDefinition toModel(CPDefinitionSoap soapModel) { if (soapModel == null) { return null; } CPDefinition model = new CPDefinitionImpl(); model.setUuid(soapModel.getUuid()); model.setDefaultLanguageId(soapModel.getDefaultLanguageId()); model.setCPDefinitionId(soapModel.getCPDefinitionId()); model.setGroupId(soapModel.getGroupId()); model.setCompanyId(soapModel.getCompanyId()); model.setUserId(soapModel.getUserId()); model.setUserName(soapModel.getUserName()); model.setCreateDate(soapModel.getCreateDate()); model.setModifiedDate(soapModel.getModifiedDate()); model.setCProductId(soapModel.getCProductId()); model.setCPTaxCategoryId(soapModel.getCPTaxCategoryId()); model.setProductTypeName(soapModel.getProductTypeName()); model.setAvailableIndividually(soapModel.isAvailableIndividually()); model.setIgnoreSKUCombinations(soapModel.isIgnoreSKUCombinations()); model.setShippable(soapModel.isShippable()); model.setFreeShipping(soapModel.isFreeShipping()); model.setShipSeparately(soapModel.isShipSeparately()); model.setShippingExtraPrice(soapModel.getShippingExtraPrice()); model.setWidth(soapModel.getWidth()); model.setHeight(soapModel.getHeight()); model.setDepth(soapModel.getDepth()); model.setWeight(soapModel.getWeight()); model.setTaxExempt(soapModel.isTaxExempt()); model.setTelcoOrElectronics(soapModel.isTelcoOrElectronics()); model.setDDMStructureKey(soapModel.getDDMStructureKey()); model.setPublished(soapModel.isPublished()); model.setDisplayDate(soapModel.getDisplayDate()); model.setExpirationDate(soapModel.getExpirationDate()); model.setLastPublishDate(soapModel.getLastPublishDate()); model.setSubscriptionEnabled(soapModel.isSubscriptionEnabled()); model.setSubscriptionLength(soapModel.getSubscriptionLength()); model.setSubscriptionType(soapModel.getSubscriptionType()); model.setSubscriptionTypeSettings( soapModel.getSubscriptionTypeSettings()); model.setMaxSubscriptionCycles(soapModel.getMaxSubscriptionCycles()); model.setDeliverySubscriptionEnabled( soapModel.isDeliverySubscriptionEnabled()); model.setDeliverySubscriptionLength( soapModel.getDeliverySubscriptionLength()); model.setDeliverySubscriptionType( soapModel.getDeliverySubscriptionType()); model.setDeliverySubscriptionTypeSettings( soapModel.getDeliverySubscriptionTypeSettings()); model.setDeliveryMaxSubscriptionCycles( soapModel.getDeliveryMaxSubscriptionCycles()); model.setAccountGroupFilterEnabled( soapModel.isAccountGroupFilterEnabled()); model.setChannelFilterEnabled(soapModel.isChannelFilterEnabled()); model.setVersion(soapModel.getVersion()); model.setStatus(soapModel.getStatus()); model.setStatusByUserId(soapModel.getStatusByUserId()); model.setStatusByUserName(soapModel.getStatusByUserName()); model.setStatusDate(soapModel.getStatusDate()); return model; } /** * Converts the soap model instances into normal model instances. * * @param soapModels the soap model instances to convert * @return the normal model instances */ public static List toModels(CPDefinitionSoap[] soapModels) { if (soapModels == null) { return null; } List models = new ArrayList( soapModels.length); for (CPDefinitionSoap soapModel : soapModels) { models.add(toModel(soapModel)); } return models; } public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong( com.liferay.commerce.product.service.util.ServiceProps.get( "lock.expiration.time.com.liferay.commerce.product.model.CPDefinition")); 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)); } attributes.put("entityCacheEnabled", isEntityCacheEnabled()); attributes.put("finderCacheEnabled", isFinderCacheEnabled()); 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 _attributeGetterFunctions; } public Map> getAttributeSetterBiConsumers() { return _attributeSetterBiConsumers; } private static Function _getProxyProviderFunction() { Class proxyClass = ProxyUtil.getProxyClass( CPDefinition.class.getClassLoader(), CPDefinition.class, ModelWrapper.class); try { Constructor constructor = (Constructor)proxyClass.getConstructor( InvocationHandler.class); return invocationHandler -> { try { return constructor.newInstance(invocationHandler); } catch (ReflectiveOperationException reflectiveOperationException) { throw new InternalError(reflectiveOperationException); } }; } catch (NoSuchMethodException noSuchMethodException) { throw new InternalError(noSuchMethodException); } } private static final Map> _attributeGetterFunctions; private static final Map> _attributeSetterBiConsumers; static { Map> attributeGetterFunctions = new LinkedHashMap>(); Map> attributeSetterBiConsumers = new LinkedHashMap>(); attributeGetterFunctions.put( "uuid", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getUuid(); } }); attributeSetterBiConsumers.put( "uuid", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object uuidObject) { cpDefinition.setUuid((String)uuidObject); } }); attributeGetterFunctions.put( "defaultLanguageId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDefaultLanguageId(); } }); attributeSetterBiConsumers.put( "defaultLanguageId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object defaultLanguageIdObject) { cpDefinition.setDefaultLanguageId( (String)defaultLanguageIdObject); } }); attributeGetterFunctions.put( "CPDefinitionId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getCPDefinitionId(); } }); attributeSetterBiConsumers.put( "CPDefinitionId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object CPDefinitionIdObject) { cpDefinition.setCPDefinitionId((Long)CPDefinitionIdObject); } }); attributeGetterFunctions.put( "groupId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getGroupId(); } }); attributeSetterBiConsumers.put( "groupId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object groupIdObject) { cpDefinition.setGroupId((Long)groupIdObject); } }); attributeGetterFunctions.put( "companyId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getCompanyId(); } }); attributeSetterBiConsumers.put( "companyId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object companyIdObject) { cpDefinition.setCompanyId((Long)companyIdObject); } }); attributeGetterFunctions.put( "userId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getUserId(); } }); attributeSetterBiConsumers.put( "userId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object userIdObject) { cpDefinition.setUserId((Long)userIdObject); } }); attributeGetterFunctions.put( "userName", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getUserName(); } }); attributeSetterBiConsumers.put( "userName", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object userNameObject) { cpDefinition.setUserName((String)userNameObject); } }); attributeGetterFunctions.put( "createDate", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getCreateDate(); } }); attributeSetterBiConsumers.put( "createDate", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object createDateObject) { cpDefinition.setCreateDate((Date)createDateObject); } }); attributeGetterFunctions.put( "modifiedDate", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getModifiedDate(); } }); attributeSetterBiConsumers.put( "modifiedDate", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object modifiedDateObject) { cpDefinition.setModifiedDate((Date)modifiedDateObject); } }); attributeGetterFunctions.put( "CProductId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getCProductId(); } }); attributeSetterBiConsumers.put( "CProductId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object CProductIdObject) { cpDefinition.setCProductId((Long)CProductIdObject); } }); attributeGetterFunctions.put( "CPTaxCategoryId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getCPTaxCategoryId(); } }); attributeSetterBiConsumers.put( "CPTaxCategoryId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object CPTaxCategoryIdObject) { cpDefinition.setCPTaxCategoryId( (Long)CPTaxCategoryIdObject); } }); attributeGetterFunctions.put( "productTypeName", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getProductTypeName(); } }); attributeSetterBiConsumers.put( "productTypeName", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object productTypeNameObject) { cpDefinition.setProductTypeName( (String)productTypeNameObject); } }); attributeGetterFunctions.put( "availableIndividually", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getAvailableIndividually(); } }); attributeSetterBiConsumers.put( "availableIndividually", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object availableIndividuallyObject) { cpDefinition.setAvailableIndividually( (Boolean)availableIndividuallyObject); } }); attributeGetterFunctions.put( "ignoreSKUCombinations", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getIgnoreSKUCombinations(); } }); attributeSetterBiConsumers.put( "ignoreSKUCombinations", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object ignoreSKUCombinationsObject) { cpDefinition.setIgnoreSKUCombinations( (Boolean)ignoreSKUCombinationsObject); } }); attributeGetterFunctions.put( "shippable", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getShippable(); } }); attributeSetterBiConsumers.put( "shippable", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object shippableObject) { cpDefinition.setShippable((Boolean)shippableObject); } }); attributeGetterFunctions.put( "freeShipping", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getFreeShipping(); } }); attributeSetterBiConsumers.put( "freeShipping", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object freeShippingObject) { cpDefinition.setFreeShipping((Boolean)freeShippingObject); } }); attributeGetterFunctions.put( "shipSeparately", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getShipSeparately(); } }); attributeSetterBiConsumers.put( "shipSeparately", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object shipSeparatelyObject) { cpDefinition.setShipSeparately( (Boolean)shipSeparatelyObject); } }); attributeGetterFunctions.put( "shippingExtraPrice", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getShippingExtraPrice(); } }); attributeSetterBiConsumers.put( "shippingExtraPrice", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object shippingExtraPriceObject) { cpDefinition.setShippingExtraPrice( (Double)shippingExtraPriceObject); } }); attributeGetterFunctions.put( "width", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getWidth(); } }); attributeSetterBiConsumers.put( "width", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object widthObject) { cpDefinition.setWidth((Double)widthObject); } }); attributeGetterFunctions.put( "height", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getHeight(); } }); attributeSetterBiConsumers.put( "height", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object heightObject) { cpDefinition.setHeight((Double)heightObject); } }); attributeGetterFunctions.put( "depth", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDepth(); } }); attributeSetterBiConsumers.put( "depth", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object depthObject) { cpDefinition.setDepth((Double)depthObject); } }); attributeGetterFunctions.put( "weight", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getWeight(); } }); attributeSetterBiConsumers.put( "weight", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object weightObject) { cpDefinition.setWeight((Double)weightObject); } }); attributeGetterFunctions.put( "taxExempt", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getTaxExempt(); } }); attributeSetterBiConsumers.put( "taxExempt", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object taxExemptObject) { cpDefinition.setTaxExempt((Boolean)taxExemptObject); } }); attributeGetterFunctions.put( "telcoOrElectronics", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getTelcoOrElectronics(); } }); attributeSetterBiConsumers.put( "telcoOrElectronics", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object telcoOrElectronicsObject) { cpDefinition.setTelcoOrElectronics( (Boolean)telcoOrElectronicsObject); } }); attributeGetterFunctions.put( "DDMStructureKey", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDDMStructureKey(); } }); attributeSetterBiConsumers.put( "DDMStructureKey", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object DDMStructureKeyObject) { cpDefinition.setDDMStructureKey( (String)DDMStructureKeyObject); } }); attributeGetterFunctions.put( "published", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getPublished(); } }); attributeSetterBiConsumers.put( "published", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object publishedObject) { cpDefinition.setPublished((Boolean)publishedObject); } }); attributeGetterFunctions.put( "displayDate", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDisplayDate(); } }); attributeSetterBiConsumers.put( "displayDate", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object displayDateObject) { cpDefinition.setDisplayDate((Date)displayDateObject); } }); attributeGetterFunctions.put( "expirationDate", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getExpirationDate(); } }); attributeSetterBiConsumers.put( "expirationDate", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object expirationDateObject) { cpDefinition.setExpirationDate((Date)expirationDateObject); } }); attributeGetterFunctions.put( "lastPublishDate", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getLastPublishDate(); } }); attributeSetterBiConsumers.put( "lastPublishDate", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object lastPublishDateObject) { cpDefinition.setLastPublishDate( (Date)lastPublishDateObject); } }); attributeGetterFunctions.put( "subscriptionEnabled", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getSubscriptionEnabled(); } }); attributeSetterBiConsumers.put( "subscriptionEnabled", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object subscriptionEnabledObject) { cpDefinition.setSubscriptionEnabled( (Boolean)subscriptionEnabledObject); } }); attributeGetterFunctions.put( "subscriptionLength", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getSubscriptionLength(); } }); attributeSetterBiConsumers.put( "subscriptionLength", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object subscriptionLengthObject) { cpDefinition.setSubscriptionLength( (Integer)subscriptionLengthObject); } }); attributeGetterFunctions.put( "subscriptionType", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getSubscriptionType(); } }); attributeSetterBiConsumers.put( "subscriptionType", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object subscriptionTypeObject) { cpDefinition.setSubscriptionType( (String)subscriptionTypeObject); } }); attributeGetterFunctions.put( "subscriptionTypeSettings", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getSubscriptionTypeSettings(); } }); attributeSetterBiConsumers.put( "subscriptionTypeSettings", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object subscriptionTypeSettingsObject) { cpDefinition.setSubscriptionTypeSettings( (String)subscriptionTypeSettingsObject); } }); attributeGetterFunctions.put( "maxSubscriptionCycles", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getMaxSubscriptionCycles(); } }); attributeSetterBiConsumers.put( "maxSubscriptionCycles", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object maxSubscriptionCyclesObject) { cpDefinition.setMaxSubscriptionCycles( (Long)maxSubscriptionCyclesObject); } }); attributeGetterFunctions.put( "deliverySubscriptionEnabled", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDeliverySubscriptionEnabled(); } }); attributeSetterBiConsumers.put( "deliverySubscriptionEnabled", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object deliverySubscriptionEnabledObject) { cpDefinition.setDeliverySubscriptionEnabled( (Boolean)deliverySubscriptionEnabledObject); } }); attributeGetterFunctions.put( "deliverySubscriptionLength", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDeliverySubscriptionLength(); } }); attributeSetterBiConsumers.put( "deliverySubscriptionLength", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object deliverySubscriptionLengthObject) { cpDefinition.setDeliverySubscriptionLength( (Integer)deliverySubscriptionLengthObject); } }); attributeGetterFunctions.put( "deliverySubscriptionType", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDeliverySubscriptionType(); } }); attributeSetterBiConsumers.put( "deliverySubscriptionType", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object deliverySubscriptionTypeObject) { cpDefinition.setDeliverySubscriptionType( (String)deliverySubscriptionTypeObject); } }); attributeGetterFunctions.put( "deliverySubscriptionTypeSettings", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDeliverySubscriptionTypeSettings(); } }); attributeSetterBiConsumers.put( "deliverySubscriptionTypeSettings", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object deliverySubscriptionTypeSettingsObject) { cpDefinition.setDeliverySubscriptionTypeSettings( (String)deliverySubscriptionTypeSettingsObject); } }); attributeGetterFunctions.put( "deliveryMaxSubscriptionCycles", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getDeliveryMaxSubscriptionCycles(); } }); attributeSetterBiConsumers.put( "deliveryMaxSubscriptionCycles", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object deliveryMaxSubscriptionCyclesObject) { cpDefinition.setDeliveryMaxSubscriptionCycles( (Long)deliveryMaxSubscriptionCyclesObject); } }); attributeGetterFunctions.put( "accountGroupFilterEnabled", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getAccountGroupFilterEnabled(); } }); attributeSetterBiConsumers.put( "accountGroupFilterEnabled", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object accountGroupFilterEnabledObject) { cpDefinition.setAccountGroupFilterEnabled( (Boolean)accountGroupFilterEnabledObject); } }); attributeGetterFunctions.put( "channelFilterEnabled", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getChannelFilterEnabled(); } }); attributeSetterBiConsumers.put( "channelFilterEnabled", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object channelFilterEnabledObject) { cpDefinition.setChannelFilterEnabled( (Boolean)channelFilterEnabledObject); } }); attributeGetterFunctions.put( "version", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getVersion(); } }); attributeSetterBiConsumers.put( "version", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object versionObject) { cpDefinition.setVersion((Integer)versionObject); } }); attributeGetterFunctions.put( "status", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getStatus(); } }); attributeSetterBiConsumers.put( "status", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object statusObject) { cpDefinition.setStatus((Integer)statusObject); } }); attributeGetterFunctions.put( "statusByUserId", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getStatusByUserId(); } }); attributeSetterBiConsumers.put( "statusByUserId", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object statusByUserIdObject) { cpDefinition.setStatusByUserId((Long)statusByUserIdObject); } }); attributeGetterFunctions.put( "statusByUserName", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getStatusByUserName(); } }); attributeSetterBiConsumers.put( "statusByUserName", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object statusByUserNameObject) { cpDefinition.setStatusByUserName( (String)statusByUserNameObject); } }); attributeGetterFunctions.put( "statusDate", new Function() { @Override public Object apply(CPDefinition cpDefinition) { return cpDefinition.getStatusDate(); } }); attributeSetterBiConsumers.put( "statusDate", new BiConsumer() { @Override public void accept( CPDefinition cpDefinition, Object statusDateObject) { cpDefinition.setStatusDate((Date)statusDateObject); } }); _attributeGetterFunctions = Collections.unmodifiableMap( attributeGetterFunctions); _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 String getUuid() { if (_uuid == null) { return ""; } else { return _uuid; } } @Override public void setUuid(String uuid) { _columnBitmask |= UUID_COLUMN_BITMASK; if (_originalUuid == null) { _originalUuid = _uuid; } _uuid = uuid; } public String getOriginalUuid() { return GetterUtil.getString(_originalUuid); } @JSON @Override public String getDefaultLanguageId() { if (_defaultLanguageId == null) { return ""; } else { return _defaultLanguageId; } } @Override public void setDefaultLanguageId(String defaultLanguageId) { _defaultLanguageId = defaultLanguageId; } @JSON @Override public long getCPDefinitionId() { return _CPDefinitionId; } @Override public void setCPDefinitionId(long CPDefinitionId) { _CPDefinitionId = CPDefinitionId; } @JSON @Override public long getGroupId() { return _groupId; } @Override public void setGroupId(long groupId) { _columnBitmask |= GROUPID_COLUMN_BITMASK; if (!_setOriginalGroupId) { _setOriginalGroupId = true; _originalGroupId = _groupId; } _groupId = groupId; } public long getOriginalGroupId() { return _originalGroupId; } @JSON @Override public long getCompanyId() { return _companyId; } @Override public void setCompanyId(long companyId) { _columnBitmask |= COMPANYID_COLUMN_BITMASK; if (!_setOriginalCompanyId) { _setOriginalCompanyId = true; _originalCompanyId = _companyId; } _companyId = companyId; } public long getOriginalCompanyId() { return _originalCompanyId; } @JSON @Override public long getUserId() { return _userId; } @Override public void setUserId(long userId) { _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) { _userName = userName; } @JSON @Override public Date getCreateDate() { return _createDate; } @Override public void setCreateDate(Date createDate) { _columnBitmask = -1L; _createDate = createDate; } @JSON @Override public Date getModifiedDate() { return _modifiedDate; } public boolean hasSetModifiedDate() { return _setModifiedDate; } @Override public void setModifiedDate(Date modifiedDate) { _setModifiedDate = true; _modifiedDate = modifiedDate; } @JSON @Override public long getCProductId() { return _CProductId; } @Override public void setCProductId(long CProductId) { _columnBitmask |= CPRODUCTID_COLUMN_BITMASK; if (!_setOriginalCProductId) { _setOriginalCProductId = true; _originalCProductId = _CProductId; } _CProductId = CProductId; } public long getOriginalCProductId() { return _originalCProductId; } @JSON @Override public long getCPTaxCategoryId() { return _CPTaxCategoryId; } @Override public void setCPTaxCategoryId(long CPTaxCategoryId) { _columnBitmask |= CPTAXCATEGORYID_COLUMN_BITMASK; if (!_setOriginalCPTaxCategoryId) { _setOriginalCPTaxCategoryId = true; _originalCPTaxCategoryId = _CPTaxCategoryId; } _CPTaxCategoryId = CPTaxCategoryId; } public long getOriginalCPTaxCategoryId() { return _originalCPTaxCategoryId; } @JSON @Override public String getProductTypeName() { if (_productTypeName == null) { return ""; } else { return _productTypeName; } } @Override public void setProductTypeName(String productTypeName) { _productTypeName = productTypeName; } @JSON @Override public boolean getAvailableIndividually() { return _availableIndividually; } @JSON @Override public boolean isAvailableIndividually() { return _availableIndividually; } @Override public void setAvailableIndividually(boolean availableIndividually) { _availableIndividually = availableIndividually; } @JSON @Override public boolean getIgnoreSKUCombinations() { return _ignoreSKUCombinations; } @JSON @Override public boolean isIgnoreSKUCombinations() { return _ignoreSKUCombinations; } @Override public void setIgnoreSKUCombinations(boolean ignoreSKUCombinations) { _ignoreSKUCombinations = ignoreSKUCombinations; } @JSON @Override public boolean getShippable() { return _shippable; } @JSON @Override public boolean isShippable() { return _shippable; } @Override public void setShippable(boolean shippable) { _shippable = shippable; } @JSON @Override public boolean getFreeShipping() { return _freeShipping; } @JSON @Override public boolean isFreeShipping() { return _freeShipping; } @Override public void setFreeShipping(boolean freeShipping) { _freeShipping = freeShipping; } @JSON @Override public boolean getShipSeparately() { return _shipSeparately; } @JSON @Override public boolean isShipSeparately() { return _shipSeparately; } @Override public void setShipSeparately(boolean shipSeparately) { _shipSeparately = shipSeparately; } @JSON @Override public double getShippingExtraPrice() { return _shippingExtraPrice; } @Override public void setShippingExtraPrice(double shippingExtraPrice) { _shippingExtraPrice = shippingExtraPrice; } @JSON @Override public double getWidth() { return _width; } @Override public void setWidth(double width) { _width = width; } @JSON @Override public double getHeight() { return _height; } @Override public void setHeight(double height) { _height = height; } @JSON @Override public double getDepth() { return _depth; } @Override public void setDepth(double depth) { _depth = depth; } @JSON @Override public double getWeight() { return _weight; } @Override public void setWeight(double weight) { _weight = weight; } @JSON @Override public boolean getTaxExempt() { return _taxExempt; } @JSON @Override public boolean isTaxExempt() { return _taxExempt; } @Override public void setTaxExempt(boolean taxExempt) { _taxExempt = taxExempt; } @JSON @Override public boolean getTelcoOrElectronics() { return _telcoOrElectronics; } @JSON @Override public boolean isTelcoOrElectronics() { return _telcoOrElectronics; } @Override public void setTelcoOrElectronics(boolean telcoOrElectronics) { _telcoOrElectronics = telcoOrElectronics; } @JSON @Override public String getDDMStructureKey() { if (_DDMStructureKey == null) { return ""; } else { return _DDMStructureKey; } } @Override public void setDDMStructureKey(String DDMStructureKey) { _DDMStructureKey = DDMStructureKey; } @JSON @Override public boolean getPublished() { return _published; } @JSON @Override public boolean isPublished() { return _published; } @Override public void setPublished(boolean published) { _published = published; } @JSON @Override public Date getDisplayDate() { return _displayDate; } @Override public void setDisplayDate(Date displayDate) { _columnBitmask = -1L; if (_originalDisplayDate == null) { _originalDisplayDate = _displayDate; } _displayDate = displayDate; } public Date getOriginalDisplayDate() { return _originalDisplayDate; } @JSON @Override public Date getExpirationDate() { return _expirationDate; } @Override public void setExpirationDate(Date expirationDate) { _expirationDate = expirationDate; } @JSON @Override public Date getLastPublishDate() { return _lastPublishDate; } @Override public void setLastPublishDate(Date lastPublishDate) { _lastPublishDate = lastPublishDate; } @JSON @Override public boolean getSubscriptionEnabled() { return _subscriptionEnabled; } @JSON @Override public boolean isSubscriptionEnabled() { return _subscriptionEnabled; } @Override public void setSubscriptionEnabled(boolean subscriptionEnabled) { _columnBitmask |= SUBSCRIPTIONENABLED_COLUMN_BITMASK; if (!_setOriginalSubscriptionEnabled) { _setOriginalSubscriptionEnabled = true; _originalSubscriptionEnabled = _subscriptionEnabled; } _subscriptionEnabled = subscriptionEnabled; } public boolean getOriginalSubscriptionEnabled() { return _originalSubscriptionEnabled; } @JSON @Override public int getSubscriptionLength() { return _subscriptionLength; } @Override public void setSubscriptionLength(int subscriptionLength) { _subscriptionLength = subscriptionLength; } @JSON @Override public String getSubscriptionType() { if (_subscriptionType == null) { return ""; } else { return _subscriptionType; } } @Override public void setSubscriptionType(String subscriptionType) { _subscriptionType = subscriptionType; } @JSON @Override public String getSubscriptionTypeSettings() { if (_subscriptionTypeSettings == null) { return ""; } else { return _subscriptionTypeSettings; } } @Override public void setSubscriptionTypeSettings(String subscriptionTypeSettings) { _subscriptionTypeSettings = subscriptionTypeSettings; } @JSON @Override public long getMaxSubscriptionCycles() { return _maxSubscriptionCycles; } @Override public void setMaxSubscriptionCycles(long maxSubscriptionCycles) { _maxSubscriptionCycles = maxSubscriptionCycles; } @JSON @Override public boolean getDeliverySubscriptionEnabled() { return _deliverySubscriptionEnabled; } @JSON @Override public boolean isDeliverySubscriptionEnabled() { return _deliverySubscriptionEnabled; } @Override public void setDeliverySubscriptionEnabled( boolean deliverySubscriptionEnabled) { _deliverySubscriptionEnabled = deliverySubscriptionEnabled; } @JSON @Override public int getDeliverySubscriptionLength() { return _deliverySubscriptionLength; } @Override public void setDeliverySubscriptionLength(int deliverySubscriptionLength) { _deliverySubscriptionLength = deliverySubscriptionLength; } @JSON @Override public String getDeliverySubscriptionType() { if (_deliverySubscriptionType == null) { return ""; } else { return _deliverySubscriptionType; } } @Override public void setDeliverySubscriptionType(String deliverySubscriptionType) { _deliverySubscriptionType = deliverySubscriptionType; } @JSON @Override public String getDeliverySubscriptionTypeSettings() { if (_deliverySubscriptionTypeSettings == null) { return ""; } else { return _deliverySubscriptionTypeSettings; } } @Override public void setDeliverySubscriptionTypeSettings( String deliverySubscriptionTypeSettings) { _deliverySubscriptionTypeSettings = deliverySubscriptionTypeSettings; } @JSON @Override public long getDeliveryMaxSubscriptionCycles() { return _deliveryMaxSubscriptionCycles; } @Override public void setDeliveryMaxSubscriptionCycles( long deliveryMaxSubscriptionCycles) { _deliveryMaxSubscriptionCycles = deliveryMaxSubscriptionCycles; } @JSON @Override public boolean getAccountGroupFilterEnabled() { return _accountGroupFilterEnabled; } @JSON @Override public boolean isAccountGroupFilterEnabled() { return _accountGroupFilterEnabled; } @Override public void setAccountGroupFilterEnabled( boolean accountGroupFilterEnabled) { _accountGroupFilterEnabled = accountGroupFilterEnabled; } @JSON @Override public boolean getChannelFilterEnabled() { return _channelFilterEnabled; } @JSON @Override public boolean isChannelFilterEnabled() { return _channelFilterEnabled; } @Override public void setChannelFilterEnabled(boolean channelFilterEnabled) { _channelFilterEnabled = channelFilterEnabled; } @JSON @Override public int getVersion() { return _version; } @Override public void setVersion(int version) { _columnBitmask |= VERSION_COLUMN_BITMASK; if (!_setOriginalVersion) { _setOriginalVersion = true; _originalVersion = _version; } _version = version; } public int getOriginalVersion() { return _originalVersion; } @JSON @Override public int getStatus() { return _status; } @Override public void setStatus(int status) { _columnBitmask |= STATUS_COLUMN_BITMASK; if (!_setOriginalStatus) { _setOriginalStatus = true; _originalStatus = _status; } _status = status; } public int getOriginalStatus() { return _originalStatus; } @JSON @Override public long getStatusByUserId() { return _statusByUserId; } @Override public void setStatusByUserId(long statusByUserId) { _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) { _statusByUserName = statusByUserName; } @JSON @Override public Date getStatusDate() { return _statusDate; } @Override public void setStatusDate(Date statusDate) { _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() { 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.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 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(); } @Override public boolean isEntityCacheEnabled() { return ENTITY_CACHE_ENABLED; } @Override public boolean isFinderCacheEnabled() { return FINDER_CACHE_ENABLED; } @Override public void resetOriginalValues() { CPDefinitionModelImpl cpDefinitionModelImpl = this; cpDefinitionModelImpl._originalUuid = cpDefinitionModelImpl._uuid; cpDefinitionModelImpl._originalGroupId = cpDefinitionModelImpl._groupId; cpDefinitionModelImpl._setOriginalGroupId = false; cpDefinitionModelImpl._originalCompanyId = cpDefinitionModelImpl._companyId; cpDefinitionModelImpl._setOriginalCompanyId = false; cpDefinitionModelImpl._setModifiedDate = false; cpDefinitionModelImpl._originalCProductId = cpDefinitionModelImpl._CProductId; cpDefinitionModelImpl._setOriginalCProductId = false; cpDefinitionModelImpl._originalCPTaxCategoryId = cpDefinitionModelImpl._CPTaxCategoryId; cpDefinitionModelImpl._setOriginalCPTaxCategoryId = false; cpDefinitionModelImpl._originalDisplayDate = cpDefinitionModelImpl._displayDate; cpDefinitionModelImpl._originalSubscriptionEnabled = cpDefinitionModelImpl._subscriptionEnabled; cpDefinitionModelImpl._setOriginalSubscriptionEnabled = false; cpDefinitionModelImpl._originalVersion = cpDefinitionModelImpl._version; cpDefinitionModelImpl._setOriginalVersion = false; cpDefinitionModelImpl._originalStatus = cpDefinitionModelImpl._status; cpDefinitionModelImpl._setOriginalStatus = false; cpDefinitionModelImpl._columnBitmask = 0; } @Override public CacheModel toCacheModel() { CPDefinitionCacheModel cpDefinitionCacheModel = new CPDefinitionCacheModel(); 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( 4 * attributeGetterFunctions.size() + 2); sb.append("{"); for (Map.Entry> entry : attributeGetterFunctions.entrySet()) { String attributeName = entry.getKey(); Function attributeGetterFunction = entry.getValue(); sb.append(attributeName); sb.append("="); sb.append(attributeGetterFunction.apply((CPDefinition)this)); sb.append(", "); } if (sb.index() > 1) { sb.setIndex(sb.index() - 1); } sb.append("}"); return sb.toString(); } @Override public String toXmlString() { Map> attributeGetterFunctions = getAttributeGetterFunctions(); StringBundler sb = new StringBundler( 5 * attributeGetterFunctions.size() + 4); sb.append(""); sb.append(getModelClassName()); sb.append(""); for (Map.Entry> entry : attributeGetterFunctions.entrySet()) { String attributeName = entry.getKey(); Function attributeGetterFunction = entry.getValue(); sb.append(""); sb.append(attributeName); sb.append(""); } sb.append(""); return sb.toString(); } private static class EscapedModelProxyProviderFunctionHolder { private static final Function _escapedModelProxyProviderFunction = _getProxyProviderFunction(); } private String _uuid; private String _originalUuid; private String _defaultLanguageId; private long _CPDefinitionId; private long _groupId; private long _originalGroupId; private boolean _setOriginalGroupId; private long _companyId; private long _originalCompanyId; private boolean _setOriginalCompanyId; private long _userId; private String _userName; private Date _createDate; private Date _modifiedDate; private boolean _setModifiedDate; private long _CProductId; private long _originalCProductId; private boolean _setOriginalCProductId; private long _CPTaxCategoryId; private long _originalCPTaxCategoryId; private boolean _setOriginalCPTaxCategoryId; 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 _originalDisplayDate; private Date _expirationDate; private Date _lastPublishDate; private boolean _subscriptionEnabled; private boolean _originalSubscriptionEnabled; private boolean _setOriginalSubscriptionEnabled; 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 _originalVersion; private boolean _setOriginalVersion; private int _status; private int _originalStatus; private boolean _setOriginalStatus; private long _statusByUserId; private String _statusByUserName; private Date _statusDate; private long _columnBitmask; private CPDefinition _escapedModel; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy