
/*******************************************************************************
 * OpenCPS is the open source Core Public Services software
 * Copyright (C) 2016-present OpenCPS community
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program 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 Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *******************************************************************************/


package org.opencps.dossiermgt.service.impl;

import org.opencps.dossiermgt.service.base.DossierStatusLocalServiceBaseImpl;

/**
 * The implementation of the dossier status local service.
 *
 * <p>
 * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.dossiermgt.service.DossierStatusLocalService} interface.
 *
 * <p>
 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
 * </p>
 *
 * @author trungnt
 * @see org.opencps.dossiermgt.service.base.DossierStatusLocalServiceBaseImpl
 * @see org.opencps.dossiermgt.service.DossierStatusLocalServiceUtil
 */
public class DossierStatusLocalServiceImpl
	extends DossierStatusLocalServiceBaseImpl {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never reference this interface directly. Always use {@link org.opencps.dossiermgt.service.DossierStatusLocalServiceUtil} to access the dossier status local service.
	 */
}
/*******************************************************************************
 * OpenCPS is the open source Core Public Services software
 * Copyright (C) 2016-present OpenCPS community
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program 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 Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *******************************************************************************/

package org.opencps.dossiermgt.service.impl;

import java.util.Date;

import org.opencps.dossiermgt.model.DossierStatus;
import org.opencps.dossiermgt.service.base.DossierStatusLocalServiceBaseImpl;

import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.service.ServiceContext;

/**
 * The implementation of the dossier status local service. <p> All custom
 * service methods should be put in this class. Whenever methods are added,
 * rerun ServiceBuilder to copy their definitions into the
 * {@link org.opencps.dossiermgt.service.DossierStatusLocalService} interface.
 * <p> This is a local service. Methods of this service will not have security
 * checks based on the propagated JAAS credentials because this service can only
 * be accessed from within the same VM. </p>
 *
 * @author trungnt
 * @see org.opencps.dossiermgt.service.base.DossierStatusLocalServiceBaseImpl
 * @see org.opencps.dossiermgt.service.DossierStatusLocalServiceUtil
 */
public class DossierStatusLocalServiceImpl
    extends DossierStatusLocalServiceBaseImpl {
	/*
	 * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
	 * {@link org.opencps.dossiermgt.service.DossierStatusLocalServiceUtil} to
	 * access the dossier status local service.
	 */
	
	public DossierStatus addDossierStatus(
	    long userId, long dossierId, long fileGroupId, int status,
	    String actionInfo, String messageInfo, Date updateDatetime,
	    int syncStatus,
	    ServiceContext serviceContext)
	    throws SystemException {

		long dossierStatusId = counterLocalService
		    .increment(DossierStatus.class
		        .getName());

		DossierStatus dossierStatus = dossierStatusPersistence
		    .create(dossierStatusId);

		Date now = new Date();

		dossierStatus
		    .setUserId(userId);
		dossierStatus
		    .setGroupId(serviceContext
		        .getScopeGroupId());
		dossierStatus
		    .setCompanyId(serviceContext
		        .getCompanyId());
		dossierStatus
		    .setCreateDate(now);
		dossierStatus
		    .setModifiedDate(now);

		dossierStatus
		    .setDossierId(dossierId);
		dossierStatus
		    .setFileGroupId(fileGroupId);
		dossierStatus
		    .setDossierStatus(status);
		dossierStatus
		    .setActionInfo(actionInfo);
		dossierStatus
		    .setMessageInfo(messageInfo);
		dossierStatus
		    .setUpdateDatetime(updateDatetime);
		dossierStatus
		    .setSyncStatus(syncStatus);

		return dossierStatusPersistence
		    .update(dossierStatus);
	}
}

Add method addtatusDossierS