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

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.util.PortalUtil;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import org.oep.dossiermgt.model.DossierProc;
import org.oep.dossiermgt.model.DossierProcModel;
import org.oep.dossiermgt.model.DossierProcSoap;

import java.io.Serializable;

import java.sql.Types;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * The base model implementation for the DossierProc service. Represents a row in the &quot;oep_dossiermgt_dossierproc&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link org.oep.dossiermgt.model.DossierProcModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link DossierProcImpl}.
 * </p>
 *
 * @author trungdk
 * @see DossierProcImpl
 * @see org.oep.dossiermgt.model.DossierProc
 * @see org.oep.dossiermgt.model.DossierProcModel
 * @generated
 */
@JSON(strict = true)
public class DossierProcModelImpl extends BaseModelImpl<DossierProc>
	implements DossierProcModel {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this class directly. All methods that expect a dossier proc model instance should use the {@link org.oep.dossiermgt.model.DossierProc} interface instead.
	 */
	public static final String TABLE_NAME = "oep_dossiermgt_dossierproc";
	public static final Object[][] TABLE_COLUMNS = {
			{ "dossierProcId", Types.BIGINT },
			{ "userId", Types.BIGINT },
			{ "groupId", Types.BIGINT },
			{ "companyId", Types.BIGINT },
			{ "createDate", Types.TIMESTAMP },
			{ "modifiedDate", Types.TIMESTAMP },
			{ "dossierProcNo", Types.VARCHAR },
			{ "name", Types.VARCHAR },
			{ "enName", Types.VARCHAR },
			{ "shortName", Types.VARCHAR },
			{ "processDescription", Types.VARCHAR },
			{ "methodDescription", Types.VARCHAR },
			{ "dossierDescription", Types.VARCHAR },
			{ "conditionDescription", Types.VARCHAR },
			{ "durationDescription", Types.VARCHAR },
			{ "actorsDescription", Types.VARCHAR },
			{ "resultsDescription", Types.VARCHAR },
			{ "recordsDescription", Types.VARCHAR },
			{ "feeDescription", Types.VARCHAR },
			{ "instructionsDescription", Types.VARCHAR },
			{ "administrationNo", Types.VARCHAR },
			{ "administrationName", Types.VARCHAR },
			{ "domainNo", Types.VARCHAR },
			{ "domainName", Types.VARCHAR },
			{ "forCitizen", Types.INTEGER },
			{ "forBusiness", Types.INTEGER },
			{ "effectDate", Types.TIMESTAMP },
			{ "expireDate", Types.TIMESTAMP },
			{ "statusActive", Types.INTEGER }
		};
	public static final String TABLE_SQL_CREATE = "create table oep_dossiermgt_dossierproc (dossierProcId LONG not null primary key,userId LONG,groupId LONG,companyId LONG,createDate DATE null,modifiedDate DATE null,dossierProcNo VARCHAR(30) null,name VARCHAR(200) null,enName VARCHAR(200) null,shortName VARCHAR(100) null,processDescription TEXT null,methodDescription TEXT null,dossierDescription TEXT null,conditionDescription VARCHAR(500) null,durationDescription VARCHAR(255) null,actorsDescription VARCHAR(255) null,resultsDescription VARCHAR(500) null,recordsDescription TEXT null,feeDescription VARCHAR(255) null,instructionsDescription TEXT null,administrationNo VARCHAR(30) null,administrationName VARCHAR(200) null,domainNo VARCHAR(30) null,domainName VARCHAR(200) null,forCitizen INTEGER,forBusiness INTEGER,effectDate DATE null,expireDate DATE null,statusActive INTEGER)";
	public static final String TABLE_SQL_DROP = "drop table oep_dossiermgt_dossierproc";
	public static final String ORDER_BY_JPQL = " ORDER BY dossierProc.dossierProcId ASC";
	public static final String ORDER_BY_SQL = " ORDER BY oep_dossiermgt_dossierproc.dossierProcId 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.util.service.ServiceProps.get(
				"value.object.entity.cache.enabled.org.oep.dossiermgt.model.DossierProc"),
			true);
	public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.finder.cache.enabled.org.oep.dossiermgt.model.DossierProc"),
			true);
	public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.column.bitmask.enabled.org.oep.dossiermgt.model.DossierProc"),
			true);
	public static long ADMINISTRATIONNO_COLUMN_BITMASK = 1L;
	public static long COMPANYID_COLUMN_BITMASK = 2L;
	public static long DOMAINNO_COLUMN_BITMASK = 4L;
	public static long DOSSIERPROCNO_COLUMN_BITMASK = 8L;
	public static long GROUPID_COLUMN_BITMASK = 16L;
	public static long STATUSACTIVE_COLUMN_BITMASK = 32L;
	public static long USERID_COLUMN_BITMASK = 64L;
	public static long DOSSIERPROCID_COLUMN_BITMASK = 128L;

	/**
	 * 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 DossierProc toModel(DossierProcSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		DossierProc model = new DossierProcImpl();

		model.setDossierProcId(soapModel.getDossierProcId());
		model.setUserId(soapModel.getUserId());
		model.setGroupId(soapModel.getGroupId());
		model.setCompanyId(soapModel.getCompanyId());
		model.setCreateDate(soapModel.getCreateDate());
		model.setModifiedDate(soapModel.getModifiedDate());
		model.setDossierProcNo(soapModel.getDossierProcNo());
		model.setName(soapModel.getName());
		model.setEnName(soapModel.getEnName());
		model.setShortName(soapModel.getShortName());
		model.setProcessDescription(soapModel.getProcessDescription());
		model.setMethodDescription(soapModel.getMethodDescription());
		model.setDossierDescription(soapModel.getDossierDescription());
		model.setConditionDescription(soapModel.getConditionDescription());
		model.setDurationDescription(soapModel.getDurationDescription());
		model.setActorsDescription(soapModel.getActorsDescription());
		model.setResultsDescription(soapModel.getResultsDescription());
		model.setRecordsDescription(soapModel.getRecordsDescription());
		model.setFeeDescription(soapModel.getFeeDescription());
		model.setInstructionsDescription(soapModel.getInstructionsDescription());
		model.setAdministrationNo(soapModel.getAdministrationNo());
		model.setAdministrationName(soapModel.getAdministrationName());
		model.setDomainNo(soapModel.getDomainNo());
		model.setDomainName(soapModel.getDomainName());
		model.setForCitizen(soapModel.getForCitizen());
		model.setForBusiness(soapModel.getForBusiness());
		model.setEffectDate(soapModel.getEffectDate());
		model.setExpireDate(soapModel.getExpireDate());
		model.setStatusActive(soapModel.getStatusActive());

		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<DossierProc> toModels(DossierProcSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<DossierProc> models = new ArrayList<DossierProc>(soapModels.length);

		for (DossierProcSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}

	public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
				"lock.expiration.time.org.oep.dossiermgt.model.DossierProc"));

	public DossierProcModelImpl() {
	}

	@Override
	public long getPrimaryKey() {
		return _dossierProcId;
	}

	@Override
	public void setPrimaryKey(long primaryKey) {
		setDossierProcId(primaryKey);
	}

	@Override
	public Serializable getPrimaryKeyObj() {
		return _dossierProcId;
	}

	@Override
	public void setPrimaryKeyObj(Serializable primaryKeyObj) {
		setPrimaryKey(((Long)primaryKeyObj).longValue());
	}

	@Override
	public Class<?> getModelClass() {
		return DossierProc.class;
	}

	@Override
	public String getModelClassName() {
		return DossierProc.class.getName();
	}

	@Override
	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("dossierProcId", getDossierProcId());
		attributes.put("userId", getUserId());
		attributes.put("groupId", getGroupId());
		attributes.put("companyId", getCompanyId());
		attributes.put("createDate", getCreateDate());
		attributes.put("modifiedDate", getModifiedDate());
		attributes.put("dossierProcNo", getDossierProcNo());
		attributes.put("name", getName());
		attributes.put("enName", getEnName());
		attributes.put("shortName", getShortName());
		attributes.put("processDescription", getProcessDescription());
		attributes.put("methodDescription", getMethodDescription());
		attributes.put("dossierDescription", getDossierDescription());
		attributes.put("conditionDescription", getConditionDescription());
		attributes.put("durationDescription", getDurationDescription());
		attributes.put("actorsDescription", getActorsDescription());
		attributes.put("resultsDescription", getResultsDescription());
		attributes.put("recordsDescription", getRecordsDescription());
		attributes.put("feeDescription", getFeeDescription());
		attributes.put("instructionsDescription", getInstructionsDescription());
		attributes.put("administrationNo", getAdministrationNo());
		attributes.put("administrationName", getAdministrationName());
		attributes.put("domainNo", getDomainNo());
		attributes.put("domainName", getDomainName());
		attributes.put("forCitizen", getForCitizen());
		attributes.put("forBusiness", getForBusiness());
		attributes.put("effectDate", getEffectDate());
		attributes.put("expireDate", getExpireDate());
		attributes.put("statusActive", getStatusActive());

		return attributes;
	}

	@Override
	public void setModelAttributes(Map<String, Object> attributes) {
		Long dossierProcId = (Long)attributes.get("dossierProcId");

		if (dossierProcId != null) {
			setDossierProcId(dossierProcId);
		}

		Long userId = (Long)attributes.get("userId");

		if (userId != null) {
			setUserId(userId);
		}

		Long groupId = (Long)attributes.get("groupId");

		if (groupId != null) {
			setGroupId(groupId);
		}

		Long companyId = (Long)attributes.get("companyId");

		if (companyId != null) {
			setCompanyId(companyId);
		}

		Date createDate = (Date)attributes.get("createDate");

		if (createDate != null) {
			setCreateDate(createDate);
		}

		Date modifiedDate = (Date)attributes.get("modifiedDate");

		if (modifiedDate != null) {
			setModifiedDate(modifiedDate);
		}

		String dossierProcNo = (String)attributes.get("dossierProcNo");

		if (dossierProcNo != null) {
			setDossierProcNo(dossierProcNo);
		}

		String name = (String)attributes.get("name");

		if (name != null) {
			setName(name);
		}

		String enName = (String)attributes.get("enName");

		if (enName != null) {
			setEnName(enName);
		}

		String shortName = (String)attributes.get("shortName");

		if (shortName != null) {
			setShortName(shortName);
		}

		String processDescription = (String)attributes.get("processDescription");

		if (processDescription != null) {
			setProcessDescription(processDescription);
		}

		String methodDescription = (String)attributes.get("methodDescription");

		if (methodDescription != null) {
			setMethodDescription(methodDescription);
		}

		String dossierDescription = (String)attributes.get("dossierDescription");

		if (dossierDescription != null) {
			setDossierDescription(dossierDescription);
		}

		String conditionDescription = (String)attributes.get(
				"conditionDescription");

		if (conditionDescription != null) {
			setConditionDescription(conditionDescription);
		}

		String durationDescription = (String)attributes.get(
				"durationDescription");

		if (durationDescription != null) {
			setDurationDescription(durationDescription);
		}

		String actorsDescription = (String)attributes.get("actorsDescription");

		if (actorsDescription != null) {
			setActorsDescription(actorsDescription);
		}

		String resultsDescription = (String)attributes.get("resultsDescription");

		if (resultsDescription != null) {
			setResultsDescription(resultsDescription);
		}

		String recordsDescription = (String)attributes.get("recordsDescription");

		if (recordsDescription != null) {
			setRecordsDescription(recordsDescription);
		}

		String feeDescription = (String)attributes.get("feeDescription");

		if (feeDescription != null) {
			setFeeDescription(feeDescription);
		}

		String instructionsDescription = (String)attributes.get(
				"instructionsDescription");

		if (instructionsDescription != null) {
			setInstructionsDescription(instructionsDescription);
		}

		String administrationNo = (String)attributes.get("administrationNo");

		if (administrationNo != null) {
			setAdministrationNo(administrationNo);
		}

		String administrationName = (String)attributes.get("administrationName");

		if (administrationName != null) {
			setAdministrationName(administrationName);
		}

		String domainNo = (String)attributes.get("domainNo");

		if (domainNo != null) {
			setDomainNo(domainNo);
		}

		String domainName = (String)attributes.get("domainName");

		if (domainName != null) {
			setDomainName(domainName);
		}

		Integer forCitizen = (Integer)attributes.get("forCitizen");

		if (forCitizen != null) {
			setForCitizen(forCitizen);
		}

		Integer forBusiness = (Integer)attributes.get("forBusiness");

		if (forBusiness != null) {
			setForBusiness(forBusiness);
		}

		Date effectDate = (Date)attributes.get("effectDate");

		if (effectDate != null) {
			setEffectDate(effectDate);
		}

		Date expireDate = (Date)attributes.get("expireDate");

		if (expireDate != null) {
			setExpireDate(expireDate);
		}

		Integer statusActive = (Integer)attributes.get("statusActive");

		if (statusActive != null) {
			setStatusActive(statusActive);
		}
	}

	@JSON
	@Override
	public long getDossierProcId() {
		return _dossierProcId;
	}

	@Override
	public void setDossierProcId(long dossierProcId) {
		_dossierProcId = dossierProcId;
	}

	@JSON
	@Override
	public long getUserId() {
		return _userId;
	}

	@Override
	public void setUserId(long userId) {
		_columnBitmask |= USERID_COLUMN_BITMASK;

		if (!_setOriginalUserId) {
			_setOriginalUserId = true;

			_originalUserId = _userId;
		}

		_userId = userId;
	}

	@Override
	public String getUserUuid() throws SystemException {
		return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
	}

	@Override
	public void setUserUuid(String userUuid) {
		_userUuid = userUuid;
	}

	public long getOriginalUserId() {
		return _originalUserId;
	}

	@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 Date getCreateDate() {
		return _createDate;
	}

	@Override
	public void setCreateDate(Date createDate) {
		_createDate = createDate;
	}

	@JSON
	@Override
	public Date getModifiedDate() {
		return _modifiedDate;
	}

	@Override
	public void setModifiedDate(Date modifiedDate) {
		_modifiedDate = modifiedDate;
	}

	@JSON
	@Override
	public String getDossierProcNo() {
		if (_dossierProcNo == null) {
			return StringPool.BLANK;
		}
		else {
			return _dossierProcNo;
		}
	}

	@Override
	public void setDossierProcNo(String dossierProcNo) {
		_columnBitmask |= DOSSIERPROCNO_COLUMN_BITMASK;

		if (_originalDossierProcNo == null) {
			_originalDossierProcNo = _dossierProcNo;
		}

		_dossierProcNo = dossierProcNo;
	}

	public String getOriginalDossierProcNo() {
		return GetterUtil.getString(_originalDossierProcNo);
	}

	@JSON
	@Override
	public String getName() {
		if (_name == null) {
			return StringPool.BLANK;
		}
		else {
			return _name;
		}
	}

	@Override
	public void setName(String name) {
		_name = name;
	}

	@JSON
	@Override
	public String getEnName() {
		if (_enName == null) {
			return StringPool.BLANK;
		}
		else {
			return _enName;
		}
	}

	@Override
	public void setEnName(String enName) {
		_enName = enName;
	}

	@JSON
	@Override
	public String getShortName() {
		if (_shortName == null) {
			return StringPool.BLANK;
		}
		else {
			return _shortName;
		}
	}

	@Override
	public void setShortName(String shortName) {
		_shortName = shortName;
	}

	@JSON
	@Override
	public String getProcessDescription() {
		if (_processDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _processDescription;
		}
	}

	@Override
	public void setProcessDescription(String processDescription) {
		_processDescription = processDescription;
	}

	@JSON
	@Override
	public String getMethodDescription() {
		if (_methodDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _methodDescription;
		}
	}

	@Override
	public void setMethodDescription(String methodDescription) {
		_methodDescription = methodDescription;
	}

	@JSON
	@Override
	public String getDossierDescription() {
		if (_dossierDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _dossierDescription;
		}
	}

	@Override
	public void setDossierDescription(String dossierDescription) {
		_dossierDescription = dossierDescription;
	}

	@JSON
	@Override
	public String getConditionDescription() {
		if (_conditionDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _conditionDescription;
		}
	}

	@Override
	public void setConditionDescription(String conditionDescription) {
		_conditionDescription = conditionDescription;
	}

	@JSON
	@Override
	public String getDurationDescription() {
		if (_durationDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _durationDescription;
		}
	}

	@Override
	public void setDurationDescription(String durationDescription) {
		_durationDescription = durationDescription;
	}

	@JSON
	@Override
	public String getActorsDescription() {
		if (_actorsDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _actorsDescription;
		}
	}

	@Override
	public void setActorsDescription(String actorsDescription) {
		_actorsDescription = actorsDescription;
	}

	@JSON
	@Override
	public String getResultsDescription() {
		if (_resultsDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _resultsDescription;
		}
	}

	@Override
	public void setResultsDescription(String resultsDescription) {
		_resultsDescription = resultsDescription;
	}

	@JSON
	@Override
	public String getRecordsDescription() {
		if (_recordsDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _recordsDescription;
		}
	}

	@Override
	public void setRecordsDescription(String recordsDescription) {
		_recordsDescription = recordsDescription;
	}

	@JSON
	@Override
	public String getFeeDescription() {
		if (_feeDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _feeDescription;
		}
	}

	@Override
	public void setFeeDescription(String feeDescription) {
		_feeDescription = feeDescription;
	}

	@JSON
	@Override
	public String getInstructionsDescription() {
		if (_instructionsDescription == null) {
			return StringPool.BLANK;
		}
		else {
			return _instructionsDescription;
		}
	}

	@Override
	public void setInstructionsDescription(String instructionsDescription) {
		_instructionsDescription = instructionsDescription;
	}

	@JSON
	@Override
	public String getAdministrationNo() {
		if (_administrationNo == null) {
			return StringPool.BLANK;
		}
		else {
			return _administrationNo;
		}
	}

	@Override
	public void setAdministrationNo(String administrationNo) {
		_columnBitmask |= ADMINISTRATIONNO_COLUMN_BITMASK;

		if (_originalAdministrationNo == null) {
			_originalAdministrationNo = _administrationNo;
		}

		_administrationNo = administrationNo;
	}

	public String getOriginalAdministrationNo() {
		return GetterUtil.getString(_originalAdministrationNo);
	}

	@JSON
	@Override
	public String getAdministrationName() {
		if (_administrationName == null) {
			return StringPool.BLANK;
		}
		else {
			return _administrationName;
		}
	}

	@Override
	public void setAdministrationName(String administrationName) {
		_administrationName = administrationName;
	}

	@JSON
	@Override
	public String getDomainNo() {
		if (_domainNo == null) {
			return StringPool.BLANK;
		}
		else {
			return _domainNo;
		}
	}

	@Override
	public void setDomainNo(String domainNo) {
		_columnBitmask |= DOMAINNO_COLUMN_BITMASK;

		if (_originalDomainNo == null) {
			_originalDomainNo = _domainNo;
		}

		_domainNo = domainNo;
	}

	public String getOriginalDomainNo() {
		return GetterUtil.getString(_originalDomainNo);
	}

	@JSON
	@Override
	public String getDomainName() {
		if (_domainName == null) {
			return StringPool.BLANK;
		}
		else {
			return _domainName;
		}
	}

	@Override
	public void setDomainName(String domainName) {
		_domainName = domainName;
	}

	@JSON
	@Override
	public int getForCitizen() {
		return _forCitizen;
	}

	@Override
	public void setForCitizen(int forCitizen) {
		_forCitizen = forCitizen;
	}

	@JSON
	@Override
	public int getForBusiness() {
		return _forBusiness;
	}

	@Override
	public void setForBusiness(int forBusiness) {
		_forBusiness = forBusiness;
	}

	@JSON
	@Override
	public Date getEffectDate() {
		return _effectDate;
	}

	@Override
	public void setEffectDate(Date effectDate) {
		_effectDate = effectDate;
	}

	@JSON
	@Override
	public Date getExpireDate() {
		return _expireDate;
	}

	@Override
	public void setExpireDate(Date expireDate) {
		_expireDate = expireDate;
	}

	@JSON
	@Override
	public int getStatusActive() {
		return _statusActive;
	}

	@Override
	public void setStatusActive(int statusActive) {
		_columnBitmask |= STATUSACTIVE_COLUMN_BITMASK;

		if (!_setOriginalStatusActive) {
			_setOriginalStatusActive = true;

			_originalStatusActive = _statusActive;
		}

		_statusActive = statusActive;
	}

	public int getOriginalStatusActive() {
		return _originalStatusActive;
	}

	public long getColumnBitmask() {
		return _columnBitmask;
	}

	@Override
	public ExpandoBridge getExpandoBridge() {
		return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
			DossierProc.class.getName(), getPrimaryKey());
	}

	@Override
	public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
		ExpandoBridge expandoBridge = getExpandoBridge();

		expandoBridge.setAttributes(serviceContext);
	}

	@Override
	public DossierProc toEscapedModel() {
		if (_escapedModel == null) {
			_escapedModel = (DossierProc)ProxyUtil.newProxyInstance(_classLoader,
					_escapedModelInterfaces, new AutoEscapeBeanHandler(this));
		}

		return _escapedModel;
	}

	@Override
	public Object clone() {
		DossierProcImpl dossierProcImpl = new DossierProcImpl();

		dossierProcImpl.setDossierProcId(getDossierProcId());
		dossierProcImpl.setUserId(getUserId());
		dossierProcImpl.setGroupId(getGroupId());
		dossierProcImpl.setCompanyId(getCompanyId());
		dossierProcImpl.setCreateDate(getCreateDate());
		dossierProcImpl.setModifiedDate(getModifiedDate());
		dossierProcImpl.setDossierProcNo(getDossierProcNo());
		dossierProcImpl.setName(getName());
		dossierProcImpl.setEnName(getEnName());
		dossierProcImpl.setShortName(getShortName());
		dossierProcImpl.setProcessDescription(getProcessDescription());
		dossierProcImpl.setMethodDescription(getMethodDescription());
		dossierProcImpl.setDossierDescription(getDossierDescription());
		dossierProcImpl.setConditionDescription(getConditionDescription());
		dossierProcImpl.setDurationDescription(getDurationDescription());
		dossierProcImpl.setActorsDescription(getActorsDescription());
		dossierProcImpl.setResultsDescription(getResultsDescription());
		dossierProcImpl.setRecordsDescription(getRecordsDescription());
		dossierProcImpl.setFeeDescription(getFeeDescription());
		dossierProcImpl.setInstructionsDescription(getInstructionsDescription());
		dossierProcImpl.setAdministrationNo(getAdministrationNo());
		dossierProcImpl.setAdministrationName(getAdministrationName());
		dossierProcImpl.setDomainNo(getDomainNo());
		dossierProcImpl.setDomainName(getDomainName());
		dossierProcImpl.setForCitizen(getForCitizen());
		dossierProcImpl.setForBusiness(getForBusiness());
		dossierProcImpl.setEffectDate(getEffectDate());
		dossierProcImpl.setExpireDate(getExpireDate());
		dossierProcImpl.setStatusActive(getStatusActive());

		dossierProcImpl.resetOriginalValues();

		return dossierProcImpl;
	}

	@Override
	public int compareTo(DossierProc dossierProc) {
		long primaryKey = dossierProc.getPrimaryKey();

		if (getPrimaryKey() < primaryKey) {
			return -1;
		}
		else if (getPrimaryKey() > primaryKey) {
			return 1;
		}
		else {
			return 0;
		}
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof DossierProc)) {
			return false;
		}

		DossierProc dossierProc = (DossierProc)obj;

		long primaryKey = dossierProc.getPrimaryKey();

		if (getPrimaryKey() == primaryKey) {
			return true;
		}
		else {
			return false;
		}
	}

	@Override
	public int hashCode() {
		return (int)getPrimaryKey();
	}

	@Override
	public void resetOriginalValues() {
		DossierProcModelImpl dossierProcModelImpl = this;

		dossierProcModelImpl._originalUserId = dossierProcModelImpl._userId;

		dossierProcModelImpl._setOriginalUserId = false;

		dossierProcModelImpl._originalGroupId = dossierProcModelImpl._groupId;

		dossierProcModelImpl._setOriginalGroupId = false;

		dossierProcModelImpl._originalCompanyId = dossierProcModelImpl._companyId;

		dossierProcModelImpl._setOriginalCompanyId = false;

		dossierProcModelImpl._originalDossierProcNo = dossierProcModelImpl._dossierProcNo;

		dossierProcModelImpl._originalAdministrationNo = dossierProcModelImpl._administrationNo;

		dossierProcModelImpl._originalDomainNo = dossierProcModelImpl._domainNo;

		dossierProcModelImpl._originalStatusActive = dossierProcModelImpl._statusActive;

		dossierProcModelImpl._setOriginalStatusActive = false;

		dossierProcModelImpl._columnBitmask = 0;
	}

	@Override
	public CacheModel<DossierProc> toCacheModel() {
		DossierProcCacheModel dossierProcCacheModel = new DossierProcCacheModel();

		dossierProcCacheModel.dossierProcId = getDossierProcId();

		dossierProcCacheModel.userId = getUserId();

		dossierProcCacheModel.groupId = getGroupId();

		dossierProcCacheModel.companyId = getCompanyId();

		Date createDate = getCreateDate();

		if (createDate != null) {
			dossierProcCacheModel.createDate = createDate.getTime();
		}
		else {
			dossierProcCacheModel.createDate = Long.MIN_VALUE;
		}

		Date modifiedDate = getModifiedDate();

		if (modifiedDate != null) {
			dossierProcCacheModel.modifiedDate = modifiedDate.getTime();
		}
		else {
			dossierProcCacheModel.modifiedDate = Long.MIN_VALUE;
		}

		dossierProcCacheModel.dossierProcNo = getDossierProcNo();

		String dossierProcNo = dossierProcCacheModel.dossierProcNo;

		if ((dossierProcNo != null) && (dossierProcNo.length() == 0)) {
			dossierProcCacheModel.dossierProcNo = null;
		}

		dossierProcCacheModel.name = getName();

		String name = dossierProcCacheModel.name;

		if ((name != null) && (name.length() == 0)) {
			dossierProcCacheModel.name = null;
		}

		dossierProcCacheModel.enName = getEnName();

		String enName = dossierProcCacheModel.enName;

		if ((enName != null) && (enName.length() == 0)) {
			dossierProcCacheModel.enName = null;
		}

		dossierProcCacheModel.shortName = getShortName();

		String shortName = dossierProcCacheModel.shortName;

		if ((shortName != null) && (shortName.length() == 0)) {
			dossierProcCacheModel.shortName = null;
		}

		dossierProcCacheModel.processDescription = getProcessDescription();

		String processDescription = dossierProcCacheModel.processDescription;

		if ((processDescription != null) && (processDescription.length() == 0)) {
			dossierProcCacheModel.processDescription = null;
		}

		dossierProcCacheModel.methodDescription = getMethodDescription();

		String methodDescription = dossierProcCacheModel.methodDescription;

		if ((methodDescription != null) && (methodDescription.length() == 0)) {
			dossierProcCacheModel.methodDescription = null;
		}

		dossierProcCacheModel.dossierDescription = getDossierDescription();

		String dossierDescription = dossierProcCacheModel.dossierDescription;

		if ((dossierDescription != null) && (dossierDescription.length() == 0)) {
			dossierProcCacheModel.dossierDescription = null;
		}

		dossierProcCacheModel.conditionDescription = getConditionDescription();

		String conditionDescription = dossierProcCacheModel.conditionDescription;

		if ((conditionDescription != null) &&
				(conditionDescription.length() == 0)) {
			dossierProcCacheModel.conditionDescription = null;
		}

		dossierProcCacheModel.durationDescription = getDurationDescription();

		String durationDescription = dossierProcCacheModel.durationDescription;

		if ((durationDescription != null) &&
				(durationDescription.length() == 0)) {
			dossierProcCacheModel.durationDescription = null;
		}

		dossierProcCacheModel.actorsDescription = getActorsDescription();

		String actorsDescription = dossierProcCacheModel.actorsDescription;

		if ((actorsDescription != null) && (actorsDescription.length() == 0)) {
			dossierProcCacheModel.actorsDescription = null;
		}

		dossierProcCacheModel.resultsDescription = getResultsDescription();

		String resultsDescription = dossierProcCacheModel.resultsDescription;

		if ((resultsDescription != null) && (resultsDescription.length() == 0)) {
			dossierProcCacheModel.resultsDescription = null;
		}

		dossierProcCacheModel.recordsDescription = getRecordsDescription();

		String recordsDescription = dossierProcCacheModel.recordsDescription;

		if ((recordsDescription != null) && (recordsDescription.length() == 0)) {
			dossierProcCacheModel.recordsDescription = null;
		}

		dossierProcCacheModel.feeDescription = getFeeDescription();

		String feeDescription = dossierProcCacheModel.feeDescription;

		if ((feeDescription != null) && (feeDescription.length() == 0)) {
			dossierProcCacheModel.feeDescription = null;
		}

		dossierProcCacheModel.instructionsDescription = getInstructionsDescription();

		String instructionsDescription = dossierProcCacheModel.instructionsDescription;

		if ((instructionsDescription != null) &&
				(instructionsDescription.length() == 0)) {
			dossierProcCacheModel.instructionsDescription = null;
		}

		dossierProcCacheModel.administrationNo = getAdministrationNo();

		String administrationNo = dossierProcCacheModel.administrationNo;

		if ((administrationNo != null) && (administrationNo.length() == 0)) {
			dossierProcCacheModel.administrationNo = null;
		}

		dossierProcCacheModel.administrationName = getAdministrationName();

		String administrationName = dossierProcCacheModel.administrationName;

		if ((administrationName != null) && (administrationName.length() == 0)) {
			dossierProcCacheModel.administrationName = null;
		}

		dossierProcCacheModel.domainNo = getDomainNo();

		String domainNo = dossierProcCacheModel.domainNo;

		if ((domainNo != null) && (domainNo.length() == 0)) {
			dossierProcCacheModel.domainNo = null;
		}

		dossierProcCacheModel.domainName = getDomainName();

		String domainName = dossierProcCacheModel.domainName;

		if ((domainName != null) && (domainName.length() == 0)) {
			dossierProcCacheModel.domainName = null;
		}

		dossierProcCacheModel.forCitizen = getForCitizen();

		dossierProcCacheModel.forBusiness = getForBusiness();

		Date effectDate = getEffectDate();

		if (effectDate != null) {
			dossierProcCacheModel.effectDate = effectDate.getTime();
		}
		else {
			dossierProcCacheModel.effectDate = Long.MIN_VALUE;
		}

		Date expireDate = getExpireDate();

		if (expireDate != null) {
			dossierProcCacheModel.expireDate = expireDate.getTime();
		}
		else {
			dossierProcCacheModel.expireDate = Long.MIN_VALUE;
		}

		dossierProcCacheModel.statusActive = getStatusActive();

		return dossierProcCacheModel;
	}

	@Override
	public String toString() {
		StringBundler sb = new StringBundler(59);

		sb.append("{dossierProcId=");
		sb.append(getDossierProcId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", groupId=");
		sb.append(getGroupId());
		sb.append(", companyId=");
		sb.append(getCompanyId());
		sb.append(", createDate=");
		sb.append(getCreateDate());
		sb.append(", modifiedDate=");
		sb.append(getModifiedDate());
		sb.append(", dossierProcNo=");
		sb.append(getDossierProcNo());
		sb.append(", name=");
		sb.append(getName());
		sb.append(", enName=");
		sb.append(getEnName());
		sb.append(", shortName=");
		sb.append(getShortName());
		sb.append(", processDescription=");
		sb.append(getProcessDescription());
		sb.append(", methodDescription=");
		sb.append(getMethodDescription());
		sb.append(", dossierDescription=");
		sb.append(getDossierDescription());
		sb.append(", conditionDescription=");
		sb.append(getConditionDescription());
		sb.append(", durationDescription=");
		sb.append(getDurationDescription());
		sb.append(", actorsDescription=");
		sb.append(getActorsDescription());
		sb.append(", resultsDescription=");
		sb.append(getResultsDescription());
		sb.append(", recordsDescription=");
		sb.append(getRecordsDescription());
		sb.append(", feeDescription=");
		sb.append(getFeeDescription());
		sb.append(", instructionsDescription=");
		sb.append(getInstructionsDescription());
		sb.append(", administrationNo=");
		sb.append(getAdministrationNo());
		sb.append(", administrationName=");
		sb.append(getAdministrationName());
		sb.append(", domainNo=");
		sb.append(getDomainNo());
		sb.append(", domainName=");
		sb.append(getDomainName());
		sb.append(", forCitizen=");
		sb.append(getForCitizen());
		sb.append(", forBusiness=");
		sb.append(getForBusiness());
		sb.append(", effectDate=");
		sb.append(getEffectDate());
		sb.append(", expireDate=");
		sb.append(getExpireDate());
		sb.append(", statusActive=");
		sb.append(getStatusActive());
		sb.append("}");

		return sb.toString();
	}

	@Override
	public String toXmlString() {
		StringBundler sb = new StringBundler(91);

		sb.append("<model><model-name>");
		sb.append("org.oep.dossiermgt.model.DossierProc");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>dossierProcId</column-name><column-value><![CDATA[");
		sb.append(getDossierProcId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>groupId</column-name><column-value><![CDATA[");
		sb.append(getGroupId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>companyId</column-name><column-value><![CDATA[");
		sb.append(getCompanyId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>createDate</column-name><column-value><![CDATA[");
		sb.append(getCreateDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
		sb.append(getModifiedDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>dossierProcNo</column-name><column-value><![CDATA[");
		sb.append(getDossierProcNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>name</column-name><column-value><![CDATA[");
		sb.append(getName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>enName</column-name><column-value><![CDATA[");
		sb.append(getEnName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>shortName</column-name><column-value><![CDATA[");
		sb.append(getShortName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>processDescription</column-name><column-value><![CDATA[");
		sb.append(getProcessDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>methodDescription</column-name><column-value><![CDATA[");
		sb.append(getMethodDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>dossierDescription</column-name><column-value><![CDATA[");
		sb.append(getDossierDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>conditionDescription</column-name><column-value><![CDATA[");
		sb.append(getConditionDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>durationDescription</column-name><column-value><![CDATA[");
		sb.append(getDurationDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>actorsDescription</column-name><column-value><![CDATA[");
		sb.append(getActorsDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>resultsDescription</column-name><column-value><![CDATA[");
		sb.append(getResultsDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>recordsDescription</column-name><column-value><![CDATA[");
		sb.append(getRecordsDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>feeDescription</column-name><column-value><![CDATA[");
		sb.append(getFeeDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>instructionsDescription</column-name><column-value><![CDATA[");
		sb.append(getInstructionsDescription());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>administrationNo</column-name><column-value><![CDATA[");
		sb.append(getAdministrationNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>administrationName</column-name><column-value><![CDATA[");
		sb.append(getAdministrationName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>domainNo</column-name><column-value><![CDATA[");
		sb.append(getDomainNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>domainName</column-name><column-value><![CDATA[");
		sb.append(getDomainName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>forCitizen</column-name><column-value><![CDATA[");
		sb.append(getForCitizen());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>forBusiness</column-name><column-value><![CDATA[");
		sb.append(getForBusiness());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>effectDate</column-name><column-value><![CDATA[");
		sb.append(getEffectDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>expireDate</column-name><column-value><![CDATA[");
		sb.append(getExpireDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>statusActive</column-name><column-value><![CDATA[");
		sb.append(getStatusActive());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private static ClassLoader _classLoader = DossierProc.class.getClassLoader();
	private static Class<?>[] _escapedModelInterfaces = new Class[] {
			DossierProc.class
		};
	private long _dossierProcId;
	private long _userId;
	private String _userUuid;
	private long _originalUserId;
	private boolean _setOriginalUserId;
	private long _groupId;
	private long _originalGroupId;
	private boolean _setOriginalGroupId;
	private long _companyId;
	private long _originalCompanyId;
	private boolean _setOriginalCompanyId;
	private Date _createDate;
	private Date _modifiedDate;
	private String _dossierProcNo;
	private String _originalDossierProcNo;
	private String _name;
	private String _enName;
	private String _shortName;
	private String _processDescription;
	private String _methodDescription;
	private String _dossierDescription;
	private String _conditionDescription;
	private String _durationDescription;
	private String _actorsDescription;
	private String _resultsDescription;
	private String _recordsDescription;
	private String _feeDescription;
	private String _instructionsDescription;
	private String _administrationNo;
	private String _originalAdministrationNo;
	private String _administrationName;
	private String _domainNo;
	private String _originalDomainNo;
	private String _domainName;
	private int _forCitizen;
	private int _forBusiness;
	private Date _effectDate;
	private Date _expireDate;
	private int _statusActive;
	private int _originalStatusActive;
	private boolean _setOriginalStatusActive;
	private long _columnBitmask;
	private DossierProc _escapedModel;
}