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

com.liferay.commerce.product.model.impl.CPInstanceOptionValueRelModelImpl 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.CPInstanceOptionValueRel;
import com.liferay.commerce.product.model.CPInstanceOptionValueRelModel;
import com.liferay.commerce.product.model.CPInstanceOptionValueRelSoap;
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.GetterUtil;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;

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 CPInstanceOptionValueRel service. Represents a row in the "CPInstanceOptionValueRel" database table, with each column mapped to a property of this class.
 *
 * 

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

* * @author Marco Leo * @see CPInstanceOptionValueRelImpl * @generated */ @JSON(strict = true) public class CPInstanceOptionValueRelModelImpl extends BaseModelImpl implements CPInstanceOptionValueRelModel { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a cp instance option value rel model instance should use the CPInstanceOptionValueRel interface instead. */ public static final String TABLE_NAME = "CPInstanceOptionValueRel"; public static final Object[][] TABLE_COLUMNS = { {"uuid_", Types.VARCHAR}, {"CPInstanceOptionValueRelId", Types.BIGINT}, {"groupId", Types.BIGINT}, {"companyId", Types.BIGINT}, {"userId", Types.BIGINT}, {"userName", Types.VARCHAR}, {"createDate", Types.TIMESTAMP}, {"modifiedDate", Types.TIMESTAMP}, {"CPDefinitionOptionRelId", Types.BIGINT}, {"CPDefinitionOptionValueRelId", Types.BIGINT}, {"CPInstanceId", Types.BIGINT} }; public static final Map TABLE_COLUMNS_MAP = new HashMap(); static { TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); TABLE_COLUMNS_MAP.put("CPInstanceOptionValueRelId", 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("CPDefinitionOptionRelId", Types.BIGINT); TABLE_COLUMNS_MAP.put("CPDefinitionOptionValueRelId", Types.BIGINT); TABLE_COLUMNS_MAP.put("CPInstanceId", Types.BIGINT); } public static final String TABLE_SQL_CREATE = "create table CPInstanceOptionValueRel (uuid_ VARCHAR(75) null,CPInstanceOptionValueRelId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,CPDefinitionOptionRelId LONG,CPDefinitionOptionValueRelId LONG,CPInstanceId LONG)"; public static final String TABLE_SQL_DROP = "drop table CPInstanceOptionValueRel"; public static final String ORDER_BY_JPQL = " ORDER BY cpInstanceOptionValueRel.CPInstanceOptionValueRelId ASC"; public static final String ORDER_BY_SQL = " ORDER BY CPInstanceOptionValueRel.CPInstanceOptionValueRelId ASC"; 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.CPInstanceOptionValueRel"), 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.CPInstanceOptionValueRel"), 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.CPInstanceOptionValueRel"), true); public static final long CPDEFINITIONOPTIONRELID_COLUMN_BITMASK = 1L; public static final long CPDEFINITIONOPTIONVALUERELID_COLUMN_BITMASK = 2L; public static final long CPINSTANCEID_COLUMN_BITMASK = 4L; public static final long COMPANYID_COLUMN_BITMASK = 8L; public static final long GROUPID_COLUMN_BITMASK = 16L; public static final long UUID_COLUMN_BITMASK = 32L; public static final long CPINSTANCEOPTIONVALUERELID_COLUMN_BITMASK = 64L; /** * 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 CPInstanceOptionValueRel toModel( CPInstanceOptionValueRelSoap soapModel) { if (soapModel == null) { return null; } CPInstanceOptionValueRel model = new CPInstanceOptionValueRelImpl(); model.setUuid(soapModel.getUuid()); model.setCPInstanceOptionValueRelId( soapModel.getCPInstanceOptionValueRelId()); 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.setCPDefinitionOptionRelId( soapModel.getCPDefinitionOptionRelId()); model.setCPDefinitionOptionValueRelId( soapModel.getCPDefinitionOptionValueRelId()); model.setCPInstanceId(soapModel.getCPInstanceId()); 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( CPInstanceOptionValueRelSoap[] soapModels) { if (soapModels == null) { return null; } List models = new ArrayList(soapModels.length); for (CPInstanceOptionValueRelSoap 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.CPInstanceOptionValueRel")); public CPInstanceOptionValueRelModelImpl() { } @Override public long getPrimaryKey() { return _CPInstanceOptionValueRelId; } @Override public void setPrimaryKey(long primaryKey) { setCPInstanceOptionValueRelId(primaryKey); } @Override public Serializable getPrimaryKeyObj() { return _CPInstanceOptionValueRelId; } @Override public void setPrimaryKeyObj(Serializable primaryKeyObj) { setPrimaryKey(((Long)primaryKeyObj).longValue()); } @Override public Class getModelClass() { return CPInstanceOptionValueRel.class; } @Override public String getModelClassName() { return CPInstanceOptionValueRel.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((CPInstanceOptionValueRel)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( (CPInstanceOptionValueRel)this, entry.getValue()); } } } public Map> getAttributeGetterFunctions() { return _attributeGetterFunctions; } public Map> getAttributeSetterBiConsumers() { return _attributeSetterBiConsumers; } private static Function _getProxyProviderFunction() { Class proxyClass = ProxyUtil.getProxyClass( CPInstanceOptionValueRel.class.getClassLoader(), CPInstanceOptionValueRel.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( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getUuid(); } }); attributeSetterBiConsumers.put( "uuid", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object uuidObject) { cpInstanceOptionValueRel.setUuid((String)uuidObject); } }); attributeGetterFunctions.put( "CPInstanceOptionValueRelId", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel. getCPInstanceOptionValueRelId(); } }); attributeSetterBiConsumers.put( "CPInstanceOptionValueRelId", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object CPInstanceOptionValueRelIdObject) { cpInstanceOptionValueRel.setCPInstanceOptionValueRelId( (Long)CPInstanceOptionValueRelIdObject); } }); attributeGetterFunctions.put( "groupId", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getGroupId(); } }); attributeSetterBiConsumers.put( "groupId", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object groupIdObject) { cpInstanceOptionValueRel.setGroupId((Long)groupIdObject); } }); attributeGetterFunctions.put( "companyId", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getCompanyId(); } }); attributeSetterBiConsumers.put( "companyId", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object companyIdObject) { cpInstanceOptionValueRel.setCompanyId( (Long)companyIdObject); } }); attributeGetterFunctions.put( "userId", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getUserId(); } }); attributeSetterBiConsumers.put( "userId", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object userIdObject) { cpInstanceOptionValueRel.setUserId((Long)userIdObject); } }); attributeGetterFunctions.put( "userName", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getUserName(); } }); attributeSetterBiConsumers.put( "userName", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object userNameObject) { cpInstanceOptionValueRel.setUserName( (String)userNameObject); } }); attributeGetterFunctions.put( "createDate", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getCreateDate(); } }); attributeSetterBiConsumers.put( "createDate", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object createDateObject) { cpInstanceOptionValueRel.setCreateDate( (Date)createDateObject); } }); attributeGetterFunctions.put( "modifiedDate", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getModifiedDate(); } }); attributeSetterBiConsumers.put( "modifiedDate", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object modifiedDateObject) { cpInstanceOptionValueRel.setModifiedDate( (Date)modifiedDateObject); } }); attributeGetterFunctions.put( "CPDefinitionOptionRelId", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel. getCPDefinitionOptionRelId(); } }); attributeSetterBiConsumers.put( "CPDefinitionOptionRelId", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object CPDefinitionOptionRelIdObject) { cpInstanceOptionValueRel.setCPDefinitionOptionRelId( (Long)CPDefinitionOptionRelIdObject); } }); attributeGetterFunctions.put( "CPDefinitionOptionValueRelId", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel. getCPDefinitionOptionValueRelId(); } }); attributeSetterBiConsumers.put( "CPDefinitionOptionValueRelId", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object CPDefinitionOptionValueRelIdObject) { cpInstanceOptionValueRel.setCPDefinitionOptionValueRelId( (Long)CPDefinitionOptionValueRelIdObject); } }); attributeGetterFunctions.put( "CPInstanceId", new Function() { @Override public Object apply( CPInstanceOptionValueRel cpInstanceOptionValueRel) { return cpInstanceOptionValueRel.getCPInstanceId(); } }); attributeSetterBiConsumers.put( "CPInstanceId", new BiConsumer() { @Override public void accept( CPInstanceOptionValueRel cpInstanceOptionValueRel, Object CPInstanceIdObject) { cpInstanceOptionValueRel.setCPInstanceId( (Long)CPInstanceIdObject); } }); _attributeGetterFunctions = Collections.unmodifiableMap( attributeGetterFunctions); _attributeSetterBiConsumers = Collections.unmodifiableMap( (Map)attributeSetterBiConsumers); } @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 long getCPInstanceOptionValueRelId() { return _CPInstanceOptionValueRelId; } @Override public void setCPInstanceOptionValueRelId(long CPInstanceOptionValueRelId) { _CPInstanceOptionValueRelId = CPInstanceOptionValueRelId; } @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) { _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 getCPDefinitionOptionRelId() { return _CPDefinitionOptionRelId; } @Override public void setCPDefinitionOptionRelId(long CPDefinitionOptionRelId) { _columnBitmask |= CPDEFINITIONOPTIONRELID_COLUMN_BITMASK; if (!_setOriginalCPDefinitionOptionRelId) { _setOriginalCPDefinitionOptionRelId = true; _originalCPDefinitionOptionRelId = _CPDefinitionOptionRelId; } _CPDefinitionOptionRelId = CPDefinitionOptionRelId; } public long getOriginalCPDefinitionOptionRelId() { return _originalCPDefinitionOptionRelId; } @JSON @Override public long getCPDefinitionOptionValueRelId() { return _CPDefinitionOptionValueRelId; } @Override public void setCPDefinitionOptionValueRelId( long CPDefinitionOptionValueRelId) { _columnBitmask |= CPDEFINITIONOPTIONVALUERELID_COLUMN_BITMASK; if (!_setOriginalCPDefinitionOptionValueRelId) { _setOriginalCPDefinitionOptionValueRelId = true; _originalCPDefinitionOptionValueRelId = _CPDefinitionOptionValueRelId; } _CPDefinitionOptionValueRelId = CPDefinitionOptionValueRelId; } public long getOriginalCPDefinitionOptionValueRelId() { return _originalCPDefinitionOptionValueRelId; } @JSON @Override public long getCPInstanceId() { return _CPInstanceId; } @Override public void setCPInstanceId(long CPInstanceId) { _columnBitmask |= CPINSTANCEID_COLUMN_BITMASK; if (!_setOriginalCPInstanceId) { _setOriginalCPInstanceId = true; _originalCPInstanceId = _CPInstanceId; } _CPInstanceId = CPInstanceId; } public long getOriginalCPInstanceId() { return _originalCPInstanceId; } @Override public StagedModelType getStagedModelType() { return new StagedModelType( PortalUtil.getClassNameId( CPInstanceOptionValueRel.class.getName())); } public long getColumnBitmask() { return _columnBitmask; } @Override public ExpandoBridge getExpandoBridge() { return ExpandoBridgeFactoryUtil.getExpandoBridge( getCompanyId(), CPInstanceOptionValueRel.class.getName(), getPrimaryKey()); } @Override public void setExpandoBridgeAttributes(ServiceContext serviceContext) { ExpandoBridge expandoBridge = getExpandoBridge(); expandoBridge.setAttributes(serviceContext); } @Override public CPInstanceOptionValueRel toEscapedModel() { if (_escapedModel == null) { Function escapedModelProxyProviderFunction = EscapedModelProxyProviderFunctionHolder. _escapedModelProxyProviderFunction; _escapedModel = escapedModelProxyProviderFunction.apply( new AutoEscapeBeanHandler(this)); } return _escapedModel; } @Override public Object clone() { CPInstanceOptionValueRelImpl cpInstanceOptionValueRelImpl = new CPInstanceOptionValueRelImpl(); cpInstanceOptionValueRelImpl.setUuid(getUuid()); cpInstanceOptionValueRelImpl.setCPInstanceOptionValueRelId( getCPInstanceOptionValueRelId()); cpInstanceOptionValueRelImpl.setGroupId(getGroupId()); cpInstanceOptionValueRelImpl.setCompanyId(getCompanyId()); cpInstanceOptionValueRelImpl.setUserId(getUserId()); cpInstanceOptionValueRelImpl.setUserName(getUserName()); cpInstanceOptionValueRelImpl.setCreateDate(getCreateDate()); cpInstanceOptionValueRelImpl.setModifiedDate(getModifiedDate()); cpInstanceOptionValueRelImpl.setCPDefinitionOptionRelId( getCPDefinitionOptionRelId()); cpInstanceOptionValueRelImpl.setCPDefinitionOptionValueRelId( getCPDefinitionOptionValueRelId()); cpInstanceOptionValueRelImpl.setCPInstanceId(getCPInstanceId()); cpInstanceOptionValueRelImpl.resetOriginalValues(); return cpInstanceOptionValueRelImpl; } @Override public int compareTo(CPInstanceOptionValueRel cpInstanceOptionValueRel) { long primaryKey = cpInstanceOptionValueRel.getPrimaryKey(); if (getPrimaryKey() < primaryKey) { return -1; } else if (getPrimaryKey() > primaryKey) { return 1; } else { return 0; } } @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof CPInstanceOptionValueRel)) { return false; } CPInstanceOptionValueRel cpInstanceOptionValueRel = (CPInstanceOptionValueRel)object; long primaryKey = cpInstanceOptionValueRel.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() { CPInstanceOptionValueRelModelImpl cpInstanceOptionValueRelModelImpl = this; cpInstanceOptionValueRelModelImpl._originalUuid = cpInstanceOptionValueRelModelImpl._uuid; cpInstanceOptionValueRelModelImpl._originalGroupId = cpInstanceOptionValueRelModelImpl._groupId; cpInstanceOptionValueRelModelImpl._setOriginalGroupId = false; cpInstanceOptionValueRelModelImpl._originalCompanyId = cpInstanceOptionValueRelModelImpl._companyId; cpInstanceOptionValueRelModelImpl._setOriginalCompanyId = false; cpInstanceOptionValueRelModelImpl._setModifiedDate = false; cpInstanceOptionValueRelModelImpl._originalCPDefinitionOptionRelId = cpInstanceOptionValueRelModelImpl._CPDefinitionOptionRelId; cpInstanceOptionValueRelModelImpl._setOriginalCPDefinitionOptionRelId = false; cpInstanceOptionValueRelModelImpl. _originalCPDefinitionOptionValueRelId = cpInstanceOptionValueRelModelImpl._CPDefinitionOptionValueRelId; cpInstanceOptionValueRelModelImpl. _setOriginalCPDefinitionOptionValueRelId = false; cpInstanceOptionValueRelModelImpl._originalCPInstanceId = cpInstanceOptionValueRelModelImpl._CPInstanceId; cpInstanceOptionValueRelModelImpl._setOriginalCPInstanceId = false; cpInstanceOptionValueRelModelImpl._columnBitmask = 0; } @Override public CacheModel toCacheModel() { CPInstanceOptionValueRelCacheModel cpInstanceOptionValueRelCacheModel = new CPInstanceOptionValueRelCacheModel(); cpInstanceOptionValueRelCacheModel.uuid = getUuid(); String uuid = cpInstanceOptionValueRelCacheModel.uuid; if ((uuid != null) && (uuid.length() == 0)) { cpInstanceOptionValueRelCacheModel.uuid = null; } cpInstanceOptionValueRelCacheModel.CPInstanceOptionValueRelId = getCPInstanceOptionValueRelId(); cpInstanceOptionValueRelCacheModel.groupId = getGroupId(); cpInstanceOptionValueRelCacheModel.companyId = getCompanyId(); cpInstanceOptionValueRelCacheModel.userId = getUserId(); cpInstanceOptionValueRelCacheModel.userName = getUserName(); String userName = cpInstanceOptionValueRelCacheModel.userName; if ((userName != null) && (userName.length() == 0)) { cpInstanceOptionValueRelCacheModel.userName = null; } Date createDate = getCreateDate(); if (createDate != null) { cpInstanceOptionValueRelCacheModel.createDate = createDate.getTime(); } else { cpInstanceOptionValueRelCacheModel.createDate = Long.MIN_VALUE; } Date modifiedDate = getModifiedDate(); if (modifiedDate != null) { cpInstanceOptionValueRelCacheModel.modifiedDate = modifiedDate.getTime(); } else { cpInstanceOptionValueRelCacheModel.modifiedDate = Long.MIN_VALUE; } cpInstanceOptionValueRelCacheModel.CPDefinitionOptionRelId = getCPDefinitionOptionRelId(); cpInstanceOptionValueRelCacheModel.CPDefinitionOptionValueRelId = getCPDefinitionOptionValueRelId(); cpInstanceOptionValueRelCacheModel.CPInstanceId = getCPInstanceId(); return cpInstanceOptionValueRelCacheModel; } @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((CPInstanceOptionValueRel)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 long _CPInstanceOptionValueRelId; 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 _CPDefinitionOptionRelId; private long _originalCPDefinitionOptionRelId; private boolean _setOriginalCPDefinitionOptionRelId; private long _CPDefinitionOptionValueRelId; private long _originalCPDefinitionOptionValueRelId; private boolean _setOriginalCPDefinitionOptionValueRelId; private long _CPInstanceId; private long _originalCPInstanceId; private boolean _setOriginalCPInstanceId; private long _columnBitmask; private CPInstanceOptionValueRel _escapedModel; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy