001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.exportimport.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.exportimport.kernel.model.ExportImportConfiguration;
020    
021    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
022    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.Projection;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.model.PersistedModel;
028    import com.liferay.portal.kernel.model.SystemEventConstants;
029    import com.liferay.portal.kernel.search.BaseModelSearchResult;
030    import com.liferay.portal.kernel.search.Hits;
031    import com.liferay.portal.kernel.search.Indexable;
032    import com.liferay.portal.kernel.search.IndexableType;
033    import com.liferay.portal.kernel.search.Sort;
034    import com.liferay.portal.kernel.service.BaseLocalService;
035    import com.liferay.portal.kernel.service.PersistedModelLocalService;
036    import com.liferay.portal.kernel.service.ServiceContext;
037    import com.liferay.portal.kernel.systemevent.SystemEvent;
038    import com.liferay.portal.kernel.transaction.Isolation;
039    import com.liferay.portal.kernel.transaction.Propagation;
040    import com.liferay.portal.kernel.transaction.Transactional;
041    import com.liferay.portal.kernel.util.OrderByComparator;
042    
043    import java.io.Serializable;
044    
045    import java.util.List;
046    import java.util.Map;
047    
048    /**
049     * Provides the local service interface for ExportImportConfiguration. Methods of this
050     * service will not have security checks based on the propagated JAAS
051     * credentials because this service can only be accessed from within the same
052     * VM.
053     *
054     * @author Brian Wing Shun Chan
055     * @see ExportImportConfigurationLocalServiceUtil
056     * @see com.liferay.portlet.exportimport.service.base.ExportImportConfigurationLocalServiceBaseImpl
057     * @see com.liferay.portlet.exportimport.service.impl.ExportImportConfigurationLocalServiceImpl
058     * @generated
059     */
060    @ProviderType
061    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
062            PortalException.class, SystemException.class})
063    public interface ExportImportConfigurationLocalService extends BaseLocalService,
064            PersistedModelLocalService {
065            /*
066             * NOTE FOR DEVELOPERS:
067             *
068             * Never modify or reference this interface directly. Always use {@link ExportImportConfigurationLocalServiceUtil} to access the export import configuration local service. Add custom service methods to {@link com.liferay.portlet.exportimport.service.impl.ExportImportConfigurationLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
069             */
070            public ExportImportConfiguration addDraftExportImportConfiguration(
071                    long userId, int type, Map<java.lang.String, Serializable> settingsMap)
072                    throws PortalException;
073    
074            public ExportImportConfiguration addDraftExportImportConfiguration(
075                    long userId, java.lang.String name, int type,
076                    Map<java.lang.String, Serializable> settingsMap)
077                    throws PortalException;
078    
079            /**
080            * Adds the export import configuration to the database. Also notifies the appropriate model listeners.
081            *
082            * @param exportImportConfiguration the export import configuration
083            * @return the export import configuration that was added
084            */
085            @Indexable(type = IndexableType.REINDEX)
086            public ExportImportConfiguration addExportImportConfiguration(
087                    ExportImportConfiguration exportImportConfiguration);
088    
089            public ExportImportConfiguration addExportImportConfiguration(long userId,
090                    long groupId, java.lang.String name, java.lang.String description,
091                    int type, Map<java.lang.String, Serializable> settingsMap,
092                    ServiceContext serviceContext) throws PortalException;
093    
094            @Indexable(type = IndexableType.REINDEX)
095            public ExportImportConfiguration addExportImportConfiguration(long userId,
096                    long groupId, java.lang.String name, java.lang.String description,
097                    int type, Map<java.lang.String, Serializable> settingsMap, int status,
098                    ServiceContext serviceContext) throws PortalException;
099    
100            /**
101            * Creates a new export import configuration with the primary key. Does not add the export import configuration to the database.
102            *
103            * @param exportImportConfigurationId the primary key for the new export import configuration
104            * @return the new export import configuration
105            */
106            public ExportImportConfiguration createExportImportConfiguration(
107                    long exportImportConfigurationId);
108    
109            /**
110            * Deletes the export import configuration from the database. Also notifies the appropriate model listeners.
111            *
112            * @param exportImportConfiguration the export import configuration
113            * @return the export import configuration that was removed
114            */
115            @Indexable(type = IndexableType.DELETE)
116            @SystemEvent(type = SystemEventConstants.TYPE_DELETE)
117            public ExportImportConfiguration deleteExportImportConfiguration(
118                    ExportImportConfiguration exportImportConfiguration);
119    
120            /**
121            * Deletes the export import configuration with the primary key from the database. Also notifies the appropriate model listeners.
122            *
123            * @param exportImportConfigurationId the primary key of the export import configuration
124            * @return the export import configuration that was removed
125            * @throws PortalException if a export import configuration with the primary key could not be found
126            */
127            @Indexable(type = IndexableType.DELETE)
128            public ExportImportConfiguration deleteExportImportConfiguration(
129                    long exportImportConfigurationId) throws PortalException;
130    
131            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132            public ExportImportConfiguration fetchExportImportConfiguration(
133                    long exportImportConfigurationId);
134    
135            /**
136            * Returns the export import configuration with the primary key.
137            *
138            * @param exportImportConfigurationId the primary key of the export import configuration
139            * @return the export import configuration
140            * @throws PortalException if a export import configuration with the primary key could not be found
141            */
142            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143            public ExportImportConfiguration getExportImportConfiguration(
144                    long exportImportConfigurationId) throws PortalException;
145    
146            @Indexable(type = IndexableType.REINDEX)
147            public ExportImportConfiguration moveExportImportConfigurationToTrash(
148                    long userId, long exportImportConfigurationId)
149                    throws PortalException;
150    
151            @Indexable(type = IndexableType.REINDEX)
152            public ExportImportConfiguration restoreExportImportConfigurationFromTrash(
153                    long userId, long exportImportConfigurationId)
154                    throws PortalException;
155    
156            /**
157            * Updates the export import configuration in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
158            *
159            * @param exportImportConfiguration the export import configuration
160            * @return the export import configuration that was updated
161            */
162            @Indexable(type = IndexableType.REINDEX)
163            public ExportImportConfiguration updateExportImportConfiguration(
164                    ExportImportConfiguration exportImportConfiguration);
165    
166            @Indexable(type = IndexableType.REINDEX)
167            public ExportImportConfiguration updateExportImportConfiguration(
168                    long userId, long exportImportConfigurationId, java.lang.String name,
169                    java.lang.String description,
170                    Map<java.lang.String, Serializable> settingsMap,
171                    ServiceContext serviceContext) throws PortalException;
172    
173            @Indexable(type = IndexableType.REINDEX)
174            public ExportImportConfiguration updateStatus(long userId,
175                    long exportImportConfigurationId, int status) throws PortalException;
176    
177            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178            public ActionableDynamicQuery getActionableDynamicQuery();
179    
180            public DynamicQuery dynamicQuery();
181    
182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
184    
185            /**
186            * @throws PortalException
187            */
188            @Override
189            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
190                    throws PortalException;
191    
192            @Override
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
195                    throws PortalException;
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public BaseModelSearchResult<ExportImportConfiguration> searchExportImportConfigurations(
199                    long companyId, long groupId, int type, java.lang.String keywords,
200                    int start, int end, Sort sort) throws PortalException;
201    
202            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public BaseModelSearchResult<ExportImportConfiguration> searchExportImportConfigurations(
204                    long companyId, long groupId, int type, java.lang.String name,
205                    java.lang.String description, boolean andSearch, int start, int end,
206                    Sort sort) throws PortalException;
207    
208            /**
209            * Returns the number of export import configurations.
210            *
211            * @return the number of export import configurations
212            */
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public int getExportImportConfigurationsCount();
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public int getExportImportConfigurationsCount(long companyId, long groupId,
218                    java.lang.String keywords, int type);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public int getExportImportConfigurationsCount(long companyId, long groupId,
222                    java.lang.String name, java.lang.String description, int type,
223                    boolean andSearch);
224    
225            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226            public int getExportImportConfigurationsCount(long groupId);
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public int getExportImportConfigurationsCount(long groupId, int type);
230    
231            /**
232            * Returns the OSGi service identifier.
233            *
234            * @return the OSGi service identifier
235            */
236            public java.lang.String getOSGiServiceIdentifier();
237    
238            /**
239            * Performs a dynamic query on the database and returns the matching rows.
240            *
241            * @param dynamicQuery the dynamic query
242            * @return the matching rows
243            */
244            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
245    
246            /**
247            * Performs a dynamic query on the database and returns a range of the matching rows.
248            *
249            * <p>
250            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.exportimport.model.impl.ExportImportConfigurationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
251            * </p>
252            *
253            * @param dynamicQuery the dynamic query
254            * @param start the lower bound of the range of model instances
255            * @param end the upper bound of the range of model instances (not inclusive)
256            * @return the range of matching rows
257            */
258            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
259                    int end);
260    
261            /**
262            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
263            *
264            * <p>
265            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.exportimport.model.impl.ExportImportConfigurationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
266            * </p>
267            *
268            * @param dynamicQuery the dynamic query
269            * @param start the lower bound of the range of model instances
270            * @param end the upper bound of the range of model instances (not inclusive)
271            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
272            * @return the ordered range of matching rows
273            */
274            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
275                    int end, OrderByComparator<T> orderByComparator);
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public List<ExportImportConfiguration> getExportImportConfigurations(
279                    Hits hits) throws PortalException;
280    
281            /**
282            * Returns a range of all the export import configurations.
283            *
284            * <p>
285            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.exportimport.model.impl.ExportImportConfigurationModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
286            * </p>
287            *
288            * @param start the lower bound of the range of export import configurations
289            * @param end the upper bound of the range of export import configurations (not inclusive)
290            * @return the range of export import configurations
291            */
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public List<ExportImportConfiguration> getExportImportConfigurations(
294                    int start, int end);
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public List<ExportImportConfiguration> getExportImportConfigurations(
298                    long companyId, long groupId, java.lang.String keywords, int type,
299                    int start, int end,
300                    OrderByComparator<ExportImportConfiguration> orderByComparator);
301    
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public List<ExportImportConfiguration> getExportImportConfigurations(
304                    long companyId, long groupId, java.lang.String name,
305                    java.lang.String description, int type, boolean andSearch, int start,
306                    int end, OrderByComparator<ExportImportConfiguration> orderByComparator);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public List<ExportImportConfiguration> getExportImportConfigurations(
310                    long groupId, int type);
311    
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public List<ExportImportConfiguration> getExportImportConfigurations(
314                    long groupId, int type, int start, int end,
315                    OrderByComparator<ExportImportConfiguration> orderByComparator);
316    
317            /**
318            * Returns the number of rows matching the dynamic query.
319            *
320            * @param dynamicQuery the dynamic query
321            * @return the number of rows matching the dynamic query
322            */
323            public long dynamicQueryCount(DynamicQuery dynamicQuery);
324    
325            /**
326            * Returns the number of rows matching the dynamic query.
327            *
328            * @param dynamicQuery the dynamic query
329            * @param projection the projection to apply to the query
330            * @return the number of rows matching the dynamic query
331            */
332            public long dynamicQueryCount(DynamicQuery dynamicQuery,
333                    Projection projection);
334    
335            public void deleteExportImportConfigurations(long groupId);
336    }