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

com.liferay.commerce.model.impl.CommerceOrderItemModelImpl Maven / Gradle / Ivy

/**
 * 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.model.impl;

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

import java.io.Serializable;

import java.lang.reflect.InvocationHandler;

import java.math.BigDecimal;

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

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

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

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

* * @author Alessio Antonio Rendina * @see CommerceOrderItemImpl * @generated */ @JSON(strict = true) public class CommerceOrderItemModelImpl extends BaseModelImpl implements CommerceOrderItemModel { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a commerce order item model instance should use the CommerceOrderItem interface instead. */ public static final String TABLE_NAME = "CommerceOrderItem"; public static final Object[][] TABLE_COLUMNS = { {"mvccVersion", Types.BIGINT}, {"uuid_", Types.VARCHAR}, {"externalReferenceCode", Types.VARCHAR}, {"commerceOrderItemId", Types.BIGINT}, {"groupId", Types.BIGINT}, {"companyId", Types.BIGINT}, {"userId", Types.BIGINT}, {"userName", Types.VARCHAR}, {"createDate", Types.TIMESTAMP}, {"modifiedDate", Types.TIMESTAMP}, {"CIBookedQuantityId", Types.BIGINT}, {"commerceOrderId", Types.BIGINT}, {"commercePriceListId", Types.BIGINT}, {"CPInstanceId", Types.BIGINT}, {"CPMeasurementUnitId", Types.BIGINT}, {"CProductId", Types.BIGINT}, {"customerCommerceOrderItemId", Types.BIGINT}, {"parentCommerceOrderItemId", Types.BIGINT}, {"shippingAddressId", Types.BIGINT}, {"deliveryGroupName", Types.VARCHAR}, {"deliveryMaxSubscriptionCycles", Types.BIGINT}, {"deliverySubscriptionLength", Types.INTEGER}, {"deliverySubscriptionType", Types.VARCHAR}, {"deliverySubTypeSettings", Types.VARCHAR}, {"depth", Types.DOUBLE}, {"discountAmount", Types.DECIMAL}, {"discountManuallyAdjusted", Types.BOOLEAN}, {"discountPercentageLevel1", Types.DECIMAL}, {"discountPercentageLevel2", Types.DECIMAL}, {"discountPercentageLevel3", Types.DECIMAL}, {"discountPercentageLevel4", Types.DECIMAL}, {"discountPctLevel1WithTaxAmount", Types.DECIMAL}, {"discountPctLevel2WithTaxAmount", Types.DECIMAL}, {"discountPctLevel3WithTaxAmount", Types.DECIMAL}, {"discountPctLevel4WithTaxAmount", Types.DECIMAL}, {"discountWithTaxAmount", Types.DECIMAL}, {"finalPrice", Types.DECIMAL}, {"finalPriceWithTaxAmount", Types.DECIMAL}, {"freeShipping", Types.BOOLEAN}, {"height", Types.DOUBLE}, {"json", Types.CLOB}, {"manuallyAdjusted", Types.BOOLEAN}, {"maxSubscriptionCycles", Types.BIGINT}, {"name", Types.VARCHAR}, {"priceManuallyAdjusted", Types.BOOLEAN}, {"priceOnApplication", Types.BOOLEAN}, {"printedNote", Types.VARCHAR}, {"promoPrice", Types.DECIMAL}, {"promoPriceWithTaxAmount", Types.DECIMAL}, {"quantity", Types.DECIMAL}, {"replacedCPInstanceId", Types.BIGINT}, {"replacedSku", Types.VARCHAR}, {"requestedDeliveryDate", Types.TIMESTAMP}, {"shipSeparately", Types.BOOLEAN}, {"shippable", Types.BOOLEAN}, {"shippedQuantity", Types.DECIMAL}, {"shippingExtraPrice", Types.DOUBLE}, {"sku", Types.VARCHAR}, {"subscription", Types.BOOLEAN}, {"subscriptionLength", Types.INTEGER}, {"subscriptionType", Types.VARCHAR}, {"subscriptionTypeSettings", Types.VARCHAR}, {"UOMIncrementalOrderQuantity", Types.DECIMAL}, {"unitOfMeasureKey", Types.VARCHAR}, {"unitPrice", Types.DECIMAL}, {"unitPriceWithTaxAmount", Types.DECIMAL}, {"weight", Types.DOUBLE}, {"width", Types.DOUBLE} }; public static final Map TABLE_COLUMNS_MAP = new HashMap(); static { TABLE_COLUMNS_MAP.put("mvccVersion", Types.BIGINT); TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); TABLE_COLUMNS_MAP.put("externalReferenceCode", Types.VARCHAR); TABLE_COLUMNS_MAP.put("commerceOrderItemId", 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("CIBookedQuantityId", Types.BIGINT); TABLE_COLUMNS_MAP.put("commerceOrderId", Types.BIGINT); TABLE_COLUMNS_MAP.put("commercePriceListId", Types.BIGINT); TABLE_COLUMNS_MAP.put("CPInstanceId", Types.BIGINT); TABLE_COLUMNS_MAP.put("CPMeasurementUnitId", Types.BIGINT); TABLE_COLUMNS_MAP.put("CProductId", Types.BIGINT); TABLE_COLUMNS_MAP.put("customerCommerceOrderItemId", Types.BIGINT); TABLE_COLUMNS_MAP.put("parentCommerceOrderItemId", Types.BIGINT); TABLE_COLUMNS_MAP.put("shippingAddressId", Types.BIGINT); TABLE_COLUMNS_MAP.put("deliveryGroupName", Types.VARCHAR); TABLE_COLUMNS_MAP.put("deliveryMaxSubscriptionCycles", Types.BIGINT); 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("depth", Types.DOUBLE); TABLE_COLUMNS_MAP.put("discountAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountManuallyAdjusted", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("discountPercentageLevel1", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountPercentageLevel2", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountPercentageLevel3", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountPercentageLevel4", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountPctLevel1WithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountPctLevel2WithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountPctLevel3WithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountPctLevel4WithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("discountWithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("finalPrice", Types.DECIMAL); TABLE_COLUMNS_MAP.put("finalPriceWithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("freeShipping", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("height", Types.DOUBLE); TABLE_COLUMNS_MAP.put("json", Types.CLOB); TABLE_COLUMNS_MAP.put("manuallyAdjusted", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("maxSubscriptionCycles", Types.BIGINT); TABLE_COLUMNS_MAP.put("name", Types.VARCHAR); TABLE_COLUMNS_MAP.put("priceManuallyAdjusted", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("priceOnApplication", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("printedNote", Types.VARCHAR); TABLE_COLUMNS_MAP.put("promoPrice", Types.DECIMAL); TABLE_COLUMNS_MAP.put("promoPriceWithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("quantity", Types.DECIMAL); TABLE_COLUMNS_MAP.put("replacedCPInstanceId", Types.BIGINT); TABLE_COLUMNS_MAP.put("replacedSku", Types.VARCHAR); TABLE_COLUMNS_MAP.put("requestedDeliveryDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("shipSeparately", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("shippable", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("shippedQuantity", Types.DECIMAL); TABLE_COLUMNS_MAP.put("shippingExtraPrice", Types.DOUBLE); TABLE_COLUMNS_MAP.put("sku", Types.VARCHAR); TABLE_COLUMNS_MAP.put("subscription", Types.BOOLEAN); TABLE_COLUMNS_MAP.put("subscriptionLength", Types.INTEGER); TABLE_COLUMNS_MAP.put("subscriptionType", Types.VARCHAR); TABLE_COLUMNS_MAP.put("subscriptionTypeSettings", Types.VARCHAR); TABLE_COLUMNS_MAP.put("UOMIncrementalOrderQuantity", Types.DECIMAL); TABLE_COLUMNS_MAP.put("unitOfMeasureKey", Types.VARCHAR); TABLE_COLUMNS_MAP.put("unitPrice", Types.DECIMAL); TABLE_COLUMNS_MAP.put("unitPriceWithTaxAmount", Types.DECIMAL); TABLE_COLUMNS_MAP.put("weight", Types.DOUBLE); TABLE_COLUMNS_MAP.put("width", Types.DOUBLE); } public static final String TABLE_SQL_CREATE = "create table CommerceOrderItem (mvccVersion LONG default 0 not null,uuid_ VARCHAR(75) null,externalReferenceCode VARCHAR(75) null,commerceOrderItemId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,CIBookedQuantityId LONG,commerceOrderId LONG,commercePriceListId LONG,CPInstanceId LONG,CPMeasurementUnitId LONG,CProductId LONG,customerCommerceOrderItemId LONG,parentCommerceOrderItemId LONG,shippingAddressId LONG,deliveryGroupName VARCHAR(75) null,deliveryMaxSubscriptionCycles LONG,deliverySubscriptionLength INTEGER,deliverySubscriptionType VARCHAR(75) null,deliverySubTypeSettings VARCHAR(75) null,depth DOUBLE,discountAmount BIGDECIMAL null,discountManuallyAdjusted BOOLEAN,discountPercentageLevel1 BIGDECIMAL null,discountPercentageLevel2 BIGDECIMAL null,discountPercentageLevel3 BIGDECIMAL null,discountPercentageLevel4 BIGDECIMAL null,discountPctLevel1WithTaxAmount BIGDECIMAL null,discountPctLevel2WithTaxAmount BIGDECIMAL null,discountPctLevel3WithTaxAmount BIGDECIMAL null,discountPctLevel4WithTaxAmount BIGDECIMAL null,discountWithTaxAmount BIGDECIMAL null,finalPrice BIGDECIMAL null,finalPriceWithTaxAmount BIGDECIMAL null,freeShipping BOOLEAN,height DOUBLE,json TEXT null,manuallyAdjusted BOOLEAN,maxSubscriptionCycles LONG,name STRING null,priceManuallyAdjusted BOOLEAN,priceOnApplication BOOLEAN,printedNote STRING null,promoPrice BIGDECIMAL null,promoPriceWithTaxAmount BIGDECIMAL null,quantity BIGDECIMAL null,replacedCPInstanceId LONG,replacedSku VARCHAR(75) null,requestedDeliveryDate DATE null,shipSeparately BOOLEAN,shippable BOOLEAN,shippedQuantity BIGDECIMAL null,shippingExtraPrice DOUBLE,sku VARCHAR(75) null,subscription BOOLEAN,subscriptionLength INTEGER,subscriptionType VARCHAR(75) null,subscriptionTypeSettings VARCHAR(75) null,UOMIncrementalOrderQuantity BIGDECIMAL null,unitOfMeasureKey VARCHAR(75) null,unitPrice BIGDECIMAL null,unitPriceWithTaxAmount BIGDECIMAL null,weight DOUBLE,width DOUBLE)"; public static final String TABLE_SQL_DROP = "drop table CommerceOrderItem"; public static final String ORDER_BY_JPQL = " ORDER BY commerceOrderItem.createDate ASC"; public static final String ORDER_BY_SQL = " ORDER BY CommerceOrderItem.createDate ASC"; public static final String DATA_SOURCE = "liferayDataSource"; public static final String SESSION_FACTORY = "liferaySessionFactory"; public static final String TX_MANAGER = "liferayTransactionManager"; /** * @deprecated As of Athanasius (7.3.x), 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 CommerceOrderItemModelImpl() { } @Override public long getPrimaryKey() { return _commerceOrderItemId; } @Override public void setPrimaryKey(long primaryKey) { setCommerceOrderItemId(primaryKey); } @Override public Serializable getPrimaryKeyObj() { return _commerceOrderItemId; } @Override public void setPrimaryKeyObj(Serializable primaryKeyObj) { setPrimaryKey(((Long)primaryKeyObj).longValue()); } @Override public Class getModelClass() { return CommerceOrderItem.class; } @Override public String getModelClassName() { return CommerceOrderItem.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((CommerceOrderItem)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( (CommerceOrderItem)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", CommerceOrderItem::getMvccVersion); attributeGetterFunctions.put("uuid", CommerceOrderItem::getUuid); attributeGetterFunctions.put( "externalReferenceCode", CommerceOrderItem::getExternalReferenceCode); attributeGetterFunctions.put( "commerceOrderItemId", CommerceOrderItem::getCommerceOrderItemId); attributeGetterFunctions.put( "groupId", CommerceOrderItem::getGroupId); attributeGetterFunctions.put( "companyId", CommerceOrderItem::getCompanyId); attributeGetterFunctions.put( "userId", CommerceOrderItem::getUserId); attributeGetterFunctions.put( "userName", CommerceOrderItem::getUserName); attributeGetterFunctions.put( "createDate", CommerceOrderItem::getCreateDate); attributeGetterFunctions.put( "modifiedDate", CommerceOrderItem::getModifiedDate); attributeGetterFunctions.put( "commerceInventoryBookedQuantityId", CommerceOrderItem::getCommerceInventoryBookedQuantityId); attributeGetterFunctions.put( "commerceOrderId", CommerceOrderItem::getCommerceOrderId); attributeGetterFunctions.put( "commercePriceListId", CommerceOrderItem::getCommercePriceListId); attributeGetterFunctions.put( "CPInstanceId", CommerceOrderItem::getCPInstanceId); attributeGetterFunctions.put( "CPMeasurementUnitId", CommerceOrderItem::getCPMeasurementUnitId); attributeGetterFunctions.put( "CProductId", CommerceOrderItem::getCProductId); attributeGetterFunctions.put( "customerCommerceOrderItemId", CommerceOrderItem::getCustomerCommerceOrderItemId); attributeGetterFunctions.put( "parentCommerceOrderItemId", CommerceOrderItem::getParentCommerceOrderItemId); attributeGetterFunctions.put( "shippingAddressId", CommerceOrderItem::getShippingAddressId); attributeGetterFunctions.put( "deliveryGroupName", CommerceOrderItem::getDeliveryGroupName); attributeGetterFunctions.put( "deliveryMaxSubscriptionCycles", CommerceOrderItem::getDeliveryMaxSubscriptionCycles); attributeGetterFunctions.put( "deliverySubscriptionLength", CommerceOrderItem::getDeliverySubscriptionLength); attributeGetterFunctions.put( "deliverySubscriptionType", CommerceOrderItem::getDeliverySubscriptionType); attributeGetterFunctions.put( "deliverySubscriptionTypeSettings", CommerceOrderItem::getDeliverySubscriptionTypeSettings); attributeGetterFunctions.put("depth", CommerceOrderItem::getDepth); attributeGetterFunctions.put( "discountAmount", CommerceOrderItem::getDiscountAmount); attributeGetterFunctions.put( "discountManuallyAdjusted", CommerceOrderItem::getDiscountManuallyAdjusted); attributeGetterFunctions.put( "discountPercentageLevel1", CommerceOrderItem::getDiscountPercentageLevel1); attributeGetterFunctions.put( "discountPercentageLevel2", CommerceOrderItem::getDiscountPercentageLevel2); attributeGetterFunctions.put( "discountPercentageLevel3", CommerceOrderItem::getDiscountPercentageLevel3); attributeGetterFunctions.put( "discountPercentageLevel4", CommerceOrderItem::getDiscountPercentageLevel4); attributeGetterFunctions.put( "discountPercentageLevel1WithTaxAmount", CommerceOrderItem::getDiscountPercentageLevel1WithTaxAmount); attributeGetterFunctions.put( "discountPercentageLevel2WithTaxAmount", CommerceOrderItem::getDiscountPercentageLevel2WithTaxAmount); attributeGetterFunctions.put( "discountPercentageLevel3WithTaxAmount", CommerceOrderItem::getDiscountPercentageLevel3WithTaxAmount); attributeGetterFunctions.put( "discountPercentageLevel4WithTaxAmount", CommerceOrderItem::getDiscountPercentageLevel4WithTaxAmount); attributeGetterFunctions.put( "discountWithTaxAmount", CommerceOrderItem::getDiscountWithTaxAmount); attributeGetterFunctions.put( "finalPrice", CommerceOrderItem::getFinalPrice); attributeGetterFunctions.put( "finalPriceWithTaxAmount", CommerceOrderItem::getFinalPriceWithTaxAmount); attributeGetterFunctions.put( "freeShipping", CommerceOrderItem::getFreeShipping); attributeGetterFunctions.put( "height", CommerceOrderItem::getHeight); attributeGetterFunctions.put("json", CommerceOrderItem::getJson); attributeGetterFunctions.put( "manuallyAdjusted", CommerceOrderItem::getManuallyAdjusted); attributeGetterFunctions.put( "maxSubscriptionCycles", CommerceOrderItem::getMaxSubscriptionCycles); attributeGetterFunctions.put("name", CommerceOrderItem::getName); attributeGetterFunctions.put( "priceManuallyAdjusted", CommerceOrderItem::getPriceManuallyAdjusted); attributeGetterFunctions.put( "priceOnApplication", CommerceOrderItem::getPriceOnApplication); attributeGetterFunctions.put( "printedNote", CommerceOrderItem::getPrintedNote); attributeGetterFunctions.put( "promoPrice", CommerceOrderItem::getPromoPrice); attributeGetterFunctions.put( "promoPriceWithTaxAmount", CommerceOrderItem::getPromoPriceWithTaxAmount); attributeGetterFunctions.put( "quantity", CommerceOrderItem::getQuantity); attributeGetterFunctions.put( "replacedCPInstanceId", CommerceOrderItem::getReplacedCPInstanceId); attributeGetterFunctions.put( "replacedSku", CommerceOrderItem::getReplacedSku); attributeGetterFunctions.put( "requestedDeliveryDate", CommerceOrderItem::getRequestedDeliveryDate); attributeGetterFunctions.put( "shipSeparately", CommerceOrderItem::getShipSeparately); attributeGetterFunctions.put( "shippable", CommerceOrderItem::getShippable); attributeGetterFunctions.put( "shippedQuantity", CommerceOrderItem::getShippedQuantity); attributeGetterFunctions.put( "shippingExtraPrice", CommerceOrderItem::getShippingExtraPrice); attributeGetterFunctions.put("sku", CommerceOrderItem::getSku); attributeGetterFunctions.put( "subscription", CommerceOrderItem::getSubscription); attributeGetterFunctions.put( "subscriptionLength", CommerceOrderItem::getSubscriptionLength); attributeGetterFunctions.put( "subscriptionType", CommerceOrderItem::getSubscriptionType); attributeGetterFunctions.put( "subscriptionTypeSettings", CommerceOrderItem::getSubscriptionTypeSettings); attributeGetterFunctions.put( "unitOfMeasureIncrementalOrderQuantity", CommerceOrderItem::getUnitOfMeasureIncrementalOrderQuantity); attributeGetterFunctions.put( "unitOfMeasureKey", CommerceOrderItem::getUnitOfMeasureKey); attributeGetterFunctions.put( "unitPrice", CommerceOrderItem::getUnitPrice); attributeGetterFunctions.put( "unitPriceWithTaxAmount", CommerceOrderItem::getUnitPriceWithTaxAmount); attributeGetterFunctions.put( "weight", CommerceOrderItem::getWeight); attributeGetterFunctions.put("width", CommerceOrderItem::getWidth); _attributeGetterFunctions = Collections.unmodifiableMap( attributeGetterFunctions); } } private static class AttributeSetterBiConsumersHolder { private static final Map> _attributeSetterBiConsumers; static { Map> attributeSetterBiConsumers = new LinkedHashMap >(); attributeSetterBiConsumers.put( "mvccVersion", (BiConsumer) CommerceOrderItem::setMvccVersion); attributeSetterBiConsumers.put( "uuid", (BiConsumer) CommerceOrderItem::setUuid); attributeSetterBiConsumers.put( "externalReferenceCode", (BiConsumer) CommerceOrderItem::setExternalReferenceCode); attributeSetterBiConsumers.put( "commerceOrderItemId", (BiConsumer) CommerceOrderItem::setCommerceOrderItemId); attributeSetterBiConsumers.put( "groupId", (BiConsumer) CommerceOrderItem::setGroupId); attributeSetterBiConsumers.put( "companyId", (BiConsumer) CommerceOrderItem::setCompanyId); attributeSetterBiConsumers.put( "userId", (BiConsumer) CommerceOrderItem::setUserId); attributeSetterBiConsumers.put( "userName", (BiConsumer) CommerceOrderItem::setUserName); attributeSetterBiConsumers.put( "createDate", (BiConsumer) CommerceOrderItem::setCreateDate); attributeSetterBiConsumers.put( "modifiedDate", (BiConsumer) CommerceOrderItem::setModifiedDate); attributeSetterBiConsumers.put( "commerceInventoryBookedQuantityId", (BiConsumer) CommerceOrderItem::setCommerceInventoryBookedQuantityId); attributeSetterBiConsumers.put( "commerceOrderId", (BiConsumer) CommerceOrderItem::setCommerceOrderId); attributeSetterBiConsumers.put( "commercePriceListId", (BiConsumer) CommerceOrderItem::setCommercePriceListId); attributeSetterBiConsumers.put( "CPInstanceId", (BiConsumer) CommerceOrderItem::setCPInstanceId); attributeSetterBiConsumers.put( "CPMeasurementUnitId", (BiConsumer) CommerceOrderItem::setCPMeasurementUnitId); attributeSetterBiConsumers.put( "CProductId", (BiConsumer) CommerceOrderItem::setCProductId); attributeSetterBiConsumers.put( "customerCommerceOrderItemId", (BiConsumer) CommerceOrderItem::setCustomerCommerceOrderItemId); attributeSetterBiConsumers.put( "parentCommerceOrderItemId", (BiConsumer) CommerceOrderItem::setParentCommerceOrderItemId); attributeSetterBiConsumers.put( "shippingAddressId", (BiConsumer) CommerceOrderItem::setShippingAddressId); attributeSetterBiConsumers.put( "deliveryGroupName", (BiConsumer) CommerceOrderItem::setDeliveryGroupName); attributeSetterBiConsumers.put( "deliveryMaxSubscriptionCycles", (BiConsumer) CommerceOrderItem::setDeliveryMaxSubscriptionCycles); attributeSetterBiConsumers.put( "deliverySubscriptionLength", (BiConsumer) CommerceOrderItem::setDeliverySubscriptionLength); attributeSetterBiConsumers.put( "deliverySubscriptionType", (BiConsumer) CommerceOrderItem::setDeliverySubscriptionType); attributeSetterBiConsumers.put( "deliverySubscriptionTypeSettings", (BiConsumer) CommerceOrderItem::setDeliverySubscriptionTypeSettings); attributeSetterBiConsumers.put( "depth", (BiConsumer) CommerceOrderItem::setDepth); attributeSetterBiConsumers.put( "discountAmount", (BiConsumer) CommerceOrderItem::setDiscountAmount); attributeSetterBiConsumers.put( "discountManuallyAdjusted", (BiConsumer) CommerceOrderItem::setDiscountManuallyAdjusted); attributeSetterBiConsumers.put( "discountPercentageLevel1", (BiConsumer) CommerceOrderItem::setDiscountPercentageLevel1); attributeSetterBiConsumers.put( "discountPercentageLevel2", (BiConsumer) CommerceOrderItem::setDiscountPercentageLevel2); attributeSetterBiConsumers.put( "discountPercentageLevel3", (BiConsumer) CommerceOrderItem::setDiscountPercentageLevel3); attributeSetterBiConsumers.put( "discountPercentageLevel4", (BiConsumer) CommerceOrderItem::setDiscountPercentageLevel4); attributeSetterBiConsumers.put( "discountPercentageLevel1WithTaxAmount", (BiConsumer) CommerceOrderItem:: setDiscountPercentageLevel1WithTaxAmount); attributeSetterBiConsumers.put( "discountPercentageLevel2WithTaxAmount", (BiConsumer) CommerceOrderItem:: setDiscountPercentageLevel2WithTaxAmount); attributeSetterBiConsumers.put( "discountPercentageLevel3WithTaxAmount", (BiConsumer) CommerceOrderItem:: setDiscountPercentageLevel3WithTaxAmount); attributeSetterBiConsumers.put( "discountPercentageLevel4WithTaxAmount", (BiConsumer) CommerceOrderItem:: setDiscountPercentageLevel4WithTaxAmount); attributeSetterBiConsumers.put( "discountWithTaxAmount", (BiConsumer) CommerceOrderItem::setDiscountWithTaxAmount); attributeSetterBiConsumers.put( "finalPrice", (BiConsumer) CommerceOrderItem::setFinalPrice); attributeSetterBiConsumers.put( "finalPriceWithTaxAmount", (BiConsumer) CommerceOrderItem::setFinalPriceWithTaxAmount); attributeSetterBiConsumers.put( "freeShipping", (BiConsumer) CommerceOrderItem::setFreeShipping); attributeSetterBiConsumers.put( "height", (BiConsumer) CommerceOrderItem::setHeight); attributeSetterBiConsumers.put( "json", (BiConsumer) CommerceOrderItem::setJson); attributeSetterBiConsumers.put( "manuallyAdjusted", (BiConsumer) CommerceOrderItem::setManuallyAdjusted); attributeSetterBiConsumers.put( "maxSubscriptionCycles", (BiConsumer) CommerceOrderItem::setMaxSubscriptionCycles); attributeSetterBiConsumers.put( "name", (BiConsumer) CommerceOrderItem::setName); attributeSetterBiConsumers.put( "priceManuallyAdjusted", (BiConsumer) CommerceOrderItem::setPriceManuallyAdjusted); attributeSetterBiConsumers.put( "priceOnApplication", (BiConsumer) CommerceOrderItem::setPriceOnApplication); attributeSetterBiConsumers.put( "printedNote", (BiConsumer) CommerceOrderItem::setPrintedNote); attributeSetterBiConsumers.put( "promoPrice", (BiConsumer) CommerceOrderItem::setPromoPrice); attributeSetterBiConsumers.put( "promoPriceWithTaxAmount", (BiConsumer) CommerceOrderItem::setPromoPriceWithTaxAmount); attributeSetterBiConsumers.put( "quantity", (BiConsumer) CommerceOrderItem::setQuantity); attributeSetterBiConsumers.put( "replacedCPInstanceId", (BiConsumer) CommerceOrderItem::setReplacedCPInstanceId); attributeSetterBiConsumers.put( "replacedSku", (BiConsumer) CommerceOrderItem::setReplacedSku); attributeSetterBiConsumers.put( "requestedDeliveryDate", (BiConsumer) CommerceOrderItem::setRequestedDeliveryDate); attributeSetterBiConsumers.put( "shipSeparately", (BiConsumer) CommerceOrderItem::setShipSeparately); attributeSetterBiConsumers.put( "shippable", (BiConsumer) CommerceOrderItem::setShippable); attributeSetterBiConsumers.put( "shippedQuantity", (BiConsumer) CommerceOrderItem::setShippedQuantity); attributeSetterBiConsumers.put( "shippingExtraPrice", (BiConsumer) CommerceOrderItem::setShippingExtraPrice); attributeSetterBiConsumers.put( "sku", (BiConsumer) CommerceOrderItem::setSku); attributeSetterBiConsumers.put( "subscription", (BiConsumer) CommerceOrderItem::setSubscription); attributeSetterBiConsumers.put( "subscriptionLength", (BiConsumer) CommerceOrderItem::setSubscriptionLength); attributeSetterBiConsumers.put( "subscriptionType", (BiConsumer) CommerceOrderItem::setSubscriptionType); attributeSetterBiConsumers.put( "subscriptionTypeSettings", (BiConsumer) CommerceOrderItem::setSubscriptionTypeSettings); attributeSetterBiConsumers.put( "unitOfMeasureIncrementalOrderQuantity", (BiConsumer) CommerceOrderItem:: setUnitOfMeasureIncrementalOrderQuantity); attributeSetterBiConsumers.put( "unitOfMeasureKey", (BiConsumer) CommerceOrderItem::setUnitOfMeasureKey); attributeSetterBiConsumers.put( "unitPrice", (BiConsumer) CommerceOrderItem::setUnitPrice); attributeSetterBiConsumers.put( "unitPriceWithTaxAmount", (BiConsumer) CommerceOrderItem::setUnitPriceWithTaxAmount); attributeSetterBiConsumers.put( "weight", (BiConsumer) CommerceOrderItem::setWeight); attributeSetterBiConsumers.put( "width", (BiConsumer) CommerceOrderItem::setWidth); _attributeSetterBiConsumers = Collections.unmodifiableMap( (Map)attributeSetterBiConsumers); } } @JSON @Override public long getMvccVersion() { return _mvccVersion; } @Override public void setMvccVersion(long mvccVersion) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _mvccVersion = mvccVersion; } @JSON @Override public String getUuid() { if (_uuid == null) { return ""; } else { return _uuid; } } @Override public void setUuid(String uuid) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _uuid = uuid; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public String getOriginalUuid() { return getColumnOriginalValue("uuid_"); } @JSON @Override public String getExternalReferenceCode() { if (_externalReferenceCode == null) { return ""; } else { return _externalReferenceCode; } } @Override public void setExternalReferenceCode(String externalReferenceCode) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _externalReferenceCode = externalReferenceCode; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public String getOriginalExternalReferenceCode() { return getColumnOriginalValue("externalReferenceCode"); } @JSON @Override public long getCommerceOrderItemId() { return _commerceOrderItemId; } @Override public void setCommerceOrderItemId(long commerceOrderItemId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _commerceOrderItemId = commerceOrderItemId; } @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 getCommerceInventoryBookedQuantityId() { return _commerceInventoryBookedQuantityId; } @Override public void setCommerceInventoryBookedQuantityId( long commerceInventoryBookedQuantityId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _commerceInventoryBookedQuantityId = commerceInventoryBookedQuantityId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalCommerceInventoryBookedQuantityId() { return GetterUtil.getLong( this.getColumnOriginalValue("CIBookedQuantityId")); } @JSON @Override public long getCommerceOrderId() { return _commerceOrderId; } @Override public void setCommerceOrderId(long commerceOrderId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _commerceOrderId = commerceOrderId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalCommerceOrderId() { return GetterUtil.getLong( this.getColumnOriginalValue("commerceOrderId")); } @JSON @Override public long getCommercePriceListId() { return _commercePriceListId; } @Override public void setCommercePriceListId(long commercePriceListId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _commercePriceListId = commercePriceListId; } @JSON @Override public long getCPInstanceId() { return _CPInstanceId; } @Override public void setCPInstanceId(long CPInstanceId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _CPInstanceId = CPInstanceId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalCPInstanceId() { return GetterUtil.getLong( this.getColumnOriginalValue("CPInstanceId")); } @JSON @Override public long getCPMeasurementUnitId() { return _CPMeasurementUnitId; } @Override public void setCPMeasurementUnitId(long CPMeasurementUnitId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _CPMeasurementUnitId = CPMeasurementUnitId; } @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 getCustomerCommerceOrderItemId() { return _customerCommerceOrderItemId; } @Override public void setCustomerCommerceOrderItemId( long customerCommerceOrderItemId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _customerCommerceOrderItemId = customerCommerceOrderItemId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalCustomerCommerceOrderItemId() { return GetterUtil.getLong( this.getColumnOriginalValue("customerCommerceOrderItemId")); } @JSON @Override public long getParentCommerceOrderItemId() { return _parentCommerceOrderItemId; } @Override public void setParentCommerceOrderItemId(long parentCommerceOrderItemId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _parentCommerceOrderItemId = parentCommerceOrderItemId; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public long getOriginalParentCommerceOrderItemId() { return GetterUtil.getLong( this.getColumnOriginalValue("parentCommerceOrderItemId")); } @JSON @Override public long getShippingAddressId() { return _shippingAddressId; } @Override public void setShippingAddressId(long shippingAddressId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _shippingAddressId = shippingAddressId; } @JSON @Override public String getDeliveryGroupName() { if (_deliveryGroupName == null) { return ""; } else { return _deliveryGroupName; } } @Override public void setDeliveryGroupName(String deliveryGroupName) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _deliveryGroupName = deliveryGroupName; } @JSON @Override public long getDeliveryMaxSubscriptionCycles() { return _deliveryMaxSubscriptionCycles; } @Override public void setDeliveryMaxSubscriptionCycles( long deliveryMaxSubscriptionCycles) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _deliveryMaxSubscriptionCycles = deliveryMaxSubscriptionCycles; } @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 double getDepth() { return _depth; } @Override public void setDepth(double depth) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _depth = depth; } @JSON @Override public BigDecimal getDiscountAmount() { return _discountAmount; } @Override public void setDiscountAmount(BigDecimal discountAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountAmount = discountAmount; } @JSON @Override public boolean getDiscountManuallyAdjusted() { return _discountManuallyAdjusted; } @JSON @Override public boolean isDiscountManuallyAdjusted() { return _discountManuallyAdjusted; } @Override public void setDiscountManuallyAdjusted(boolean discountManuallyAdjusted) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountManuallyAdjusted = discountManuallyAdjusted; } @JSON @Override public BigDecimal getDiscountPercentageLevel1() { return _discountPercentageLevel1; } @Override public void setDiscountPercentageLevel1( BigDecimal discountPercentageLevel1) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel1 = discountPercentageLevel1; } @JSON @Override public BigDecimal getDiscountPercentageLevel2() { return _discountPercentageLevel2; } @Override public void setDiscountPercentageLevel2( BigDecimal discountPercentageLevel2) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel2 = discountPercentageLevel2; } @JSON @Override public BigDecimal getDiscountPercentageLevel3() { return _discountPercentageLevel3; } @Override public void setDiscountPercentageLevel3( BigDecimal discountPercentageLevel3) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel3 = discountPercentageLevel3; } @JSON @Override public BigDecimal getDiscountPercentageLevel4() { return _discountPercentageLevel4; } @Override public void setDiscountPercentageLevel4( BigDecimal discountPercentageLevel4) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel4 = discountPercentageLevel4; } @JSON @Override public BigDecimal getDiscountPercentageLevel1WithTaxAmount() { return _discountPercentageLevel1WithTaxAmount; } @Override public void setDiscountPercentageLevel1WithTaxAmount( BigDecimal discountPercentageLevel1WithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel1WithTaxAmount = discountPercentageLevel1WithTaxAmount; } @JSON @Override public BigDecimal getDiscountPercentageLevel2WithTaxAmount() { return _discountPercentageLevel2WithTaxAmount; } @Override public void setDiscountPercentageLevel2WithTaxAmount( BigDecimal discountPercentageLevel2WithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel2WithTaxAmount = discountPercentageLevel2WithTaxAmount; } @JSON @Override public BigDecimal getDiscountPercentageLevel3WithTaxAmount() { return _discountPercentageLevel3WithTaxAmount; } @Override public void setDiscountPercentageLevel3WithTaxAmount( BigDecimal discountPercentageLevel3WithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel3WithTaxAmount = discountPercentageLevel3WithTaxAmount; } @JSON @Override public BigDecimal getDiscountPercentageLevel4WithTaxAmount() { return _discountPercentageLevel4WithTaxAmount; } @Override public void setDiscountPercentageLevel4WithTaxAmount( BigDecimal discountPercentageLevel4WithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountPercentageLevel4WithTaxAmount = discountPercentageLevel4WithTaxAmount; } @JSON @Override public BigDecimal getDiscountWithTaxAmount() { return _discountWithTaxAmount; } @Override public void setDiscountWithTaxAmount(BigDecimal discountWithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _discountWithTaxAmount = discountWithTaxAmount; } @JSON @Override public BigDecimal getFinalPrice() { return _finalPrice; } @Override public void setFinalPrice(BigDecimal finalPrice) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _finalPrice = finalPrice; } @JSON @Override public BigDecimal getFinalPriceWithTaxAmount() { return _finalPriceWithTaxAmount; } @Override public void setFinalPriceWithTaxAmount(BigDecimal finalPriceWithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _finalPriceWithTaxAmount = finalPriceWithTaxAmount; } @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 double getHeight() { return _height; } @Override public void setHeight(double height) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _height = height; } @JSON @Override public String getJson() { if (_json == null) { return ""; } else { return _json; } } @Override public void setJson(String json) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _json = json; } @JSON @Override public boolean getManuallyAdjusted() { return _manuallyAdjusted; } @JSON @Override public boolean isManuallyAdjusted() { return _manuallyAdjusted; } @Override public void setManuallyAdjusted(boolean manuallyAdjusted) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _manuallyAdjusted = manuallyAdjusted; } @JSON @Override public long getMaxSubscriptionCycles() { return _maxSubscriptionCycles; } @Override public void setMaxSubscriptionCycles(long maxSubscriptionCycles) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _maxSubscriptionCycles = maxSubscriptionCycles; } @JSON @Override public String getName() { if (_name == null) { return ""; } else { return _name; } } @Override public String getName(Locale locale) { String languageId = LocaleUtil.toLanguageId(locale); return getName(languageId); } @Override public String getName(Locale locale, boolean useDefault) { String languageId = LocaleUtil.toLanguageId(locale); return getName(languageId, useDefault); } @Override public String getName(String languageId) { return LocalizationUtil.getLocalization(getName(), languageId); } @Override public String getName(String languageId, boolean useDefault) { return LocalizationUtil.getLocalization( getName(), languageId, useDefault); } @Override public String getNameCurrentLanguageId() { return _nameCurrentLanguageId; } @JSON @Override public String getNameCurrentValue() { Locale locale = getLocale(_nameCurrentLanguageId); return getName(locale); } @Override public Map getNameMap() { return LocalizationUtil.getLocalizationMap(getName()); } @Override public void setName(String name) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _name = name; } @Override public void setName(String name, Locale locale) { setName(name, locale, LocaleUtil.getSiteDefault()); } @Override public void setName(String name, Locale locale, Locale defaultLocale) { String languageId = LocaleUtil.toLanguageId(locale); String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale); if (Validator.isNotNull(name)) { setName( LocalizationUtil.updateLocalization( getName(), "Name", name, languageId, defaultLanguageId)); } else { setName( LocalizationUtil.removeLocalization( getName(), "Name", languageId)); } } @Override public void setNameCurrentLanguageId(String languageId) { _nameCurrentLanguageId = languageId; } @Override public void setNameMap(Map nameMap) { setNameMap(nameMap, LocaleUtil.getSiteDefault()); } @Override public void setNameMap(Map nameMap, Locale defaultLocale) { if (nameMap == null) { return; } setName( LocalizationUtil.updateLocalization( nameMap, getName(), "Name", LocaleUtil.toLanguageId(defaultLocale))); } @JSON @Override public boolean getPriceManuallyAdjusted() { return _priceManuallyAdjusted; } @JSON @Override public boolean isPriceManuallyAdjusted() { return _priceManuallyAdjusted; } @Override public void setPriceManuallyAdjusted(boolean priceManuallyAdjusted) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _priceManuallyAdjusted = priceManuallyAdjusted; } @JSON @Override public boolean getPriceOnApplication() { return _priceOnApplication; } @JSON @Override public boolean isPriceOnApplication() { return _priceOnApplication; } @Override public void setPriceOnApplication(boolean priceOnApplication) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _priceOnApplication = priceOnApplication; } @JSON @Override public String getPrintedNote() { if (_printedNote == null) { return ""; } else { return _printedNote; } } @Override public void setPrintedNote(String printedNote) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _printedNote = printedNote; } @JSON @Override public BigDecimal getPromoPrice() { return _promoPrice; } @Override public void setPromoPrice(BigDecimal promoPrice) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _promoPrice = promoPrice; } @JSON @Override public BigDecimal getPromoPriceWithTaxAmount() { return _promoPriceWithTaxAmount; } @Override public void setPromoPriceWithTaxAmount(BigDecimal promoPriceWithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _promoPriceWithTaxAmount = promoPriceWithTaxAmount; } @JSON @Override public BigDecimal getQuantity() { return _quantity; } @Override public void setQuantity(BigDecimal quantity) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _quantity = quantity; } @JSON @Override public long getReplacedCPInstanceId() { return _replacedCPInstanceId; } @Override public void setReplacedCPInstanceId(long replacedCPInstanceId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _replacedCPInstanceId = replacedCPInstanceId; } @JSON @Override public String getReplacedSku() { if (_replacedSku == null) { return ""; } else { return _replacedSku; } } @Override public void setReplacedSku(String replacedSku) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _replacedSku = replacedSku; } @JSON @Override public Date getRequestedDeliveryDate() { return _requestedDeliveryDate; } @Override public void setRequestedDeliveryDate(Date requestedDeliveryDate) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _requestedDeliveryDate = requestedDeliveryDate; } @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 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 BigDecimal getShippedQuantity() { return _shippedQuantity; } @Override public void setShippedQuantity(BigDecimal shippedQuantity) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _shippedQuantity = shippedQuantity; } @JSON @Override public double getShippingExtraPrice() { return _shippingExtraPrice; } @Override public void setShippingExtraPrice(double shippingExtraPrice) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _shippingExtraPrice = shippingExtraPrice; } @JSON @Override public String getSku() { if (_sku == null) { return ""; } else { return _sku; } } @Override public void setSku(String sku) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _sku = sku; } @JSON @Override public boolean getSubscription() { return _subscription; } @JSON @Override public boolean isSubscription() { return _subscription; } @Override public void setSubscription(boolean subscription) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _subscription = subscription; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public boolean getOriginalSubscription() { return GetterUtil.getBoolean( this.getColumnOriginalValue("subscription")); } @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 BigDecimal getUnitOfMeasureIncrementalOrderQuantity() { return _unitOfMeasureIncrementalOrderQuantity; } @Override public void setUnitOfMeasureIncrementalOrderQuantity( BigDecimal unitOfMeasureIncrementalOrderQuantity) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _unitOfMeasureIncrementalOrderQuantity = unitOfMeasureIncrementalOrderQuantity; } @JSON @Override public String getUnitOfMeasureKey() { if (_unitOfMeasureKey == null) { return ""; } else { return _unitOfMeasureKey; } } @Override public void setUnitOfMeasureKey(String unitOfMeasureKey) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _unitOfMeasureKey = unitOfMeasureKey; } @JSON @Override public BigDecimal getUnitPrice() { return _unitPrice; } @Override public void setUnitPrice(BigDecimal unitPrice) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _unitPrice = unitPrice; } @JSON @Override public BigDecimal getUnitPriceWithTaxAmount() { return _unitPriceWithTaxAmount; } @Override public void setUnitPriceWithTaxAmount(BigDecimal unitPriceWithTaxAmount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _unitPriceWithTaxAmount = unitPriceWithTaxAmount; } @JSON @Override public double getWeight() { return _weight; } @Override public void setWeight(double weight) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _weight = weight; } @JSON @Override public double getWidth() { return _width; } @Override public void setWidth(double width) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _width = width; } @Override public StagedModelType getStagedModelType() { return new StagedModelType( PortalUtil.getClassNameId(CommerceOrderItem.class.getName())); } @Override public ExpandoBridge getExpandoBridge() { return ExpandoBridgeFactoryUtil.getExpandoBridge( getCompanyId(), CommerceOrderItem.class.getName(), getPrimaryKey()); } @Override public void setExpandoBridgeAttributes(ServiceContext serviceContext) { ExpandoBridge expandoBridge = getExpandoBridge(); expandoBridge.setAttributes(serviceContext); } @Override public String[] getAvailableLanguageIds() { Set availableLanguageIds = new TreeSet(); Map nameMap = getNameMap(); for (Map.Entry entry : nameMap.entrySet()) { Locale locale = entry.getKey(); String value = entry.getValue(); if (Validator.isNotNull(value)) { availableLanguageIds.add(LocaleUtil.toLanguageId(locale)); } } return availableLanguageIds.toArray( new String[availableLanguageIds.size()]); } @Override public String getDefaultLanguageId() { String xml = getName(); if (xml == null) { return ""; } Locale defaultLocale = LocaleUtil.getSiteDefault(); return LocalizationUtil.getDefaultLanguageId(xml, defaultLocale); } @Override public void prepareLocalizedFieldsForImport() throws LocaleException { Locale defaultLocale = LocaleUtil.fromLanguageId( getDefaultLanguageId()); Locale[] availableLocales = LocaleUtil.fromLanguageIds( getAvailableLanguageIds()); Locale defaultImportLocale = LocalizationUtil.getDefaultImportLocale( CommerceOrderItem.class.getName(), getPrimaryKey(), defaultLocale, availableLocales); prepareLocalizedFieldsForImport(defaultImportLocale); } @Override @SuppressWarnings("unused") public void prepareLocalizedFieldsForImport(Locale defaultImportLocale) throws LocaleException { Locale defaultLocale = LocaleUtil.getSiteDefault(); String modelDefaultLanguageId = getDefaultLanguageId(); String name = getName(defaultLocale); if (Validator.isNull(name)) { setName(getName(modelDefaultLanguageId), defaultLocale); } else { setName(getName(defaultLocale), defaultLocale, defaultLocale); } } @Override public CommerceOrderItem toEscapedModel() { if (_escapedModel == null) { Function escapedModelProxyProviderFunction = EscapedModelProxyProviderFunctionHolder. _escapedModelProxyProviderFunction; _escapedModel = escapedModelProxyProviderFunction.apply( new AutoEscapeBeanHandler(this)); } return _escapedModel; } @Override public Object clone() { CommerceOrderItemImpl commerceOrderItemImpl = new CommerceOrderItemImpl(); commerceOrderItemImpl.setMvccVersion(getMvccVersion()); commerceOrderItemImpl.setUuid(getUuid()); commerceOrderItemImpl.setExternalReferenceCode( getExternalReferenceCode()); commerceOrderItemImpl.setCommerceOrderItemId(getCommerceOrderItemId()); commerceOrderItemImpl.setGroupId(getGroupId()); commerceOrderItemImpl.setCompanyId(getCompanyId()); commerceOrderItemImpl.setUserId(getUserId()); commerceOrderItemImpl.setUserName(getUserName()); commerceOrderItemImpl.setCreateDate(getCreateDate()); commerceOrderItemImpl.setModifiedDate(getModifiedDate()); commerceOrderItemImpl.setCommerceInventoryBookedQuantityId( getCommerceInventoryBookedQuantityId()); commerceOrderItemImpl.setCommerceOrderId(getCommerceOrderId()); commerceOrderItemImpl.setCommercePriceListId(getCommercePriceListId()); commerceOrderItemImpl.setCPInstanceId(getCPInstanceId()); commerceOrderItemImpl.setCPMeasurementUnitId(getCPMeasurementUnitId()); commerceOrderItemImpl.setCProductId(getCProductId()); commerceOrderItemImpl.setCustomerCommerceOrderItemId( getCustomerCommerceOrderItemId()); commerceOrderItemImpl.setParentCommerceOrderItemId( getParentCommerceOrderItemId()); commerceOrderItemImpl.setShippingAddressId(getShippingAddressId()); commerceOrderItemImpl.setDeliveryGroupName(getDeliveryGroupName()); commerceOrderItemImpl.setDeliveryMaxSubscriptionCycles( getDeliveryMaxSubscriptionCycles()); commerceOrderItemImpl.setDeliverySubscriptionLength( getDeliverySubscriptionLength()); commerceOrderItemImpl.setDeliverySubscriptionType( getDeliverySubscriptionType()); commerceOrderItemImpl.setDeliverySubscriptionTypeSettings( getDeliverySubscriptionTypeSettings()); commerceOrderItemImpl.setDepth(getDepth()); commerceOrderItemImpl.setDiscountAmount(getDiscountAmount()); commerceOrderItemImpl.setDiscountManuallyAdjusted( isDiscountManuallyAdjusted()); commerceOrderItemImpl.setDiscountPercentageLevel1( getDiscountPercentageLevel1()); commerceOrderItemImpl.setDiscountPercentageLevel2( getDiscountPercentageLevel2()); commerceOrderItemImpl.setDiscountPercentageLevel3( getDiscountPercentageLevel3()); commerceOrderItemImpl.setDiscountPercentageLevel4( getDiscountPercentageLevel4()); commerceOrderItemImpl.setDiscountPercentageLevel1WithTaxAmount( getDiscountPercentageLevel1WithTaxAmount()); commerceOrderItemImpl.setDiscountPercentageLevel2WithTaxAmount( getDiscountPercentageLevel2WithTaxAmount()); commerceOrderItemImpl.setDiscountPercentageLevel3WithTaxAmount( getDiscountPercentageLevel3WithTaxAmount()); commerceOrderItemImpl.setDiscountPercentageLevel4WithTaxAmount( getDiscountPercentageLevel4WithTaxAmount()); commerceOrderItemImpl.setDiscountWithTaxAmount( getDiscountWithTaxAmount()); commerceOrderItemImpl.setFinalPrice(getFinalPrice()); commerceOrderItemImpl.setFinalPriceWithTaxAmount( getFinalPriceWithTaxAmount()); commerceOrderItemImpl.setFreeShipping(isFreeShipping()); commerceOrderItemImpl.setHeight(getHeight()); commerceOrderItemImpl.setJson(getJson()); commerceOrderItemImpl.setManuallyAdjusted(isManuallyAdjusted()); commerceOrderItemImpl.setMaxSubscriptionCycles( getMaxSubscriptionCycles()); commerceOrderItemImpl.setName(getName()); commerceOrderItemImpl.setPriceManuallyAdjusted( isPriceManuallyAdjusted()); commerceOrderItemImpl.setPriceOnApplication(isPriceOnApplication()); commerceOrderItemImpl.setPrintedNote(getPrintedNote()); commerceOrderItemImpl.setPromoPrice(getPromoPrice()); commerceOrderItemImpl.setPromoPriceWithTaxAmount( getPromoPriceWithTaxAmount()); commerceOrderItemImpl.setQuantity(getQuantity()); commerceOrderItemImpl.setReplacedCPInstanceId( getReplacedCPInstanceId()); commerceOrderItemImpl.setReplacedSku(getReplacedSku()); commerceOrderItemImpl.setRequestedDeliveryDate( getRequestedDeliveryDate()); commerceOrderItemImpl.setShipSeparately(isShipSeparately()); commerceOrderItemImpl.setShippable(isShippable()); commerceOrderItemImpl.setShippedQuantity(getShippedQuantity()); commerceOrderItemImpl.setShippingExtraPrice(getShippingExtraPrice()); commerceOrderItemImpl.setSku(getSku()); commerceOrderItemImpl.setSubscription(isSubscription()); commerceOrderItemImpl.setSubscriptionLength(getSubscriptionLength()); commerceOrderItemImpl.setSubscriptionType(getSubscriptionType()); commerceOrderItemImpl.setSubscriptionTypeSettings( getSubscriptionTypeSettings()); commerceOrderItemImpl.setUnitOfMeasureIncrementalOrderQuantity( getUnitOfMeasureIncrementalOrderQuantity()); commerceOrderItemImpl.setUnitOfMeasureKey(getUnitOfMeasureKey()); commerceOrderItemImpl.setUnitPrice(getUnitPrice()); commerceOrderItemImpl.setUnitPriceWithTaxAmount( getUnitPriceWithTaxAmount()); commerceOrderItemImpl.setWeight(getWeight()); commerceOrderItemImpl.setWidth(getWidth()); commerceOrderItemImpl.resetOriginalValues(); return commerceOrderItemImpl; } @Override public CommerceOrderItem cloneWithOriginalValues() { CommerceOrderItemImpl commerceOrderItemImpl = new CommerceOrderItemImpl(); commerceOrderItemImpl.setMvccVersion( this.getColumnOriginalValue("mvccVersion")); commerceOrderItemImpl.setUuid( this.getColumnOriginalValue("uuid_")); commerceOrderItemImpl.setExternalReferenceCode( this.getColumnOriginalValue("externalReferenceCode")); commerceOrderItemImpl.setCommerceOrderItemId( this.getColumnOriginalValue("commerceOrderItemId")); commerceOrderItemImpl.setGroupId( this.getColumnOriginalValue("groupId")); commerceOrderItemImpl.setCompanyId( this.getColumnOriginalValue("companyId")); commerceOrderItemImpl.setUserId( this.getColumnOriginalValue("userId")); commerceOrderItemImpl.setUserName( this.getColumnOriginalValue("userName")); commerceOrderItemImpl.setCreateDate( this.getColumnOriginalValue("createDate")); commerceOrderItemImpl.setModifiedDate( this.getColumnOriginalValue("modifiedDate")); commerceOrderItemImpl.setCommerceInventoryBookedQuantityId( this.getColumnOriginalValue("CIBookedQuantityId")); commerceOrderItemImpl.setCommerceOrderId( this.getColumnOriginalValue("commerceOrderId")); commerceOrderItemImpl.setCommercePriceListId( this.getColumnOriginalValue("commercePriceListId")); commerceOrderItemImpl.setCPInstanceId( this.getColumnOriginalValue("CPInstanceId")); commerceOrderItemImpl.setCPMeasurementUnitId( this.getColumnOriginalValue("CPMeasurementUnitId")); commerceOrderItemImpl.setCProductId( this.getColumnOriginalValue("CProductId")); commerceOrderItemImpl.setCustomerCommerceOrderItemId( this.getColumnOriginalValue("customerCommerceOrderItemId")); commerceOrderItemImpl.setParentCommerceOrderItemId( this.getColumnOriginalValue("parentCommerceOrderItemId")); commerceOrderItemImpl.setShippingAddressId( this.getColumnOriginalValue("shippingAddressId")); commerceOrderItemImpl.setDeliveryGroupName( this.getColumnOriginalValue("deliveryGroupName")); commerceOrderItemImpl.setDeliveryMaxSubscriptionCycles( this.getColumnOriginalValue("deliveryMaxSubscriptionCycles")); commerceOrderItemImpl.setDeliverySubscriptionLength( this.getColumnOriginalValue("deliverySubscriptionLength")); commerceOrderItemImpl.setDeliverySubscriptionType( this.getColumnOriginalValue("deliverySubscriptionType")); commerceOrderItemImpl.setDeliverySubscriptionTypeSettings( this.getColumnOriginalValue("deliverySubTypeSettings")); commerceOrderItemImpl.setDepth( this.getColumnOriginalValue("depth")); commerceOrderItemImpl.setDiscountAmount( this.getColumnOriginalValue("discountAmount")); commerceOrderItemImpl.setDiscountManuallyAdjusted( this.getColumnOriginalValue("discountManuallyAdjusted")); commerceOrderItemImpl.setDiscountPercentageLevel1( this.getColumnOriginalValue( "discountPercentageLevel1")); commerceOrderItemImpl.setDiscountPercentageLevel2( this.getColumnOriginalValue( "discountPercentageLevel2")); commerceOrderItemImpl.setDiscountPercentageLevel3( this.getColumnOriginalValue( "discountPercentageLevel3")); commerceOrderItemImpl.setDiscountPercentageLevel4( this.getColumnOriginalValue( "discountPercentageLevel4")); commerceOrderItemImpl.setDiscountPercentageLevel1WithTaxAmount( this.getColumnOriginalValue( "discountPctLevel1WithTaxAmount")); commerceOrderItemImpl.setDiscountPercentageLevel2WithTaxAmount( this.getColumnOriginalValue( "discountPctLevel2WithTaxAmount")); commerceOrderItemImpl.setDiscountPercentageLevel3WithTaxAmount( this.getColumnOriginalValue( "discountPctLevel3WithTaxAmount")); commerceOrderItemImpl.setDiscountPercentageLevel4WithTaxAmount( this.getColumnOriginalValue( "discountPctLevel4WithTaxAmount")); commerceOrderItemImpl.setDiscountWithTaxAmount( this.getColumnOriginalValue("discountWithTaxAmount")); commerceOrderItemImpl.setFinalPrice( this.getColumnOriginalValue("finalPrice")); commerceOrderItemImpl.setFinalPriceWithTaxAmount( this.getColumnOriginalValue("finalPriceWithTaxAmount")); commerceOrderItemImpl.setFreeShipping( this.getColumnOriginalValue("freeShipping")); commerceOrderItemImpl.setHeight( this.getColumnOriginalValue("height")); commerceOrderItemImpl.setJson( this.getColumnOriginalValue("json")); commerceOrderItemImpl.setManuallyAdjusted( this.getColumnOriginalValue("manuallyAdjusted")); commerceOrderItemImpl.setMaxSubscriptionCycles( this.getColumnOriginalValue("maxSubscriptionCycles")); commerceOrderItemImpl.setName( this.getColumnOriginalValue("name")); commerceOrderItemImpl.setPriceManuallyAdjusted( this.getColumnOriginalValue("priceManuallyAdjusted")); commerceOrderItemImpl.setPriceOnApplication( this.getColumnOriginalValue("priceOnApplication")); commerceOrderItemImpl.setPrintedNote( this.getColumnOriginalValue("printedNote")); commerceOrderItemImpl.setPromoPrice( this.getColumnOriginalValue("promoPrice")); commerceOrderItemImpl.setPromoPriceWithTaxAmount( this.getColumnOriginalValue("promoPriceWithTaxAmount")); commerceOrderItemImpl.setQuantity( this.getColumnOriginalValue("quantity")); commerceOrderItemImpl.setReplacedCPInstanceId( this.getColumnOriginalValue("replacedCPInstanceId")); commerceOrderItemImpl.setReplacedSku( this.getColumnOriginalValue("replacedSku")); commerceOrderItemImpl.setRequestedDeliveryDate( this.getColumnOriginalValue("requestedDeliveryDate")); commerceOrderItemImpl.setShipSeparately( this.getColumnOriginalValue("shipSeparately")); commerceOrderItemImpl.setShippable( this.getColumnOriginalValue("shippable")); commerceOrderItemImpl.setShippedQuantity( this.getColumnOriginalValue("shippedQuantity")); commerceOrderItemImpl.setShippingExtraPrice( this.getColumnOriginalValue("shippingExtraPrice")); commerceOrderItemImpl.setSku( this.getColumnOriginalValue("sku")); commerceOrderItemImpl.setSubscription( this.getColumnOriginalValue("subscription")); commerceOrderItemImpl.setSubscriptionLength( this.getColumnOriginalValue("subscriptionLength")); commerceOrderItemImpl.setSubscriptionType( this.getColumnOriginalValue("subscriptionType")); commerceOrderItemImpl.setSubscriptionTypeSettings( this.getColumnOriginalValue("subscriptionTypeSettings")); commerceOrderItemImpl.setUnitOfMeasureIncrementalOrderQuantity( this.getColumnOriginalValue( "UOMIncrementalOrderQuantity")); commerceOrderItemImpl.setUnitOfMeasureKey( this.getColumnOriginalValue("unitOfMeasureKey")); commerceOrderItemImpl.setUnitPrice( this.getColumnOriginalValue("unitPrice")); commerceOrderItemImpl.setUnitPriceWithTaxAmount( this.getColumnOriginalValue("unitPriceWithTaxAmount")); commerceOrderItemImpl.setWeight( this.getColumnOriginalValue("weight")); commerceOrderItemImpl.setWidth( this.getColumnOriginalValue("width")); return commerceOrderItemImpl; } @Override public int compareTo(CommerceOrderItem commerceOrderItem) { int value = 0; value = DateUtil.compareTo( getCreateDate(), commerceOrderItem.getCreateDate()); if (value != 0) { return value; } return 0; } @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof CommerceOrderItem)) { return false; } CommerceOrderItem commerceOrderItem = (CommerceOrderItem)object; long primaryKey = commerceOrderItem.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; } @Override public CacheModel toCacheModel() { CommerceOrderItemCacheModel commerceOrderItemCacheModel = new CommerceOrderItemCacheModel(); commerceOrderItemCacheModel.mvccVersion = getMvccVersion(); commerceOrderItemCacheModel.uuid = getUuid(); String uuid = commerceOrderItemCacheModel.uuid; if ((uuid != null) && (uuid.length() == 0)) { commerceOrderItemCacheModel.uuid = null; } commerceOrderItemCacheModel.externalReferenceCode = getExternalReferenceCode(); String externalReferenceCode = commerceOrderItemCacheModel.externalReferenceCode; if ((externalReferenceCode != null) && (externalReferenceCode.length() == 0)) { commerceOrderItemCacheModel.externalReferenceCode = null; } commerceOrderItemCacheModel.commerceOrderItemId = getCommerceOrderItemId(); commerceOrderItemCacheModel.groupId = getGroupId(); commerceOrderItemCacheModel.companyId = getCompanyId(); commerceOrderItemCacheModel.userId = getUserId(); commerceOrderItemCacheModel.userName = getUserName(); String userName = commerceOrderItemCacheModel.userName; if ((userName != null) && (userName.length() == 0)) { commerceOrderItemCacheModel.userName = null; } Date createDate = getCreateDate(); if (createDate != null) { commerceOrderItemCacheModel.createDate = createDate.getTime(); } else { commerceOrderItemCacheModel.createDate = Long.MIN_VALUE; } Date modifiedDate = getModifiedDate(); if (modifiedDate != null) { commerceOrderItemCacheModel.modifiedDate = modifiedDate.getTime(); } else { commerceOrderItemCacheModel.modifiedDate = Long.MIN_VALUE; } commerceOrderItemCacheModel.commerceInventoryBookedQuantityId = getCommerceInventoryBookedQuantityId(); commerceOrderItemCacheModel.commerceOrderId = getCommerceOrderId(); commerceOrderItemCacheModel.commercePriceListId = getCommercePriceListId(); commerceOrderItemCacheModel.CPInstanceId = getCPInstanceId(); commerceOrderItemCacheModel.CPMeasurementUnitId = getCPMeasurementUnitId(); commerceOrderItemCacheModel.CProductId = getCProductId(); commerceOrderItemCacheModel.customerCommerceOrderItemId = getCustomerCommerceOrderItemId(); commerceOrderItemCacheModel.parentCommerceOrderItemId = getParentCommerceOrderItemId(); commerceOrderItemCacheModel.shippingAddressId = getShippingAddressId(); commerceOrderItemCacheModel.deliveryGroupName = getDeliveryGroupName(); String deliveryGroupName = commerceOrderItemCacheModel.deliveryGroupName; if ((deliveryGroupName != null) && (deliveryGroupName.length() == 0)) { commerceOrderItemCacheModel.deliveryGroupName = null; } commerceOrderItemCacheModel.deliveryMaxSubscriptionCycles = getDeliveryMaxSubscriptionCycles(); commerceOrderItemCacheModel.deliverySubscriptionLength = getDeliverySubscriptionLength(); commerceOrderItemCacheModel.deliverySubscriptionType = getDeliverySubscriptionType(); String deliverySubscriptionType = commerceOrderItemCacheModel.deliverySubscriptionType; if ((deliverySubscriptionType != null) && (deliverySubscriptionType.length() == 0)) { commerceOrderItemCacheModel.deliverySubscriptionType = null; } commerceOrderItemCacheModel.deliverySubscriptionTypeSettings = getDeliverySubscriptionTypeSettings(); String deliverySubscriptionTypeSettings = commerceOrderItemCacheModel.deliverySubscriptionTypeSettings; if ((deliverySubscriptionTypeSettings != null) && (deliverySubscriptionTypeSettings.length() == 0)) { commerceOrderItemCacheModel.deliverySubscriptionTypeSettings = null; } commerceOrderItemCacheModel.depth = getDepth(); commerceOrderItemCacheModel.discountAmount = getDiscountAmount(); commerceOrderItemCacheModel.discountManuallyAdjusted = isDiscountManuallyAdjusted(); commerceOrderItemCacheModel.discountPercentageLevel1 = getDiscountPercentageLevel1(); commerceOrderItemCacheModel.discountPercentageLevel2 = getDiscountPercentageLevel2(); commerceOrderItemCacheModel.discountPercentageLevel3 = getDiscountPercentageLevel3(); commerceOrderItemCacheModel.discountPercentageLevel4 = getDiscountPercentageLevel4(); commerceOrderItemCacheModel.discountPercentageLevel1WithTaxAmount = getDiscountPercentageLevel1WithTaxAmount(); commerceOrderItemCacheModel.discountPercentageLevel2WithTaxAmount = getDiscountPercentageLevel2WithTaxAmount(); commerceOrderItemCacheModel.discountPercentageLevel3WithTaxAmount = getDiscountPercentageLevel3WithTaxAmount(); commerceOrderItemCacheModel.discountPercentageLevel4WithTaxAmount = getDiscountPercentageLevel4WithTaxAmount(); commerceOrderItemCacheModel.discountWithTaxAmount = getDiscountWithTaxAmount(); commerceOrderItemCacheModel.finalPrice = getFinalPrice(); commerceOrderItemCacheModel.finalPriceWithTaxAmount = getFinalPriceWithTaxAmount(); commerceOrderItemCacheModel.freeShipping = isFreeShipping(); commerceOrderItemCacheModel.height = getHeight(); commerceOrderItemCacheModel.json = getJson(); String json = commerceOrderItemCacheModel.json; if ((json != null) && (json.length() == 0)) { commerceOrderItemCacheModel.json = null; } commerceOrderItemCacheModel.manuallyAdjusted = isManuallyAdjusted(); commerceOrderItemCacheModel.maxSubscriptionCycles = getMaxSubscriptionCycles(); commerceOrderItemCacheModel.name = getName(); String name = commerceOrderItemCacheModel.name; if ((name != null) && (name.length() == 0)) { commerceOrderItemCacheModel.name = null; } commerceOrderItemCacheModel.priceManuallyAdjusted = isPriceManuallyAdjusted(); commerceOrderItemCacheModel.priceOnApplication = isPriceOnApplication(); commerceOrderItemCacheModel.printedNote = getPrintedNote(); String printedNote = commerceOrderItemCacheModel.printedNote; if ((printedNote != null) && (printedNote.length() == 0)) { commerceOrderItemCacheModel.printedNote = null; } commerceOrderItemCacheModel.promoPrice = getPromoPrice(); commerceOrderItemCacheModel.promoPriceWithTaxAmount = getPromoPriceWithTaxAmount(); commerceOrderItemCacheModel.quantity = getQuantity(); commerceOrderItemCacheModel.replacedCPInstanceId = getReplacedCPInstanceId(); commerceOrderItemCacheModel.replacedSku = getReplacedSku(); String replacedSku = commerceOrderItemCacheModel.replacedSku; if ((replacedSku != null) && (replacedSku.length() == 0)) { commerceOrderItemCacheModel.replacedSku = null; } Date requestedDeliveryDate = getRequestedDeliveryDate(); if (requestedDeliveryDate != null) { commerceOrderItemCacheModel.requestedDeliveryDate = requestedDeliveryDate.getTime(); } else { commerceOrderItemCacheModel.requestedDeliveryDate = Long.MIN_VALUE; } commerceOrderItemCacheModel.shipSeparately = isShipSeparately(); commerceOrderItemCacheModel.shippable = isShippable(); commerceOrderItemCacheModel.shippedQuantity = getShippedQuantity(); commerceOrderItemCacheModel.shippingExtraPrice = getShippingExtraPrice(); commerceOrderItemCacheModel.sku = getSku(); String sku = commerceOrderItemCacheModel.sku; if ((sku != null) && (sku.length() == 0)) { commerceOrderItemCacheModel.sku = null; } commerceOrderItemCacheModel.subscription = isSubscription(); commerceOrderItemCacheModel.subscriptionLength = getSubscriptionLength(); commerceOrderItemCacheModel.subscriptionType = getSubscriptionType(); String subscriptionType = commerceOrderItemCacheModel.subscriptionType; if ((subscriptionType != null) && (subscriptionType.length() == 0)) { commerceOrderItemCacheModel.subscriptionType = null; } commerceOrderItemCacheModel.subscriptionTypeSettings = getSubscriptionTypeSettings(); String subscriptionTypeSettings = commerceOrderItemCacheModel.subscriptionTypeSettings; if ((subscriptionTypeSettings != null) && (subscriptionTypeSettings.length() == 0)) { commerceOrderItemCacheModel.subscriptionTypeSettings = null; } commerceOrderItemCacheModel.unitOfMeasureIncrementalOrderQuantity = getUnitOfMeasureIncrementalOrderQuantity(); commerceOrderItemCacheModel.unitOfMeasureKey = getUnitOfMeasureKey(); String unitOfMeasureKey = commerceOrderItemCacheModel.unitOfMeasureKey; if ((unitOfMeasureKey != null) && (unitOfMeasureKey.length() == 0)) { commerceOrderItemCacheModel.unitOfMeasureKey = null; } commerceOrderItemCacheModel.unitPrice = getUnitPrice(); commerceOrderItemCacheModel.unitPriceWithTaxAmount = getUnitPriceWithTaxAmount(); commerceOrderItemCacheModel.weight = getWeight(); commerceOrderItemCacheModel.width = getWidth(); return commerceOrderItemCacheModel; } @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( (CommerceOrderItem)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( CommerceOrderItem.class, ModelWrapper.class); } private long _mvccVersion; private String _uuid; private String _externalReferenceCode; private long _commerceOrderItemId; private long _groupId; private long _companyId; private long _userId; private String _userName; private Date _createDate; private Date _modifiedDate; private boolean _setModifiedDate; private long _commerceInventoryBookedQuantityId; private long _commerceOrderId; private long _commercePriceListId; private long _CPInstanceId; private long _CPMeasurementUnitId; private long _CProductId; private long _customerCommerceOrderItemId; private long _parentCommerceOrderItemId; private long _shippingAddressId; private String _deliveryGroupName; private long _deliveryMaxSubscriptionCycles; private int _deliverySubscriptionLength; private String _deliverySubscriptionType; private String _deliverySubscriptionTypeSettings; private double _depth; private BigDecimal _discountAmount; private boolean _discountManuallyAdjusted; private BigDecimal _discountPercentageLevel1; private BigDecimal _discountPercentageLevel2; private BigDecimal _discountPercentageLevel3; private BigDecimal _discountPercentageLevel4; private BigDecimal _discountPercentageLevel1WithTaxAmount; private BigDecimal _discountPercentageLevel2WithTaxAmount; private BigDecimal _discountPercentageLevel3WithTaxAmount; private BigDecimal _discountPercentageLevel4WithTaxAmount; private BigDecimal _discountWithTaxAmount; private BigDecimal _finalPrice; private BigDecimal _finalPriceWithTaxAmount; private boolean _freeShipping; private double _height; private String _json; private boolean _manuallyAdjusted; private long _maxSubscriptionCycles; private String _name; private String _nameCurrentLanguageId; private boolean _priceManuallyAdjusted; private boolean _priceOnApplication; private String _printedNote; private BigDecimal _promoPrice; private BigDecimal _promoPriceWithTaxAmount; private BigDecimal _quantity; private long _replacedCPInstanceId; private String _replacedSku; private Date _requestedDeliveryDate; private boolean _shipSeparately; private boolean _shippable; private BigDecimal _shippedQuantity; private double _shippingExtraPrice; private String _sku; private boolean _subscription; private int _subscriptionLength; private String _subscriptionType; private String _subscriptionTypeSettings; private BigDecimal _unitOfMeasureIncrementalOrderQuantity; private String _unitOfMeasureKey; private BigDecimal _unitPrice; private BigDecimal _unitPriceWithTaxAmount; private double _weight; private double _width; 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((CommerceOrderItem)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("uuid_", _uuid); _columnOriginalValues.put( "externalReferenceCode", _externalReferenceCode); _columnOriginalValues.put("commerceOrderItemId", _commerceOrderItemId); _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( "CIBookedQuantityId", _commerceInventoryBookedQuantityId); _columnOriginalValues.put("commerceOrderId", _commerceOrderId); _columnOriginalValues.put("commercePriceListId", _commercePriceListId); _columnOriginalValues.put("CPInstanceId", _CPInstanceId); _columnOriginalValues.put("CPMeasurementUnitId", _CPMeasurementUnitId); _columnOriginalValues.put("CProductId", _CProductId); _columnOriginalValues.put( "customerCommerceOrderItemId", _customerCommerceOrderItemId); _columnOriginalValues.put( "parentCommerceOrderItemId", _parentCommerceOrderItemId); _columnOriginalValues.put("shippingAddressId", _shippingAddressId); _columnOriginalValues.put("deliveryGroupName", _deliveryGroupName); _columnOriginalValues.put( "deliveryMaxSubscriptionCycles", _deliveryMaxSubscriptionCycles); _columnOriginalValues.put( "deliverySubscriptionLength", _deliverySubscriptionLength); _columnOriginalValues.put( "deliverySubscriptionType", _deliverySubscriptionType); _columnOriginalValues.put( "deliverySubTypeSettings", _deliverySubscriptionTypeSettings); _columnOriginalValues.put("depth", _depth); _columnOriginalValues.put("discountAmount", _discountAmount); _columnOriginalValues.put( "discountManuallyAdjusted", _discountManuallyAdjusted); _columnOriginalValues.put( "discountPercentageLevel1", _discountPercentageLevel1); _columnOriginalValues.put( "discountPercentageLevel2", _discountPercentageLevel2); _columnOriginalValues.put( "discountPercentageLevel3", _discountPercentageLevel3); _columnOriginalValues.put( "discountPercentageLevel4", _discountPercentageLevel4); _columnOriginalValues.put( "discountPctLevel1WithTaxAmount", _discountPercentageLevel1WithTaxAmount); _columnOriginalValues.put( "discountPctLevel2WithTaxAmount", _discountPercentageLevel2WithTaxAmount); _columnOriginalValues.put( "discountPctLevel3WithTaxAmount", _discountPercentageLevel3WithTaxAmount); _columnOriginalValues.put( "discountPctLevel4WithTaxAmount", _discountPercentageLevel4WithTaxAmount); _columnOriginalValues.put( "discountWithTaxAmount", _discountWithTaxAmount); _columnOriginalValues.put("finalPrice", _finalPrice); _columnOriginalValues.put( "finalPriceWithTaxAmount", _finalPriceWithTaxAmount); _columnOriginalValues.put("freeShipping", _freeShipping); _columnOriginalValues.put("height", _height); _columnOriginalValues.put("json", _json); _columnOriginalValues.put("manuallyAdjusted", _manuallyAdjusted); _columnOriginalValues.put( "maxSubscriptionCycles", _maxSubscriptionCycles); _columnOriginalValues.put("name", _name); _columnOriginalValues.put( "priceManuallyAdjusted", _priceManuallyAdjusted); _columnOriginalValues.put("priceOnApplication", _priceOnApplication); _columnOriginalValues.put("printedNote", _printedNote); _columnOriginalValues.put("promoPrice", _promoPrice); _columnOriginalValues.put( "promoPriceWithTaxAmount", _promoPriceWithTaxAmount); _columnOriginalValues.put("quantity", _quantity); _columnOriginalValues.put( "replacedCPInstanceId", _replacedCPInstanceId); _columnOriginalValues.put("replacedSku", _replacedSku); _columnOriginalValues.put( "requestedDeliveryDate", _requestedDeliveryDate); _columnOriginalValues.put("shipSeparately", _shipSeparately); _columnOriginalValues.put("shippable", _shippable); _columnOriginalValues.put("shippedQuantity", _shippedQuantity); _columnOriginalValues.put("shippingExtraPrice", _shippingExtraPrice); _columnOriginalValues.put("sku", _sku); _columnOriginalValues.put("subscription", _subscription); _columnOriginalValues.put("subscriptionLength", _subscriptionLength); _columnOriginalValues.put("subscriptionType", _subscriptionType); _columnOriginalValues.put( "subscriptionTypeSettings", _subscriptionTypeSettings); _columnOriginalValues.put( "UOMIncrementalOrderQuantity", _unitOfMeasureIncrementalOrderQuantity); _columnOriginalValues.put("unitOfMeasureKey", _unitOfMeasureKey); _columnOriginalValues.put("unitPrice", _unitPrice); _columnOriginalValues.put( "unitPriceWithTaxAmount", _unitPriceWithTaxAmount); _columnOriginalValues.put("weight", _weight); _columnOriginalValues.put("width", _width); } private static final Map _attributeNames; static { Map attributeNames = new HashMap<>(); attributeNames.put("uuid_", "uuid"); attributeNames.put( "CIBookedQuantityId", "commerceInventoryBookedQuantityId"); attributeNames.put( "deliverySubTypeSettings", "deliverySubscriptionTypeSettings"); attributeNames.put( "discountPctLevel1WithTaxAmount", "discountPercentageLevel1WithTaxAmount"); attributeNames.put( "discountPctLevel2WithTaxAmount", "discountPercentageLevel2WithTaxAmount"); attributeNames.put( "discountPctLevel3WithTaxAmount", "discountPercentageLevel3WithTaxAmount"); attributeNames.put( "discountPctLevel4WithTaxAmount", "discountPercentageLevel4WithTaxAmount"); attributeNames.put( "UOMIncrementalOrderQuantity", "unitOfMeasureIncrementalOrderQuantity"); _attributeNames = Collections.unmodifiableMap(attributeNames); } private transient Map _columnOriginalValues; private CommerceOrderItem _escapedModel; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy