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

com.liferay.batch.engine.model.impl.BatchEngineImportTaskModelImpl Maven / Gradle / Ivy

There is a newer version: 4.0.115
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.batch.engine.model.impl;

import com.liferay.batch.engine.model.BatchEngineImportTask;
import com.liferay.batch.engine.model.BatchEngineImportTaskContentBlobModel;
import com.liferay.batch.engine.model.BatchEngineImportTaskModel;
import com.liferay.batch.engine.model.BatchEngineImportTaskSoap;
import com.liferay.batch.engine.service.BatchEngineImportTaskLocalServiceUtil;
import com.liferay.expando.kernel.model.ExpandoBridge;
import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil;
import com.liferay.exportimport.kernel.lar.StagedModelType;
import com.liferay.petra.string.StringBundler;
import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.model.CacheModel;
import com.liferay.portal.kernel.model.ModelWrapper;
import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.model.impl.BaseModelImpl;
import com.liferay.portal.kernel.service.ServiceContext;
import com.liferay.portal.kernel.service.UserLocalServiceUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.util.ProxyUtil;

import java.io.Serializable;

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

import java.sql.Blob;
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.Objects;
import java.util.function.BiConsumer;
import java.util.function.Function;

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

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

* * @author Shuyang Zhou * @see BatchEngineImportTaskImpl * @generated */ @JSON(strict = true) public class BatchEngineImportTaskModelImpl extends BaseModelImpl implements BatchEngineImportTaskModel { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a batch engine import task model instance should use the BatchEngineImportTask interface instead. */ public static final String TABLE_NAME = "BatchEngineImportTask"; public static final Object[][] TABLE_COLUMNS = { {"mvccVersion", Types.BIGINT}, {"uuid_", Types.VARCHAR}, {"batchEngineImportTaskId", Types.BIGINT}, {"companyId", Types.BIGINT}, {"userId", Types.BIGINT}, {"createDate", Types.TIMESTAMP}, {"modifiedDate", Types.TIMESTAMP}, {"batchSize", Types.BIGINT}, {"callbackURL", Types.VARCHAR}, {"className", Types.VARCHAR}, {"content", Types.BLOB}, {"contentType", Types.VARCHAR}, {"endTime", Types.TIMESTAMP}, {"errorMessage", Types.CLOB}, {"executeStatus", Types.VARCHAR}, {"fieldNameMapping", Types.CLOB}, {"importStrategy", Types.INTEGER}, {"operation", Types.VARCHAR}, {"parameters", Types.CLOB}, {"processedItemsCount", Types.INTEGER}, {"startTime", Types.TIMESTAMP}, {"taskItemDelegateName", Types.VARCHAR}, {"totalItemsCount", Types.INTEGER} }; 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("batchEngineImportTaskId", Types.BIGINT); TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT); TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("batchSize", Types.BIGINT); TABLE_COLUMNS_MAP.put("callbackURL", Types.VARCHAR); TABLE_COLUMNS_MAP.put("className", Types.VARCHAR); TABLE_COLUMNS_MAP.put("content", Types.BLOB); TABLE_COLUMNS_MAP.put("contentType", Types.VARCHAR); TABLE_COLUMNS_MAP.put("endTime", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("errorMessage", Types.CLOB); TABLE_COLUMNS_MAP.put("executeStatus", Types.VARCHAR); TABLE_COLUMNS_MAP.put("fieldNameMapping", Types.CLOB); TABLE_COLUMNS_MAP.put("importStrategy", Types.INTEGER); TABLE_COLUMNS_MAP.put("operation", Types.VARCHAR); TABLE_COLUMNS_MAP.put("parameters", Types.CLOB); TABLE_COLUMNS_MAP.put("processedItemsCount", Types.INTEGER); TABLE_COLUMNS_MAP.put("startTime", Types.TIMESTAMP); TABLE_COLUMNS_MAP.put("taskItemDelegateName", Types.VARCHAR); TABLE_COLUMNS_MAP.put("totalItemsCount", Types.INTEGER); } public static final String TABLE_SQL_CREATE = "create table BatchEngineImportTask (mvccVersion LONG default 0 not null,uuid_ VARCHAR(75) null,batchEngineImportTaskId LONG not null primary key,companyId LONG,userId LONG,createDate DATE null,modifiedDate DATE null,batchSize LONG,callbackURL VARCHAR(75) null,className VARCHAR(255) null,content BLOB,contentType VARCHAR(75) null,endTime DATE null,errorMessage TEXT null,executeStatus VARCHAR(75) null,fieldNameMapping TEXT null,importStrategy INTEGER,operation VARCHAR(75) null,parameters TEXT null,processedItemsCount INTEGER,startTime DATE null,taskItemDelegateName VARCHAR(75) null,totalItemsCount INTEGER)"; public static final String TABLE_SQL_DROP = "drop table BatchEngineImportTask"; public static final String ORDER_BY_JPQL = " ORDER BY batchEngineImportTask.batchEngineImportTaskId ASC"; public static final String ORDER_BY_SQL = " ORDER BY BatchEngineImportTask.batchEngineImportTaskId 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), 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 EXECUTESTATUS_COLUMN_BITMASK = 2L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link #getColumnBitmask(String)} */ @Deprecated public static final long UUID_COLUMN_BITMASK = 4L; /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnBitmask(String)} */ @Deprecated public static final long BATCHENGINEIMPORTTASKID_COLUMN_BITMASK = 8L; /** * @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) { } /** * Converts the soap model instance into a normal model instance. * * @param soapModel the soap model instance to convert * @return the normal model instance * @deprecated As of Athanasius (7.3.x), with no direct replacement */ @Deprecated public static BatchEngineImportTask toModel( BatchEngineImportTaskSoap soapModel) { if (soapModel == null) { return null; } BatchEngineImportTask model = new BatchEngineImportTaskImpl(); model.setMvccVersion(soapModel.getMvccVersion()); model.setUuid(soapModel.getUuid()); model.setBatchEngineImportTaskId( soapModel.getBatchEngineImportTaskId()); model.setCompanyId(soapModel.getCompanyId()); model.setUserId(soapModel.getUserId()); model.setCreateDate(soapModel.getCreateDate()); model.setModifiedDate(soapModel.getModifiedDate()); model.setBatchSize(soapModel.getBatchSize()); model.setCallbackURL(soapModel.getCallbackURL()); model.setClassName(soapModel.getClassName()); model.setContent(soapModel.getContent()); model.setContentType(soapModel.getContentType()); model.setEndTime(soapModel.getEndTime()); model.setErrorMessage(soapModel.getErrorMessage()); model.setExecuteStatus(soapModel.getExecuteStatus()); model.setFieldNameMapping(soapModel.getFieldNameMapping()); model.setImportStrategy(soapModel.getImportStrategy()); model.setOperation(soapModel.getOperation()); model.setParameters(soapModel.getParameters()); model.setProcessedItemsCount(soapModel.getProcessedItemsCount()); model.setStartTime(soapModel.getStartTime()); model.setTaskItemDelegateName(soapModel.getTaskItemDelegateName()); model.setTotalItemsCount(soapModel.getTotalItemsCount()); return model; } /** * Converts the soap model instances into normal model instances. * * @param soapModels the soap model instances to convert * @return the normal model instances * @deprecated As of Athanasius (7.3.x), with no direct replacement */ @Deprecated public static List toModels( BatchEngineImportTaskSoap[] soapModels) { if (soapModels == null) { return null; } List models = new ArrayList(soapModels.length); for (BatchEngineImportTaskSoap soapModel : soapModels) { models.add(toModel(soapModel)); } return models; } public BatchEngineImportTaskModelImpl() { } @Override public long getPrimaryKey() { return _batchEngineImportTaskId; } @Override public void setPrimaryKey(long primaryKey) { setBatchEngineImportTaskId(primaryKey); } @Override public Serializable getPrimaryKeyObj() { return _batchEngineImportTaskId; } @Override public void setPrimaryKeyObj(Serializable primaryKeyObj) { setPrimaryKey(((Long)primaryKeyObj).longValue()); } @Override public Class getModelClass() { return BatchEngineImportTask.class; } @Override public String getModelClassName() { return BatchEngineImportTask.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((BatchEngineImportTask)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( (BatchEngineImportTask)this, entry.getValue()); } } } public Map> getAttributeGetterFunctions() { return _attributeGetterFunctions; } public Map> getAttributeSetterBiConsumers() { return _attributeSetterBiConsumers; } private static Function _getProxyProviderFunction() { Class proxyClass = ProxyUtil.getProxyClass( BatchEngineImportTask.class.getClassLoader(), BatchEngineImportTask.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( "mvccVersion", BatchEngineImportTask::getMvccVersion); attributeSetterBiConsumers.put( "mvccVersion", (BiConsumer) BatchEngineImportTask::setMvccVersion); attributeGetterFunctions.put("uuid", BatchEngineImportTask::getUuid); attributeSetterBiConsumers.put( "uuid", (BiConsumer) BatchEngineImportTask::setUuid); attributeGetterFunctions.put( "batchEngineImportTaskId", BatchEngineImportTask::getBatchEngineImportTaskId); attributeSetterBiConsumers.put( "batchEngineImportTaskId", (BiConsumer) BatchEngineImportTask::setBatchEngineImportTaskId); attributeGetterFunctions.put( "companyId", BatchEngineImportTask::getCompanyId); attributeSetterBiConsumers.put( "companyId", (BiConsumer) BatchEngineImportTask::setCompanyId); attributeGetterFunctions.put( "userId", BatchEngineImportTask::getUserId); attributeSetterBiConsumers.put( "userId", (BiConsumer) BatchEngineImportTask::setUserId); attributeGetterFunctions.put( "createDate", BatchEngineImportTask::getCreateDate); attributeSetterBiConsumers.put( "createDate", (BiConsumer) BatchEngineImportTask::setCreateDate); attributeGetterFunctions.put( "modifiedDate", BatchEngineImportTask::getModifiedDate); attributeSetterBiConsumers.put( "modifiedDate", (BiConsumer) BatchEngineImportTask::setModifiedDate); attributeGetterFunctions.put( "batchSize", BatchEngineImportTask::getBatchSize); attributeSetterBiConsumers.put( "batchSize", (BiConsumer) BatchEngineImportTask::setBatchSize); attributeGetterFunctions.put( "callbackURL", BatchEngineImportTask::getCallbackURL); attributeSetterBiConsumers.put( "callbackURL", (BiConsumer) BatchEngineImportTask::setCallbackURL); attributeGetterFunctions.put( "className", BatchEngineImportTask::getClassName); attributeSetterBiConsumers.put( "className", (BiConsumer) BatchEngineImportTask::setClassName); attributeGetterFunctions.put( "content", BatchEngineImportTask::getContent); attributeSetterBiConsumers.put( "content", (BiConsumer) BatchEngineImportTask::setContent); attributeGetterFunctions.put( "contentType", BatchEngineImportTask::getContentType); attributeSetterBiConsumers.put( "contentType", (BiConsumer) BatchEngineImportTask::setContentType); attributeGetterFunctions.put( "endTime", BatchEngineImportTask::getEndTime); attributeSetterBiConsumers.put( "endTime", (BiConsumer) BatchEngineImportTask::setEndTime); attributeGetterFunctions.put( "errorMessage", BatchEngineImportTask::getErrorMessage); attributeSetterBiConsumers.put( "errorMessage", (BiConsumer) BatchEngineImportTask::setErrorMessage); attributeGetterFunctions.put( "executeStatus", BatchEngineImportTask::getExecuteStatus); attributeSetterBiConsumers.put( "executeStatus", (BiConsumer) BatchEngineImportTask::setExecuteStatus); attributeGetterFunctions.put( "fieldNameMapping", BatchEngineImportTask::getFieldNameMapping); attributeSetterBiConsumers.put( "fieldNameMapping", (BiConsumer>) BatchEngineImportTask::setFieldNameMapping); attributeGetterFunctions.put( "importStrategy", BatchEngineImportTask::getImportStrategy); attributeSetterBiConsumers.put( "importStrategy", (BiConsumer) BatchEngineImportTask::setImportStrategy); attributeGetterFunctions.put( "operation", BatchEngineImportTask::getOperation); attributeSetterBiConsumers.put( "operation", (BiConsumer) BatchEngineImportTask::setOperation); attributeGetterFunctions.put( "parameters", BatchEngineImportTask::getParameters); attributeSetterBiConsumers.put( "parameters", (BiConsumer>) BatchEngineImportTask::setParameters); attributeGetterFunctions.put( "processedItemsCount", BatchEngineImportTask::getProcessedItemsCount); attributeSetterBiConsumers.put( "processedItemsCount", (BiConsumer) BatchEngineImportTask::setProcessedItemsCount); attributeGetterFunctions.put( "startTime", BatchEngineImportTask::getStartTime); attributeSetterBiConsumers.put( "startTime", (BiConsumer) BatchEngineImportTask::setStartTime); attributeGetterFunctions.put( "taskItemDelegateName", BatchEngineImportTask::getTaskItemDelegateName); attributeSetterBiConsumers.put( "taskItemDelegateName", (BiConsumer) BatchEngineImportTask::setTaskItemDelegateName); attributeGetterFunctions.put( "totalItemsCount", BatchEngineImportTask::getTotalItemsCount); attributeSetterBiConsumers.put( "totalItemsCount", (BiConsumer) BatchEngineImportTask::setTotalItemsCount); _attributeGetterFunctions = Collections.unmodifiableMap( attributeGetterFunctions); _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 long getBatchEngineImportTaskId() { return _batchEngineImportTaskId; } @Override public void setBatchEngineImportTaskId(long batchEngineImportTaskId) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _batchEngineImportTaskId = batchEngineImportTaskId; } @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 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 getBatchSize() { return _batchSize; } @Override public void setBatchSize(long batchSize) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _batchSize = batchSize; } @JSON @Override public String getCallbackURL() { if (_callbackURL == null) { return ""; } else { return _callbackURL; } } @Override public void setCallbackURL(String callbackURL) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _callbackURL = callbackURL; } @JSON @Override public String getClassName() { if (_className == null) { return ""; } else { return _className; } } @Override public void setClassName(String className) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _className = className; } @JSON @Override public Blob getContent() { if (_contentBlobModel == null) { try { _contentBlobModel = BatchEngineImportTaskLocalServiceUtil.getContentBlobModel( getPrimaryKey()); } catch (Exception exception) { } } Blob blob = null; if (_contentBlobModel != null) { blob = _contentBlobModel.getContentBlob(); } return blob; } @Override public void setContent(Blob content) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } if (_contentBlobModel == null) { _contentBlobModel = new BatchEngineImportTaskContentBlobModel( getPrimaryKey(), content); } else { _contentBlobModel.setContentBlob(content); } } @JSON @Override public String getContentType() { if (_contentType == null) { return ""; } else { return _contentType; } } @Override public void setContentType(String contentType) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _contentType = contentType; } @JSON @Override public Date getEndTime() { return _endTime; } @Override public void setEndTime(Date endTime) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _endTime = endTime; } @JSON @Override public String getErrorMessage() { if (_errorMessage == null) { return ""; } else { return _errorMessage; } } @Override public void setErrorMessage(String errorMessage) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _errorMessage = errorMessage; } @JSON @Override public String getExecuteStatus() { if (_executeStatus == null) { return ""; } else { return _executeStatus; } } @Override public void setExecuteStatus(String executeStatus) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _executeStatus = executeStatus; } /** * @deprecated As of Athanasius (7.3.x), replaced by {@link * #getColumnOriginalValue(String)} */ @Deprecated public String getOriginalExecuteStatus() { return getColumnOriginalValue("executeStatus"); } @JSON @Override public Map getFieldNameMapping() { return _fieldNameMapping; } @Override public void setFieldNameMapping( Map fieldNameMapping) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _fieldNameMapping = fieldNameMapping; } @JSON @Override public int getImportStrategy() { return _importStrategy; } @Override public void setImportStrategy(int importStrategy) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _importStrategy = importStrategy; } @JSON @Override public String getOperation() { if (_operation == null) { return ""; } else { return _operation; } } @Override public void setOperation(String operation) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _operation = operation; } @JSON @Override public Map getParameters() { return _parameters; } @Override public void setParameters(Map parameters) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _parameters = parameters; } @JSON @Override public int getProcessedItemsCount() { return _processedItemsCount; } @Override public void setProcessedItemsCount(int processedItemsCount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _processedItemsCount = processedItemsCount; } @JSON @Override public Date getStartTime() { return _startTime; } @Override public void setStartTime(Date startTime) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _startTime = startTime; } @JSON @Override public String getTaskItemDelegateName() { if (_taskItemDelegateName == null) { return ""; } else { return _taskItemDelegateName; } } @Override public void setTaskItemDelegateName(String taskItemDelegateName) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _taskItemDelegateName = taskItemDelegateName; } @JSON @Override public int getTotalItemsCount() { return _totalItemsCount; } @Override public void setTotalItemsCount(int totalItemsCount) { if (_columnOriginalValues == Collections.EMPTY_MAP) { _setColumnOriginalValues(); } _totalItemsCount = totalItemsCount; } @Override public StagedModelType getStagedModelType() { return new StagedModelType( PortalUtil.getClassNameId(BatchEngineImportTask.class.getName())); } 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(), BatchEngineImportTask.class.getName(), getPrimaryKey()); } @Override public void setExpandoBridgeAttributes(ServiceContext serviceContext) { ExpandoBridge expandoBridge = getExpandoBridge(); expandoBridge.setAttributes(serviceContext); } @Override public BatchEngineImportTask toEscapedModel() { if (_escapedModel == null) { Function escapedModelProxyProviderFunction = EscapedModelProxyProviderFunctionHolder. _escapedModelProxyProviderFunction; _escapedModel = escapedModelProxyProviderFunction.apply( new AutoEscapeBeanHandler(this)); } return _escapedModel; } @Override public Object clone() { BatchEngineImportTaskImpl batchEngineImportTaskImpl = new BatchEngineImportTaskImpl(); batchEngineImportTaskImpl.setMvccVersion(getMvccVersion()); batchEngineImportTaskImpl.setUuid(getUuid()); batchEngineImportTaskImpl.setBatchEngineImportTaskId( getBatchEngineImportTaskId()); batchEngineImportTaskImpl.setCompanyId(getCompanyId()); batchEngineImportTaskImpl.setUserId(getUserId()); batchEngineImportTaskImpl.setCreateDate(getCreateDate()); batchEngineImportTaskImpl.setModifiedDate(getModifiedDate()); batchEngineImportTaskImpl.setBatchSize(getBatchSize()); batchEngineImportTaskImpl.setCallbackURL(getCallbackURL()); batchEngineImportTaskImpl.setClassName(getClassName()); batchEngineImportTaskImpl.setContentType(getContentType()); batchEngineImportTaskImpl.setEndTime(getEndTime()); batchEngineImportTaskImpl.setErrorMessage(getErrorMessage()); batchEngineImportTaskImpl.setExecuteStatus(getExecuteStatus()); batchEngineImportTaskImpl.setFieldNameMapping(getFieldNameMapping()); batchEngineImportTaskImpl.setImportStrategy(getImportStrategy()); batchEngineImportTaskImpl.setOperation(getOperation()); batchEngineImportTaskImpl.setParameters(getParameters()); batchEngineImportTaskImpl.setProcessedItemsCount( getProcessedItemsCount()); batchEngineImportTaskImpl.setStartTime(getStartTime()); batchEngineImportTaskImpl.setTaskItemDelegateName( getTaskItemDelegateName()); batchEngineImportTaskImpl.setTotalItemsCount(getTotalItemsCount()); batchEngineImportTaskImpl.resetOriginalValues(); return batchEngineImportTaskImpl; } @Override public BatchEngineImportTask cloneWithOriginalValues() { BatchEngineImportTaskImpl batchEngineImportTaskImpl = new BatchEngineImportTaskImpl(); batchEngineImportTaskImpl.setMvccVersion( this.getColumnOriginalValue("mvccVersion")); batchEngineImportTaskImpl.setUuid( this.getColumnOriginalValue("uuid_")); batchEngineImportTaskImpl.setBatchEngineImportTaskId( this.getColumnOriginalValue("batchEngineImportTaskId")); batchEngineImportTaskImpl.setCompanyId( this.getColumnOriginalValue("companyId")); batchEngineImportTaskImpl.setUserId( this.getColumnOriginalValue("userId")); batchEngineImportTaskImpl.setCreateDate( this.getColumnOriginalValue("createDate")); batchEngineImportTaskImpl.setModifiedDate( this.getColumnOriginalValue("modifiedDate")); batchEngineImportTaskImpl.setBatchSize( this.getColumnOriginalValue("batchSize")); batchEngineImportTaskImpl.setCallbackURL( this.getColumnOriginalValue("callbackURL")); batchEngineImportTaskImpl.setClassName( this.getColumnOriginalValue("className")); batchEngineImportTaskImpl.setContentType( this.getColumnOriginalValue("contentType")); batchEngineImportTaskImpl.setEndTime( this.getColumnOriginalValue("endTime")); batchEngineImportTaskImpl.setErrorMessage( this.getColumnOriginalValue("errorMessage")); batchEngineImportTaskImpl.setExecuteStatus( this.getColumnOriginalValue("executeStatus")); batchEngineImportTaskImpl.setFieldNameMapping( this.getColumnOriginalValue("fieldNameMapping")); batchEngineImportTaskImpl.setImportStrategy( this.getColumnOriginalValue("importStrategy")); batchEngineImportTaskImpl.setOperation( this.getColumnOriginalValue("operation")); batchEngineImportTaskImpl.setParameters( this.getColumnOriginalValue("parameters")); batchEngineImportTaskImpl.setProcessedItemsCount( this.getColumnOriginalValue("processedItemsCount")); batchEngineImportTaskImpl.setStartTime( this.getColumnOriginalValue("startTime")); batchEngineImportTaskImpl.setTaskItemDelegateName( this.getColumnOriginalValue("taskItemDelegateName")); batchEngineImportTaskImpl.setTotalItemsCount( this.getColumnOriginalValue("totalItemsCount")); return batchEngineImportTaskImpl; } @Override public int compareTo(BatchEngineImportTask batchEngineImportTask) { long primaryKey = batchEngineImportTask.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 BatchEngineImportTask)) { return false; } BatchEngineImportTask batchEngineImportTask = (BatchEngineImportTask)object; long primaryKey = batchEngineImportTask.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; _contentBlobModel = null; _columnBitmask = 0; } @Override public CacheModel toCacheModel() { BatchEngineImportTaskCacheModel batchEngineImportTaskCacheModel = new BatchEngineImportTaskCacheModel(); batchEngineImportTaskCacheModel.mvccVersion = getMvccVersion(); batchEngineImportTaskCacheModel.uuid = getUuid(); String uuid = batchEngineImportTaskCacheModel.uuid; if ((uuid != null) && (uuid.length() == 0)) { batchEngineImportTaskCacheModel.uuid = null; } batchEngineImportTaskCacheModel.batchEngineImportTaskId = getBatchEngineImportTaskId(); batchEngineImportTaskCacheModel.companyId = getCompanyId(); batchEngineImportTaskCacheModel.userId = getUserId(); Date createDate = getCreateDate(); if (createDate != null) { batchEngineImportTaskCacheModel.createDate = createDate.getTime(); } else { batchEngineImportTaskCacheModel.createDate = Long.MIN_VALUE; } Date modifiedDate = getModifiedDate(); if (modifiedDate != null) { batchEngineImportTaskCacheModel.modifiedDate = modifiedDate.getTime(); } else { batchEngineImportTaskCacheModel.modifiedDate = Long.MIN_VALUE; } batchEngineImportTaskCacheModel.batchSize = getBatchSize(); batchEngineImportTaskCacheModel.callbackURL = getCallbackURL(); String callbackURL = batchEngineImportTaskCacheModel.callbackURL; if ((callbackURL != null) && (callbackURL.length() == 0)) { batchEngineImportTaskCacheModel.callbackURL = null; } batchEngineImportTaskCacheModel.className = getClassName(); String className = batchEngineImportTaskCacheModel.className; if ((className != null) && (className.length() == 0)) { batchEngineImportTaskCacheModel.className = null; } batchEngineImportTaskCacheModel.contentType = getContentType(); String contentType = batchEngineImportTaskCacheModel.contentType; if ((contentType != null) && (contentType.length() == 0)) { batchEngineImportTaskCacheModel.contentType = null; } Date endTime = getEndTime(); if (endTime != null) { batchEngineImportTaskCacheModel.endTime = endTime.getTime(); } else { batchEngineImportTaskCacheModel.endTime = Long.MIN_VALUE; } batchEngineImportTaskCacheModel.errorMessage = getErrorMessage(); String errorMessage = batchEngineImportTaskCacheModel.errorMessage; if ((errorMessage != null) && (errorMessage.length() == 0)) { batchEngineImportTaskCacheModel.errorMessage = null; } batchEngineImportTaskCacheModel.executeStatus = getExecuteStatus(); String executeStatus = batchEngineImportTaskCacheModel.executeStatus; if ((executeStatus != null) && (executeStatus.length() == 0)) { batchEngineImportTaskCacheModel.executeStatus = null; } batchEngineImportTaskCacheModel.fieldNameMapping = getFieldNameMapping(); batchEngineImportTaskCacheModel.importStrategy = getImportStrategy(); batchEngineImportTaskCacheModel.operation = getOperation(); String operation = batchEngineImportTaskCacheModel.operation; if ((operation != null) && (operation.length() == 0)) { batchEngineImportTaskCacheModel.operation = null; } batchEngineImportTaskCacheModel.parameters = getParameters(); batchEngineImportTaskCacheModel.processedItemsCount = getProcessedItemsCount(); Date startTime = getStartTime(); if (startTime != null) { batchEngineImportTaskCacheModel.startTime = startTime.getTime(); } else { batchEngineImportTaskCacheModel.startTime = Long.MIN_VALUE; } batchEngineImportTaskCacheModel.taskItemDelegateName = getTaskItemDelegateName(); String taskItemDelegateName = batchEngineImportTaskCacheModel.taskItemDelegateName; if ((taskItemDelegateName != null) && (taskItemDelegateName.length() == 0)) { batchEngineImportTaskCacheModel.taskItemDelegateName = null; } batchEngineImportTaskCacheModel.totalItemsCount = getTotalItemsCount(); return batchEngineImportTaskCacheModel; } @Override public String toString() { StringBundler sb = new StringBundler(47); sb.append("{\"mvccVersion\": "); sb.append(getMvccVersion()); sb.append(", \"uuid\": "); sb.append("\"" + getUuid() + "\""); sb.append(", \"batchEngineImportTaskId\": "); sb.append(getBatchEngineImportTaskId()); sb.append(", \"companyId\": "); sb.append(getCompanyId()); sb.append(", \"userId\": "); sb.append(getUserId()); sb.append(", \"createDate\": "); sb.append("\"" + getCreateDate() + "\""); sb.append(", \"modifiedDate\": "); sb.append("\"" + getModifiedDate() + "\""); sb.append(", \"batchSize\": "); sb.append(getBatchSize()); sb.append(", \"callbackURL\": "); sb.append("\"" + getCallbackURL() + "\""); sb.append(", \"className\": "); sb.append("\"" + getClassName() + "\""); sb.append(", \"contentType\": "); sb.append("\"" + getContentType() + "\""); sb.append(", \"endTime\": "); sb.append("\"" + getEndTime() + "\""); sb.append(", \"errorMessage\": "); sb.append("\"" + getErrorMessage() + "\""); sb.append(", \"executeStatus\": "); sb.append("\"" + getExecuteStatus() + "\""); sb.append(", \"fieldNameMapping\": "); sb.append("\"" + getFieldNameMapping() + "\""); sb.append(", \"importStrategy\": "); sb.append(getImportStrategy()); sb.append(", \"operation\": "); sb.append("\"" + getOperation() + "\""); sb.append(", \"parameters\": "); sb.append("\"" + getParameters() + "\""); sb.append(", \"processedItemsCount\": "); sb.append(getProcessedItemsCount()); sb.append(", \"startTime\": "); sb.append("\"" + getStartTime() + "\""); sb.append(", \"taskItemDelegateName\": "); sb.append("\"" + getTaskItemDelegateName() + "\""); sb.append(", \"totalItemsCount\": "); sb.append(getTotalItemsCount()); sb.append("}"); return sb.toString(); } @Override public String toXmlString() { StringBundler sb = new StringBundler(73); sb.append(""); sb.append("com.liferay.batch.engine.model.BatchEngineImportTask"); sb.append(""); sb.append( "mvccVersion"); sb.append( "uuid"); sb.append( "batchEngineImportTaskId"); sb.append( "companyId"); sb.append( "userId"); sb.append( "createDate"); sb.append( "modifiedDate"); sb.append( "batchSize"); sb.append( "callbackURL"); sb.append( "className"); sb.append( "contentType"); sb.append( "endTime"); sb.append( "errorMessage"); sb.append( "executeStatus"); sb.append( "fieldNameMapping"); sb.append( "importStrategy"); sb.append( "operation"); sb.append( "parameters"); sb.append( "processedItemsCount"); sb.append( "startTime"); sb.append( "taskItemDelegateName"); sb.append( "totalItemsCount"); sb.append(""); return sb.toString(); } private static class EscapedModelProxyProviderFunctionHolder { private static final Function _escapedModelProxyProviderFunction = _getProxyProviderFunction(); } private long _mvccVersion; private String _uuid; private long _batchEngineImportTaskId; private long _companyId; private long _userId; private Date _createDate; private Date _modifiedDate; private boolean _setModifiedDate; private long _batchSize; private String _callbackURL; private String _className; private BatchEngineImportTaskContentBlobModel _contentBlobModel; private String _contentType; private Date _endTime; private String _errorMessage; private String _executeStatus; private Map _fieldNameMapping; private int _importStrategy; private String _operation; private Map _parameters; private int _processedItemsCount; private Date _startTime; private String _taskItemDelegateName; private int _totalItemsCount; public T getColumnValue(String columnName) { columnName = _attributeNames.getOrDefault(columnName, columnName); Function function = _attributeGetterFunctions.get(columnName); if (function == null) { throw new IllegalArgumentException( "No attribute getter function found for " + columnName); } return (T)function.apply((BatchEngineImportTask)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( "batchEngineImportTaskId", _batchEngineImportTaskId); _columnOriginalValues.put("companyId", _companyId); _columnOriginalValues.put("userId", _userId); _columnOriginalValues.put("createDate", _createDate); _columnOriginalValues.put("modifiedDate", _modifiedDate); _columnOriginalValues.put("batchSize", _batchSize); _columnOriginalValues.put("callbackURL", _callbackURL); _columnOriginalValues.put("className", _className); _columnOriginalValues.put("contentType", _contentType); _columnOriginalValues.put("endTime", _endTime); _columnOriginalValues.put("errorMessage", _errorMessage); _columnOriginalValues.put("executeStatus", _executeStatus); _columnOriginalValues.put("fieldNameMapping", _fieldNameMapping); _columnOriginalValues.put("importStrategy", _importStrategy); _columnOriginalValues.put("operation", _operation); _columnOriginalValues.put("parameters", _parameters); _columnOriginalValues.put("processedItemsCount", _processedItemsCount); _columnOriginalValues.put("startTime", _startTime); _columnOriginalValues.put( "taskItemDelegateName", _taskItemDelegateName); _columnOriginalValues.put("totalItemsCount", _totalItemsCount); } private static final Map _attributeNames; static { Map attributeNames = new HashMap<>(); attributeNames.put("uuid_", "uuid"); _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("uuid_", 2L); columnBitmasks.put("batchEngineImportTaskId", 4L); columnBitmasks.put("companyId", 8L); columnBitmasks.put("userId", 16L); columnBitmasks.put("createDate", 32L); columnBitmasks.put("modifiedDate", 64L); columnBitmasks.put("batchSize", 128L); columnBitmasks.put("callbackURL", 256L); columnBitmasks.put("className", 512L); columnBitmasks.put("content", 1024L); columnBitmasks.put("contentType", 2048L); columnBitmasks.put("endTime", 4096L); columnBitmasks.put("errorMessage", 8192L); columnBitmasks.put("executeStatus", 16384L); columnBitmasks.put("fieldNameMapping", 32768L); columnBitmasks.put("importStrategy", 65536L); columnBitmasks.put("operation", 131072L); columnBitmasks.put("parameters", 262144L); columnBitmasks.put("processedItemsCount", 524288L); columnBitmasks.put("startTime", 1048576L); columnBitmasks.put("taskItemDelegateName", 2097152L); columnBitmasks.put("totalItemsCount", 4194304L); _columnBitmasks = Collections.unmodifiableMap(columnBitmasks); } private long _columnBitmask; private BatchEngineImportTask _escapedModel; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy