com.liferay.fragment.model.impl.FragmentEntryVersionModelImpl 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.fragment.model.impl;
import com.liferay.expando.kernel.model.ExpandoBridge;
import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil;
import com.liferay.fragment.model.FragmentEntry;
import com.liferay.fragment.model.FragmentEntryVersion;
import com.liferay.fragment.model.FragmentEntryVersionModel;
import com.liferay.petra.string.StringBundler;
import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.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.ProxyUtil;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import java.sql.Blob;
import java.sql.Types;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
* The base model implementation for the FragmentEntryVersion service. Represents a row in the "FragmentEntryVersion" database table, with each column mapped to a property of this class.
*
*
* This implementation and its corresponding interface FragmentEntryVersionModel
exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link FragmentEntryVersionImpl}.
*
*
* @author Brian Wing Shun Chan
* @see FragmentEntryVersionImpl
* @generated
*/
public class FragmentEntryVersionModelImpl
extends BaseModelImpl
implements FragmentEntryVersionModel {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this class directly. All methods that expect a fragment entry version model instance should use the FragmentEntryVersion
interface instead.
*/
public static final String TABLE_NAME = "FragmentEntryVersion";
public static final Object[][] TABLE_COLUMNS = {
{"mvccVersion", Types.BIGINT}, {"ctCollectionId", Types.BIGINT},
{"fragmentEntryVersionId", Types.BIGINT}, {"version", Types.INTEGER},
{"uuid_", Types.VARCHAR}, {"externalReferenceCode", Types.VARCHAR},
{"fragmentEntryId", Types.BIGINT}, {"groupId", Types.BIGINT},
{"companyId", Types.BIGINT}, {"userId", Types.BIGINT},
{"userName", Types.VARCHAR}, {"createDate", Types.TIMESTAMP},
{"modifiedDate", Types.TIMESTAMP},
{"fragmentCollectionId", Types.BIGINT},
{"fragmentEntryKey", Types.VARCHAR}, {"name", Types.VARCHAR},
{"css", Types.CLOB}, {"html", Types.CLOB}, {"js", Types.CLOB},
{"cacheable", Types.BOOLEAN}, {"configuration", Types.CLOB},
{"icon", Types.VARCHAR}, {"previewFileEntryId", Types.BIGINT},
{"readOnly", Types.BOOLEAN}, {"type_", Types.INTEGER},
{"typeOptions", Types.CLOB}, {"lastPublishDate", Types.TIMESTAMP},
{"status", Types.INTEGER}, {"statusByUserId", Types.BIGINT},
{"statusByUserName", Types.VARCHAR}, {"statusDate", Types.TIMESTAMP}
};
public static final Map TABLE_COLUMNS_MAP =
new HashMap();
static {
TABLE_COLUMNS_MAP.put("mvccVersion", Types.BIGINT);
TABLE_COLUMNS_MAP.put("ctCollectionId", Types.BIGINT);
TABLE_COLUMNS_MAP.put("fragmentEntryVersionId", Types.BIGINT);
TABLE_COLUMNS_MAP.put("version", Types.INTEGER);
TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR);
TABLE_COLUMNS_MAP.put("externalReferenceCode", Types.VARCHAR);
TABLE_COLUMNS_MAP.put("fragmentEntryId", 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("fragmentCollectionId", Types.BIGINT);
TABLE_COLUMNS_MAP.put("fragmentEntryKey", Types.VARCHAR);
TABLE_COLUMNS_MAP.put("name", Types.VARCHAR);
TABLE_COLUMNS_MAP.put("css", Types.CLOB);
TABLE_COLUMNS_MAP.put("html", Types.CLOB);
TABLE_COLUMNS_MAP.put("js", Types.CLOB);
TABLE_COLUMNS_MAP.put("cacheable", Types.BOOLEAN);
TABLE_COLUMNS_MAP.put("configuration", Types.CLOB);
TABLE_COLUMNS_MAP.put("icon", Types.VARCHAR);
TABLE_COLUMNS_MAP.put("previewFileEntryId", Types.BIGINT);
TABLE_COLUMNS_MAP.put("readOnly", Types.BOOLEAN);
TABLE_COLUMNS_MAP.put("type_", Types.INTEGER);
TABLE_COLUMNS_MAP.put("typeOptions", Types.CLOB);
TABLE_COLUMNS_MAP.put("lastPublishDate", Types.TIMESTAMP);
TABLE_COLUMNS_MAP.put("status", Types.INTEGER);
TABLE_COLUMNS_MAP.put("statusByUserId", Types.BIGINT);
TABLE_COLUMNS_MAP.put("statusByUserName", Types.VARCHAR);
TABLE_COLUMNS_MAP.put("statusDate", Types.TIMESTAMP);
}
public static final String TABLE_SQL_CREATE =
"create table FragmentEntryVersion (mvccVersion LONG default 0 not null,ctCollectionId LONG default 0 not null,fragmentEntryVersionId LONG not null,version INTEGER,uuid_ VARCHAR(75) null,externalReferenceCode VARCHAR(75) null,fragmentEntryId LONG,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,fragmentCollectionId LONG,fragmentEntryKey VARCHAR(75) null,name VARCHAR(75) null,css TEXT null,html TEXT null,js TEXT null,cacheable BOOLEAN,configuration TEXT null,icon VARCHAR(75) null,previewFileEntryId LONG,readOnly BOOLEAN,type_ INTEGER,typeOptions TEXT null,lastPublishDate DATE null,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null,primary key (fragmentEntryVersionId, ctCollectionId))";
public static final String TABLE_SQL_DROP =
"drop table FragmentEntryVersion";
public static final String ORDER_BY_JPQL =
" ORDER BY fragmentEntryVersion.version DESC";
public static final String ORDER_BY_SQL =
" ORDER BY FragmentEntryVersion.version DESC";
public static final String DATA_SOURCE = "liferayDataSource";
public static final String SESSION_FACTORY = "liferaySessionFactory";
public static final String TX_MANAGER = "liferayTransactionManager";
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long COMPANYID_COLUMN_BITMASK = 1L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long FRAGMENTCOLLECTIONID_COLUMN_BITMASK = 2L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long FRAGMENTENTRYID_COLUMN_BITMASK = 4L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long FRAGMENTENTRYKEY_COLUMN_BITMASK = 8L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long GROUPID_COLUMN_BITMASK = 16L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long NAME_COLUMN_BITMASK = 32L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long STATUS_COLUMN_BITMASK = 64L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long TYPE_COLUMN_BITMASK = 128L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long UUID_COLUMN_BITMASK = 256L;
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)}
*/
@Deprecated
public static final long VERSION_COLUMN_BITMASK = 512L;
/**
* @deprecated As of Athanasius (7.3.x), with no direct replacement
*/
@Deprecated
public static void setEntityCacheEnabled(boolean entityCacheEnabled) {
}
/**
* @deprecated As of Athanasius (7.3.x), with no direct replacement
*/
@Deprecated
public static void setFinderCacheEnabled(boolean finderCacheEnabled) {
}
public FragmentEntryVersionModelImpl() {
}
@Override
public long getPrimaryKey() {
return _fragmentEntryVersionId;
}
@Override
public void setPrimaryKey(long primaryKey) {
setFragmentEntryVersionId(primaryKey);
}
@Override
public Serializable getPrimaryKeyObj() {
return _fragmentEntryVersionId;
}
@Override
public void setPrimaryKeyObj(Serializable primaryKeyObj) {
setPrimaryKey(((Long)primaryKeyObj).longValue());
}
@Override
public Class> getModelClass() {
return FragmentEntryVersion.class;
}
@Override
public String getModelClassName() {
return FragmentEntryVersion.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((FragmentEntryVersion)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(
(FragmentEntryVersion)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", FragmentEntryVersion::getMvccVersion);
attributeGetterFunctions.put(
"ctCollectionId", FragmentEntryVersion::getCtCollectionId);
attributeGetterFunctions.put(
"fragmentEntryVersionId",
FragmentEntryVersion::getFragmentEntryVersionId);
attributeGetterFunctions.put(
"version", FragmentEntryVersion::getVersion);
attributeGetterFunctions.put("uuid", FragmentEntryVersion::getUuid);
attributeGetterFunctions.put(
"externalReferenceCode",
FragmentEntryVersion::getExternalReferenceCode);
attributeGetterFunctions.put(
"fragmentEntryId", FragmentEntryVersion::getFragmentEntryId);
attributeGetterFunctions.put(
"groupId", FragmentEntryVersion::getGroupId);
attributeGetterFunctions.put(
"companyId", FragmentEntryVersion::getCompanyId);
attributeGetterFunctions.put(
"userId", FragmentEntryVersion::getUserId);
attributeGetterFunctions.put(
"userName", FragmentEntryVersion::getUserName);
attributeGetterFunctions.put(
"createDate", FragmentEntryVersion::getCreateDate);
attributeGetterFunctions.put(
"modifiedDate", FragmentEntryVersion::getModifiedDate);
attributeGetterFunctions.put(
"fragmentCollectionId",
FragmentEntryVersion::getFragmentCollectionId);
attributeGetterFunctions.put(
"fragmentEntryKey", FragmentEntryVersion::getFragmentEntryKey);
attributeGetterFunctions.put("name", FragmentEntryVersion::getName);
attributeGetterFunctions.put("css", FragmentEntryVersion::getCss);
attributeGetterFunctions.put("html", FragmentEntryVersion::getHtml);
attributeGetterFunctions.put("js", FragmentEntryVersion::getJs);
attributeGetterFunctions.put(
"cacheable", FragmentEntryVersion::getCacheable);
attributeGetterFunctions.put(
"configuration", FragmentEntryVersion::getConfiguration);
attributeGetterFunctions.put("icon", FragmentEntryVersion::getIcon);
attributeGetterFunctions.put(
"previewFileEntryId",
FragmentEntryVersion::getPreviewFileEntryId);
attributeGetterFunctions.put(
"readOnly", FragmentEntryVersion::getReadOnly);
attributeGetterFunctions.put("type", FragmentEntryVersion::getType);
attributeGetterFunctions.put(
"typeOptions", FragmentEntryVersion::getTypeOptions);
attributeGetterFunctions.put(
"lastPublishDate", FragmentEntryVersion::getLastPublishDate);
attributeGetterFunctions.put(
"status", FragmentEntryVersion::getStatus);
attributeGetterFunctions.put(
"statusByUserId", FragmentEntryVersion::getStatusByUserId);
attributeGetterFunctions.put(
"statusByUserName", FragmentEntryVersion::getStatusByUserName);
attributeGetterFunctions.put(
"statusDate", FragmentEntryVersion::getStatusDate);
_attributeGetterFunctions = Collections.unmodifiableMap(
attributeGetterFunctions);
}
}
private static class AttributeSetterBiConsumersHolder {
private static final Map
>
_attributeSetterBiConsumers;
static {
Map>
attributeSetterBiConsumers =
new LinkedHashMap
>();
attributeSetterBiConsumers.put(
"mvccVersion",
(BiConsumer)
FragmentEntryVersion::setMvccVersion);
attributeSetterBiConsumers.put(
"ctCollectionId",
(BiConsumer)
FragmentEntryVersion::setCtCollectionId);
attributeSetterBiConsumers.put(
"fragmentEntryVersionId",
(BiConsumer)
FragmentEntryVersion::setFragmentEntryVersionId);
attributeSetterBiConsumers.put(
"version",
(BiConsumer)
FragmentEntryVersion::setVersion);
attributeSetterBiConsumers.put(
"uuid",
(BiConsumer)
FragmentEntryVersion::setUuid);
attributeSetterBiConsumers.put(
"externalReferenceCode",
(BiConsumer)
FragmentEntryVersion::setExternalReferenceCode);
attributeSetterBiConsumers.put(
"fragmentEntryId",
(BiConsumer)
FragmentEntryVersion::setFragmentEntryId);
attributeSetterBiConsumers.put(
"groupId",
(BiConsumer)
FragmentEntryVersion::setGroupId);
attributeSetterBiConsumers.put(
"companyId",
(BiConsumer)
FragmentEntryVersion::setCompanyId);
attributeSetterBiConsumers.put(
"userId",
(BiConsumer)
FragmentEntryVersion::setUserId);
attributeSetterBiConsumers.put(
"userName",
(BiConsumer)
FragmentEntryVersion::setUserName);
attributeSetterBiConsumers.put(
"createDate",
(BiConsumer)
FragmentEntryVersion::setCreateDate);
attributeSetterBiConsumers.put(
"modifiedDate",
(BiConsumer)
FragmentEntryVersion::setModifiedDate);
attributeSetterBiConsumers.put(
"fragmentCollectionId",
(BiConsumer)
FragmentEntryVersion::setFragmentCollectionId);
attributeSetterBiConsumers.put(
"fragmentEntryKey",
(BiConsumer)
FragmentEntryVersion::setFragmentEntryKey);
attributeSetterBiConsumers.put(
"name",
(BiConsumer)
FragmentEntryVersion::setName);
attributeSetterBiConsumers.put(
"css",
(BiConsumer)
FragmentEntryVersion::setCss);
attributeSetterBiConsumers.put(
"html",
(BiConsumer)
FragmentEntryVersion::setHtml);
attributeSetterBiConsumers.put(
"js",
(BiConsumer)
FragmentEntryVersion::setJs);
attributeSetterBiConsumers.put(
"cacheable",
(BiConsumer)
FragmentEntryVersion::setCacheable);
attributeSetterBiConsumers.put(
"configuration",
(BiConsumer)
FragmentEntryVersion::setConfiguration);
attributeSetterBiConsumers.put(
"icon",
(BiConsumer)
FragmentEntryVersion::setIcon);
attributeSetterBiConsumers.put(
"previewFileEntryId",
(BiConsumer)
FragmentEntryVersion::setPreviewFileEntryId);
attributeSetterBiConsumers.put(
"readOnly",
(BiConsumer)
FragmentEntryVersion::setReadOnly);
attributeSetterBiConsumers.put(
"type",
(BiConsumer)
FragmentEntryVersion::setType);
attributeSetterBiConsumers.put(
"typeOptions",
(BiConsumer)
FragmentEntryVersion::setTypeOptions);
attributeSetterBiConsumers.put(
"lastPublishDate",
(BiConsumer)
FragmentEntryVersion::setLastPublishDate);
attributeSetterBiConsumers.put(
"status",
(BiConsumer)
FragmentEntryVersion::setStatus);
attributeSetterBiConsumers.put(
"statusByUserId",
(BiConsumer)
FragmentEntryVersion::setStatusByUserId);
attributeSetterBiConsumers.put(
"statusByUserName",
(BiConsumer)
FragmentEntryVersion::setStatusByUserName);
attributeSetterBiConsumers.put(
"statusDate",
(BiConsumer)
FragmentEntryVersion::setStatusDate);
_attributeSetterBiConsumers = Collections.unmodifiableMap(
(Map)attributeSetterBiConsumers);
}
}
@Override
public long getVersionedModelId() {
return getFragmentEntryId();
}
@Override
public void populateVersionedModel(FragmentEntry fragmentEntry) {
fragmentEntry.setCtCollectionId(getCtCollectionId());
fragmentEntry.setUuid(getUuid());
fragmentEntry.setExternalReferenceCode(getExternalReferenceCode());
fragmentEntry.setGroupId(getGroupId());
fragmentEntry.setCompanyId(getCompanyId());
fragmentEntry.setUserId(getUserId());
fragmentEntry.setUserName(getUserName());
fragmentEntry.setCreateDate(getCreateDate());
fragmentEntry.setModifiedDate(getModifiedDate());
fragmentEntry.setFragmentCollectionId(getFragmentCollectionId());
fragmentEntry.setFragmentEntryKey(getFragmentEntryKey());
fragmentEntry.setName(getName());
fragmentEntry.setCss(getCss());
fragmentEntry.setHtml(getHtml());
fragmentEntry.setJs(getJs());
fragmentEntry.setCacheable(getCacheable());
fragmentEntry.setConfiguration(getConfiguration());
fragmentEntry.setIcon(getIcon());
fragmentEntry.setPreviewFileEntryId(getPreviewFileEntryId());
fragmentEntry.setReadOnly(getReadOnly());
fragmentEntry.setType(getType());
fragmentEntry.setTypeOptions(getTypeOptions());
fragmentEntry.setLastPublishDate(getLastPublishDate());
fragmentEntry.setStatus(getStatus());
fragmentEntry.setStatusByUserId(getStatusByUserId());
fragmentEntry.setStatusByUserName(getStatusByUserName());
fragmentEntry.setStatusDate(getStatusDate());
}
@Override
public void setVersionedModelId(long fragmentEntryId) {
setFragmentEntryId(fragmentEntryId);
}
@Override
public FragmentEntry toVersionedModel() {
FragmentEntry fragmentEntry = new FragmentEntryImpl();
fragmentEntry.setPrimaryKey(getVersionedModelId());
fragmentEntry.setHeadId(-getVersionedModelId());
populateVersionedModel(fragmentEntry);
return fragmentEntry;
}
@Override
public long getMvccVersion() {
return _mvccVersion;
}
@Override
public void setMvccVersion(long mvccVersion) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_mvccVersion = mvccVersion;
}
@Override
public long getCtCollectionId() {
return _ctCollectionId;
}
@Override
public void setCtCollectionId(long ctCollectionId) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_ctCollectionId = ctCollectionId;
}
@Override
public long getFragmentEntryVersionId() {
return _fragmentEntryVersionId;
}
@Override
public void setFragmentEntryVersionId(long fragmentEntryVersionId) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_fragmentEntryVersionId = fragmentEntryVersionId;
}
@Override
public int getVersion() {
return _version;
}
@Override
public void setVersion(int version) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_version = version;
}
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link
* #getColumnOriginalValue(String)}
*/
@Deprecated
public int getOriginalVersion() {
return GetterUtil.getInteger(
this.getColumnOriginalValue("version"));
}
@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_");
}
@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;
}
@Override
public long getFragmentEntryId() {
return _fragmentEntryId;
}
@Override
public void setFragmentEntryId(long fragmentEntryId) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_fragmentEntryId = fragmentEntryId;
}
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link
* #getColumnOriginalValue(String)}
*/
@Deprecated
public long getOriginalFragmentEntryId() {
return GetterUtil.getLong(
this.getColumnOriginalValue("fragmentEntryId"));
}
@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"));
}
@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"));
}
@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) {
}
@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;
}
@Override
public Date getCreateDate() {
return _createDate;
}
@Override
public void setCreateDate(Date createDate) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_createDate = createDate;
}
@Override
public Date getModifiedDate() {
return _modifiedDate;
}
public boolean hasSetModifiedDate() {
return _setModifiedDate;
}
@Override
public void setModifiedDate(Date modifiedDate) {
_setModifiedDate = true;
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_modifiedDate = modifiedDate;
}
@Override
public long getFragmentCollectionId() {
return _fragmentCollectionId;
}
@Override
public void setFragmentCollectionId(long fragmentCollectionId) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_fragmentCollectionId = fragmentCollectionId;
}
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link
* #getColumnOriginalValue(String)}
*/
@Deprecated
public long getOriginalFragmentCollectionId() {
return GetterUtil.getLong(
this.getColumnOriginalValue("fragmentCollectionId"));
}
@Override
public String getFragmentEntryKey() {
if (_fragmentEntryKey == null) {
return "";
}
else {
return _fragmentEntryKey;
}
}
@Override
public void setFragmentEntryKey(String fragmentEntryKey) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_fragmentEntryKey = fragmentEntryKey;
}
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link
* #getColumnOriginalValue(String)}
*/
@Deprecated
public String getOriginalFragmentEntryKey() {
return getColumnOriginalValue("fragmentEntryKey");
}
@Override
public String getName() {
if (_name == null) {
return "";
}
else {
return _name;
}
}
@Override
public void setName(String name) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_name = name;
}
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link
* #getColumnOriginalValue(String)}
*/
@Deprecated
public String getOriginalName() {
return getColumnOriginalValue("name");
}
@Override
public String getCss() {
if (_css == null) {
return "";
}
else {
return _css;
}
}
@Override
public void setCss(String css) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_css = css;
}
@Override
public String getHtml() {
if (_html == null) {
return "";
}
else {
return _html;
}
}
@Override
public void setHtml(String html) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_html = html;
}
@Override
public String getJs() {
if (_js == null) {
return "";
}
else {
return _js;
}
}
@Override
public void setJs(String js) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_js = js;
}
@Override
public boolean getCacheable() {
return _cacheable;
}
@Override
public boolean isCacheable() {
return _cacheable;
}
@Override
public void setCacheable(boolean cacheable) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_cacheable = cacheable;
}
@Override
public String getConfiguration() {
if (_configuration == null) {
return "";
}
else {
return _configuration;
}
}
@Override
public void setConfiguration(String configuration) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_configuration = configuration;
}
@Override
public String getIcon() {
if (_icon == null) {
return "";
}
else {
return _icon;
}
}
@Override
public void setIcon(String icon) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_icon = icon;
}
@Override
public long getPreviewFileEntryId() {
return _previewFileEntryId;
}
@Override
public void setPreviewFileEntryId(long previewFileEntryId) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_previewFileEntryId = previewFileEntryId;
}
@Override
public boolean getReadOnly() {
return _readOnly;
}
@Override
public boolean isReadOnly() {
return _readOnly;
}
@Override
public void setReadOnly(boolean readOnly) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_readOnly = readOnly;
}
@Override
public int getType() {
return _type;
}
@Override
public void setType(int type) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_type = type;
}
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link
* #getColumnOriginalValue(String)}
*/
@Deprecated
public int getOriginalType() {
return GetterUtil.getInteger(
this.getColumnOriginalValue("type_"));
}
@Override
public String getTypeOptions() {
if (_typeOptions == null) {
return "";
}
else {
return _typeOptions;
}
}
@Override
public void setTypeOptions(String typeOptions) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_typeOptions = typeOptions;
}
@Override
public Date getLastPublishDate() {
return _lastPublishDate;
}
@Override
public void setLastPublishDate(Date lastPublishDate) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_lastPublishDate = lastPublishDate;
}
@Override
public int getStatus() {
return _status;
}
@Override
public void setStatus(int status) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_status = status;
}
/**
* @deprecated As of Athanasius (7.3.x), replaced by {@link
* #getColumnOriginalValue(String)}
*/
@Deprecated
public int getOriginalStatus() {
return GetterUtil.getInteger(
this.getColumnOriginalValue("status"));
}
@Override
public long getStatusByUserId() {
return _statusByUserId;
}
@Override
public void setStatusByUserId(long statusByUserId) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_statusByUserId = statusByUserId;
}
@Override
public String getStatusByUserUuid() {
try {
User user = UserLocalServiceUtil.getUserById(getStatusByUserId());
return user.getUuid();
}
catch (PortalException portalException) {
return "";
}
}
@Override
public void setStatusByUserUuid(String statusByUserUuid) {
}
@Override
public String getStatusByUserName() {
if (_statusByUserName == null) {
return "";
}
else {
return _statusByUserName;
}
}
@Override
public void setStatusByUserName(String statusByUserName) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_statusByUserName = statusByUserName;
}
@Override
public Date getStatusDate() {
return _statusDate;
}
@Override
public void setStatusDate(Date statusDate) {
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
_statusDate = statusDate;
}
@Override
public boolean isApproved() {
if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
return true;
}
else {
return false;
}
}
@Override
public boolean isDenied() {
if (getStatus() == WorkflowConstants.STATUS_DENIED) {
return true;
}
else {
return false;
}
}
@Override
public boolean isDraft() {
if (getStatus() == WorkflowConstants.STATUS_DRAFT) {
return true;
}
else {
return false;
}
}
@Override
public boolean isExpired() {
if (getStatus() == WorkflowConstants.STATUS_EXPIRED) {
return true;
}
else {
return false;
}
}
@Override
public boolean isInactive() {
if (getStatus() == WorkflowConstants.STATUS_INACTIVE) {
return true;
}
else {
return false;
}
}
@Override
public boolean isIncomplete() {
if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) {
return true;
}
else {
return false;
}
}
@Override
public boolean isPending() {
if (getStatus() == WorkflowConstants.STATUS_PENDING) {
return true;
}
else {
return false;
}
}
@Override
public boolean isScheduled() {
if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) {
return true;
}
else {
return false;
}
}
public long getColumnBitmask() {
if (_columnBitmask > 0) {
return _columnBitmask;
}
if ((_columnOriginalValues == null) ||
(_columnOriginalValues == Collections.EMPTY_MAP)) {
return 0;
}
for (Map.Entry entry :
_columnOriginalValues.entrySet()) {
if (!Objects.equals(
entry.getValue(), getColumnValue(entry.getKey()))) {
_columnBitmask |= _columnBitmasks.get(entry.getKey());
}
}
return _columnBitmask;
}
@Override
public ExpandoBridge getExpandoBridge() {
return ExpandoBridgeFactoryUtil.getExpandoBridge(
getCompanyId(), FragmentEntryVersion.class.getName(),
getPrimaryKey());
}
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
ExpandoBridge expandoBridge = getExpandoBridge();
expandoBridge.setAttributes(serviceContext);
}
@Override
public FragmentEntryVersion toEscapedModel() {
if (_escapedModel == null) {
Function
escapedModelProxyProviderFunction =
EscapedModelProxyProviderFunctionHolder.
_escapedModelProxyProviderFunction;
_escapedModel = escapedModelProxyProviderFunction.apply(
new AutoEscapeBeanHandler(this));
}
return _escapedModel;
}
@Override
public Object clone() {
FragmentEntryVersionImpl fragmentEntryVersionImpl =
new FragmentEntryVersionImpl();
fragmentEntryVersionImpl.setMvccVersion(getMvccVersion());
fragmentEntryVersionImpl.setCtCollectionId(getCtCollectionId());
fragmentEntryVersionImpl.setFragmentEntryVersionId(
getFragmentEntryVersionId());
fragmentEntryVersionImpl.setVersion(getVersion());
fragmentEntryVersionImpl.setUuid(getUuid());
fragmentEntryVersionImpl.setExternalReferenceCode(
getExternalReferenceCode());
fragmentEntryVersionImpl.setFragmentEntryId(getFragmentEntryId());
fragmentEntryVersionImpl.setGroupId(getGroupId());
fragmentEntryVersionImpl.setCompanyId(getCompanyId());
fragmentEntryVersionImpl.setUserId(getUserId());
fragmentEntryVersionImpl.setUserName(getUserName());
fragmentEntryVersionImpl.setCreateDate(getCreateDate());
fragmentEntryVersionImpl.setModifiedDate(getModifiedDate());
fragmentEntryVersionImpl.setFragmentCollectionId(
getFragmentCollectionId());
fragmentEntryVersionImpl.setFragmentEntryKey(getFragmentEntryKey());
fragmentEntryVersionImpl.setName(getName());
fragmentEntryVersionImpl.setCss(getCss());
fragmentEntryVersionImpl.setHtml(getHtml());
fragmentEntryVersionImpl.setJs(getJs());
fragmentEntryVersionImpl.setCacheable(isCacheable());
fragmentEntryVersionImpl.setConfiguration(getConfiguration());
fragmentEntryVersionImpl.setIcon(getIcon());
fragmentEntryVersionImpl.setPreviewFileEntryId(getPreviewFileEntryId());
fragmentEntryVersionImpl.setReadOnly(isReadOnly());
fragmentEntryVersionImpl.setType(getType());
fragmentEntryVersionImpl.setTypeOptions(getTypeOptions());
fragmentEntryVersionImpl.setLastPublishDate(getLastPublishDate());
fragmentEntryVersionImpl.setStatus(getStatus());
fragmentEntryVersionImpl.setStatusByUserId(getStatusByUserId());
fragmentEntryVersionImpl.setStatusByUserName(getStatusByUserName());
fragmentEntryVersionImpl.setStatusDate(getStatusDate());
fragmentEntryVersionImpl.resetOriginalValues();
return fragmentEntryVersionImpl;
}
@Override
public FragmentEntryVersion cloneWithOriginalValues() {
FragmentEntryVersionImpl fragmentEntryVersionImpl =
new FragmentEntryVersionImpl();
fragmentEntryVersionImpl.setMvccVersion(
this.getColumnOriginalValue("mvccVersion"));
fragmentEntryVersionImpl.setCtCollectionId(
this.getColumnOriginalValue("ctCollectionId"));
fragmentEntryVersionImpl.setFragmentEntryVersionId(
this.getColumnOriginalValue("fragmentEntryVersionId"));
fragmentEntryVersionImpl.setVersion(
this.getColumnOriginalValue("version"));
fragmentEntryVersionImpl.setUuid(
this.getColumnOriginalValue("uuid_"));
fragmentEntryVersionImpl.setExternalReferenceCode(
this.getColumnOriginalValue("externalReferenceCode"));
fragmentEntryVersionImpl.setFragmentEntryId(
this.getColumnOriginalValue("fragmentEntryId"));
fragmentEntryVersionImpl.setGroupId(
this.getColumnOriginalValue("groupId"));
fragmentEntryVersionImpl.setCompanyId(
this.getColumnOriginalValue("companyId"));
fragmentEntryVersionImpl.setUserId(
this.getColumnOriginalValue("userId"));
fragmentEntryVersionImpl.setUserName(
this.getColumnOriginalValue("userName"));
fragmentEntryVersionImpl.setCreateDate(
this.getColumnOriginalValue("createDate"));
fragmentEntryVersionImpl.setModifiedDate(
this.getColumnOriginalValue("modifiedDate"));
fragmentEntryVersionImpl.setFragmentCollectionId(
this.getColumnOriginalValue("fragmentCollectionId"));
fragmentEntryVersionImpl.setFragmentEntryKey(
this.getColumnOriginalValue("fragmentEntryKey"));
fragmentEntryVersionImpl.setName(
this.getColumnOriginalValue("name"));
fragmentEntryVersionImpl.setCss(
this.getColumnOriginalValue("css"));
fragmentEntryVersionImpl.setHtml(
this.getColumnOriginalValue("html"));
fragmentEntryVersionImpl.setJs(
this.getColumnOriginalValue("js"));
fragmentEntryVersionImpl.setCacheable(
this.getColumnOriginalValue("cacheable"));
fragmentEntryVersionImpl.setConfiguration(
this.getColumnOriginalValue("configuration"));
fragmentEntryVersionImpl.setIcon(
this.getColumnOriginalValue("icon"));
fragmentEntryVersionImpl.setPreviewFileEntryId(
this.getColumnOriginalValue("previewFileEntryId"));
fragmentEntryVersionImpl.setReadOnly(
this.getColumnOriginalValue("readOnly"));
fragmentEntryVersionImpl.setType(
this.getColumnOriginalValue("type_"));
fragmentEntryVersionImpl.setTypeOptions(
this.getColumnOriginalValue("typeOptions"));
fragmentEntryVersionImpl.setLastPublishDate(
this.getColumnOriginalValue("lastPublishDate"));
fragmentEntryVersionImpl.setStatus(
this.getColumnOriginalValue("status"));
fragmentEntryVersionImpl.setStatusByUserId(
this.getColumnOriginalValue("statusByUserId"));
fragmentEntryVersionImpl.setStatusByUserName(
this.getColumnOriginalValue("statusByUserName"));
fragmentEntryVersionImpl.setStatusDate(
this.getColumnOriginalValue("statusDate"));
return fragmentEntryVersionImpl;
}
@Override
public int compareTo(FragmentEntryVersion fragmentEntryVersion) {
int value = 0;
if (getVersion() < fragmentEntryVersion.getVersion()) {
value = -1;
}
else if (getVersion() > fragmentEntryVersion.getVersion()) {
value = 1;
}
else {
value = 0;
}
value = value * -1;
if (value != 0) {
return value;
}
return 0;
}
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof FragmentEntryVersion)) {
return false;
}
FragmentEntryVersion fragmentEntryVersion =
(FragmentEntryVersion)object;
long primaryKey = fragmentEntryVersion.getPrimaryKey();
if (getPrimaryKey() == primaryKey) {
return true;
}
else {
return false;
}
}
@Override
public int hashCode() {
return (int)getPrimaryKey();
}
/**
* @deprecated As of Athanasius (7.3.x), with no direct replacement
*/
@Deprecated
@Override
public boolean isEntityCacheEnabled() {
return true;
}
/**
* @deprecated As of Athanasius (7.3.x), with no direct replacement
*/
@Deprecated
@Override
public boolean isFinderCacheEnabled() {
return true;
}
@Override
public void resetOriginalValues() {
_columnOriginalValues = Collections.emptyMap();
_setModifiedDate = false;
_columnBitmask = 0;
}
@Override
public CacheModel toCacheModel() {
FragmentEntryVersionCacheModel fragmentEntryVersionCacheModel =
new FragmentEntryVersionCacheModel();
fragmentEntryVersionCacheModel.mvccVersion = getMvccVersion();
fragmentEntryVersionCacheModel.ctCollectionId = getCtCollectionId();
fragmentEntryVersionCacheModel.fragmentEntryVersionId =
getFragmentEntryVersionId();
fragmentEntryVersionCacheModel.version = getVersion();
fragmentEntryVersionCacheModel.uuid = getUuid();
String uuid = fragmentEntryVersionCacheModel.uuid;
if ((uuid != null) && (uuid.length() == 0)) {
fragmentEntryVersionCacheModel.uuid = null;
}
fragmentEntryVersionCacheModel.externalReferenceCode =
getExternalReferenceCode();
String externalReferenceCode =
fragmentEntryVersionCacheModel.externalReferenceCode;
if ((externalReferenceCode != null) &&
(externalReferenceCode.length() == 0)) {
fragmentEntryVersionCacheModel.externalReferenceCode = null;
}
fragmentEntryVersionCacheModel.fragmentEntryId = getFragmentEntryId();
fragmentEntryVersionCacheModel.groupId = getGroupId();
fragmentEntryVersionCacheModel.companyId = getCompanyId();
fragmentEntryVersionCacheModel.userId = getUserId();
fragmentEntryVersionCacheModel.userName = getUserName();
String userName = fragmentEntryVersionCacheModel.userName;
if ((userName != null) && (userName.length() == 0)) {
fragmentEntryVersionCacheModel.userName = null;
}
Date createDate = getCreateDate();
if (createDate != null) {
fragmentEntryVersionCacheModel.createDate = createDate.getTime();
}
else {
fragmentEntryVersionCacheModel.createDate = Long.MIN_VALUE;
}
Date modifiedDate = getModifiedDate();
if (modifiedDate != null) {
fragmentEntryVersionCacheModel.modifiedDate =
modifiedDate.getTime();
}
else {
fragmentEntryVersionCacheModel.modifiedDate = Long.MIN_VALUE;
}
fragmentEntryVersionCacheModel.fragmentCollectionId =
getFragmentCollectionId();
fragmentEntryVersionCacheModel.fragmentEntryKey = getFragmentEntryKey();
String fragmentEntryKey =
fragmentEntryVersionCacheModel.fragmentEntryKey;
if ((fragmentEntryKey != null) && (fragmentEntryKey.length() == 0)) {
fragmentEntryVersionCacheModel.fragmentEntryKey = null;
}
fragmentEntryVersionCacheModel.name = getName();
String name = fragmentEntryVersionCacheModel.name;
if ((name != null) && (name.length() == 0)) {
fragmentEntryVersionCacheModel.name = null;
}
fragmentEntryVersionCacheModel.css = getCss();
String css = fragmentEntryVersionCacheModel.css;
if ((css != null) && (css.length() == 0)) {
fragmentEntryVersionCacheModel.css = null;
}
fragmentEntryVersionCacheModel.html = getHtml();
String html = fragmentEntryVersionCacheModel.html;
if ((html != null) && (html.length() == 0)) {
fragmentEntryVersionCacheModel.html = null;
}
fragmentEntryVersionCacheModel.js = getJs();
String js = fragmentEntryVersionCacheModel.js;
if ((js != null) && (js.length() == 0)) {
fragmentEntryVersionCacheModel.js = null;
}
fragmentEntryVersionCacheModel.cacheable = isCacheable();
fragmentEntryVersionCacheModel.configuration = getConfiguration();
String configuration = fragmentEntryVersionCacheModel.configuration;
if ((configuration != null) && (configuration.length() == 0)) {
fragmentEntryVersionCacheModel.configuration = null;
}
fragmentEntryVersionCacheModel.icon = getIcon();
String icon = fragmentEntryVersionCacheModel.icon;
if ((icon != null) && (icon.length() == 0)) {
fragmentEntryVersionCacheModel.icon = null;
}
fragmentEntryVersionCacheModel.previewFileEntryId =
getPreviewFileEntryId();
fragmentEntryVersionCacheModel.readOnly = isReadOnly();
fragmentEntryVersionCacheModel.type = getType();
fragmentEntryVersionCacheModel.typeOptions = getTypeOptions();
String typeOptions = fragmentEntryVersionCacheModel.typeOptions;
if ((typeOptions != null) && (typeOptions.length() == 0)) {
fragmentEntryVersionCacheModel.typeOptions = null;
}
Date lastPublishDate = getLastPublishDate();
if (lastPublishDate != null) {
fragmentEntryVersionCacheModel.lastPublishDate =
lastPublishDate.getTime();
}
else {
fragmentEntryVersionCacheModel.lastPublishDate = Long.MIN_VALUE;
}
fragmentEntryVersionCacheModel.status = getStatus();
fragmentEntryVersionCacheModel.statusByUserId = getStatusByUserId();
fragmentEntryVersionCacheModel.statusByUserName = getStatusByUserName();
String statusByUserName =
fragmentEntryVersionCacheModel.statusByUserName;
if ((statusByUserName != null) && (statusByUserName.length() == 0)) {
fragmentEntryVersionCacheModel.statusByUserName = null;
}
Date statusDate = getStatusDate();
if (statusDate != null) {
fragmentEntryVersionCacheModel.statusDate = statusDate.getTime();
}
else {
fragmentEntryVersionCacheModel.statusDate = Long.MIN_VALUE;
}
return fragmentEntryVersionCacheModel;
}
@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(
(FragmentEntryVersion)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(
FragmentEntryVersion.class, ModelWrapper.class);
}
private long _mvccVersion;
private long _ctCollectionId;
private long _fragmentEntryVersionId;
private int _version;
private String _uuid;
private String _externalReferenceCode;
private long _fragmentEntryId;
private long _groupId;
private long _companyId;
private long _userId;
private String _userName;
private Date _createDate;
private Date _modifiedDate;
private boolean _setModifiedDate;
private long _fragmentCollectionId;
private String _fragmentEntryKey;
private String _name;
private String _css;
private String _html;
private String _js;
private boolean _cacheable;
private String _configuration;
private String _icon;
private long _previewFileEntryId;
private boolean _readOnly;
private int _type;
private String _typeOptions;
private Date _lastPublishDate;
private int _status;
private long _statusByUserId;
private String _statusByUserName;
private Date _statusDate;
public T getColumnValue(String columnName) {
columnName = _attributeNames.getOrDefault(columnName, columnName);
Function function =
AttributeGetterFunctionsHolder._attributeGetterFunctions.get(
columnName);
if (function == null) {
throw new IllegalArgumentException(
"No attribute getter function found for " + columnName);
}
return (T)function.apply((FragmentEntryVersion)this);
}
public T getColumnOriginalValue(String columnName) {
if (_columnOriginalValues == null) {
return null;
}
if (_columnOriginalValues == Collections.EMPTY_MAP) {
_setColumnOriginalValues();
}
return (T)_columnOriginalValues.get(columnName);
}
private void _setColumnOriginalValues() {
_columnOriginalValues = new HashMap();
_columnOriginalValues.put("mvccVersion", _mvccVersion);
_columnOriginalValues.put("ctCollectionId", _ctCollectionId);
_columnOriginalValues.put(
"fragmentEntryVersionId", _fragmentEntryVersionId);
_columnOriginalValues.put("version", _version);
_columnOriginalValues.put("uuid_", _uuid);
_columnOriginalValues.put(
"externalReferenceCode", _externalReferenceCode);
_columnOriginalValues.put("fragmentEntryId", _fragmentEntryId);
_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(
"fragmentCollectionId", _fragmentCollectionId);
_columnOriginalValues.put("fragmentEntryKey", _fragmentEntryKey);
_columnOriginalValues.put("name", _name);
_columnOriginalValues.put("css", _css);
_columnOriginalValues.put("html", _html);
_columnOriginalValues.put("js", _js);
_columnOriginalValues.put("cacheable", _cacheable);
_columnOriginalValues.put("configuration", _configuration);
_columnOriginalValues.put("icon", _icon);
_columnOriginalValues.put("previewFileEntryId", _previewFileEntryId);
_columnOriginalValues.put("readOnly", _readOnly);
_columnOriginalValues.put("type_", _type);
_columnOriginalValues.put("typeOptions", _typeOptions);
_columnOriginalValues.put("lastPublishDate", _lastPublishDate);
_columnOriginalValues.put("status", _status);
_columnOriginalValues.put("statusByUserId", _statusByUserId);
_columnOriginalValues.put("statusByUserName", _statusByUserName);
_columnOriginalValues.put("statusDate", _statusDate);
}
private static final Map _attributeNames;
static {
Map attributeNames = new HashMap<>();
attributeNames.put("uuid_", "uuid");
attributeNames.put("type_", "type");
_attributeNames = Collections.unmodifiableMap(attributeNames);
}
private transient Map _columnOriginalValues;
public static long getColumnBitmask(String columnName) {
return _columnBitmasks.get(columnName);
}
private static final Map _columnBitmasks;
static {
Map columnBitmasks = new HashMap<>();
columnBitmasks.put("mvccVersion", 1L);
columnBitmasks.put("ctCollectionId", 2L);
columnBitmasks.put("fragmentEntryVersionId", 4L);
columnBitmasks.put("version", 8L);
columnBitmasks.put("uuid_", 16L);
columnBitmasks.put("externalReferenceCode", 32L);
columnBitmasks.put("fragmentEntryId", 64L);
columnBitmasks.put("groupId", 128L);
columnBitmasks.put("companyId", 256L);
columnBitmasks.put("userId", 512L);
columnBitmasks.put("userName", 1024L);
columnBitmasks.put("createDate", 2048L);
columnBitmasks.put("modifiedDate", 4096L);
columnBitmasks.put("fragmentCollectionId", 8192L);
columnBitmasks.put("fragmentEntryKey", 16384L);
columnBitmasks.put("name", 32768L);
columnBitmasks.put("css", 65536L);
columnBitmasks.put("html", 131072L);
columnBitmasks.put("js", 262144L);
columnBitmasks.put("cacheable", 524288L);
columnBitmasks.put("configuration", 1048576L);
columnBitmasks.put("icon", 2097152L);
columnBitmasks.put("previewFileEntryId", 4194304L);
columnBitmasks.put("readOnly", 8388608L);
columnBitmasks.put("type_", 16777216L);
columnBitmasks.put("typeOptions", 33554432L);
columnBitmasks.put("lastPublishDate", 67108864L);
columnBitmasks.put("status", 134217728L);
columnBitmasks.put("statusByUserId", 268435456L);
columnBitmasks.put("statusByUserName", 536870912L);
columnBitmasks.put("statusDate", 1073741824L);
_columnBitmasks = Collections.unmodifiableMap(columnBitmasks);
}
private long _columnBitmask;
private FragmentEntryVersion _escapedModel;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy