/** * 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.exportimport.staged.model.repository; import com.liferay.exportimport.kernel.lar.PortletDataContext; import com.liferay.exportimport.kernel.lar.PortletDataException; import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.model.StagedModel; import java.util.List; /** * @author Daniel Kocsis */ public interface StagedModelRepository<T extends StagedModel> { public T addStagedModel( PortletDataContext portletDataContext, T stagedModel) throws PortalException; public void deleteStagedModel( String uuid, long groupId, String className, String extraData) throws PortalException; public void deleteStagedModel(T stagedModel) throws PortalException; public void deleteStagedModels(PortletDataContext portletDataContext) throws PortalException; public T fetchMissingReference(String uuid, long groupId); public T fetchStagedModelByUuidAndGroupId(String uuid, long groupId); public List<T> fetchStagedModelsByUuidAndCompanyId( String uuid, long companyId); public ExportActionableDynamicQuery getExportActionableDynamicQuery( PortletDataContext portletDataContext); public void restoreStagedModel( PortletDataContext portletDataContext, T stagedModel) throws PortletDataException; public T saveStagedModel(T stagedModel) throws PortalException; public T updateStagedModel( PortletDataContext portletDataContext, T stagedModel) throws PortalException; }