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, java.lang.String name, int type,
072                    Map<java.lang.String, Serializable> settingsMap)
073                    throws PortalException;
074    
075            public ExportImportConfiguration addDraftExportImportConfiguration(
076                    long userId, int type, 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            public void deleteExportImportConfigurations(long groupId);
132    
133            /**
134            * @throws PortalException
135            */
136            @Override
137            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
138                    throws PortalException;
139    
140            public DynamicQuery dynamicQuery();
141    
142            /**
143            * Performs a dynamic query on the database and returns the matching rows.
144            *
145            * @param dynamicQuery the dynamic query
146            * @return the matching rows
147            */
148            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
149    
150            /**
151            * Performs a dynamic query on the database and returns a range of the matching rows.
152            *
153            * <p>
154            * 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.
155            * </p>
156            *
157            * @param dynamicQuery the dynamic query
158            * @param start the lower bound of the range of model instances
159            * @param end the upper bound of the range of model instances (not inclusive)
160            * @return the range of matching rows
161            */
162            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
163                    int end);
164    
165            /**
166            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
167            *
168            * <p>
169            * 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.
170            * </p>
171            *
172            * @param dynamicQuery the dynamic query
173            * @param start the lower bound of the range of model instances
174            * @param end the upper bound of the range of model instances (not inclusive)
175            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
176            * @return the ordered range of matching rows
177            */
178            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
179                    int end, OrderByComparator<T> orderByComparator);
180    
181            /**
182            * Returns the number of rows matching the dynamic query.
183            *
184            * @param dynamicQuery the dynamic query
185            * @return the number of rows matching the dynamic query
186            */
187            public long dynamicQueryCount(DynamicQuery dynamicQuery);
188    
189            /**
190            * Returns the number of rows matching the dynamic query.
191            *
192            * @param dynamicQuery the dynamic query
193            * @param projection the projection to apply to the query
194            * @return the number of rows matching the dynamic query
195            */
196            public long dynamicQueryCount(DynamicQuery dynamicQuery,
197                    Projection projection);
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public ExportImportConfiguration fetchExportImportConfiguration(
201                    long exportImportConfigurationId);
202    
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public ActionableDynamicQuery getActionableDynamicQuery();
205    
206            /**
207            * Returns the export import configuration with the primary key.
208            *
209            * @param exportImportConfigurationId the primary key of the export import configuration
210            * @return the export import configuration
211            * @throws PortalException if a export import configuration with the primary key could not be found
212            */
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public ExportImportConfiguration getExportImportConfiguration(
215                    long exportImportConfigurationId) throws PortalException;
216    
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public List<ExportImportConfiguration> getExportImportConfigurations(
219                    long companyId, long groupId, java.lang.String keywords, int type,
220                    int start, int end,
221                    OrderByComparator<ExportImportConfiguration> orderByComparator);
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public List<ExportImportConfiguration> getExportImportConfigurations(
225                    long companyId, long groupId, java.lang.String name,
226                    java.lang.String description, int type, boolean andSearch, int start,
227                    int end, OrderByComparator<ExportImportConfiguration> orderByComparator);
228    
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public List<ExportImportConfiguration> getExportImportConfigurations(
231                    long groupId, int type);
232    
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public List<ExportImportConfiguration> getExportImportConfigurations(
235                    long groupId, int type, int start, int end,
236                    OrderByComparator<ExportImportConfiguration> orderByComparator);
237    
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public List<ExportImportConfiguration> getExportImportConfigurations(
240                    Hits hits) throws PortalException;
241    
242            /**
243            * Returns a range of all the export import configurations.
244            *
245            * <p>
246            * 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.
247            * </p>
248            *
249            * @param start the lower bound of the range of export import configurations
250            * @param end the upper bound of the range of export import configurations (not inclusive)
251            * @return the range of export import configurations
252            */
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public List<ExportImportConfiguration> getExportImportConfigurations(
255                    int start, int end);
256    
257            /**
258            * Returns the number of export import configurations.
259            *
260            * @return the number of export import configurations
261            */
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public int getExportImportConfigurationsCount();
264    
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public int getExportImportConfigurationsCount(long companyId, long groupId,
267                    java.lang.String keywords, int type);
268    
269            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270            public int getExportImportConfigurationsCount(long companyId, long groupId,
271                    java.lang.String name, java.lang.String description, int type,
272                    boolean andSearch);
273    
274            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275            public int getExportImportConfigurationsCount(long groupId);
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public int getExportImportConfigurationsCount(long groupId, int type);
279    
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
282    
283            /**
284            * Returns the OSGi service identifier.
285            *
286            * @return the OSGi service identifier
287            */
288            public java.lang.String getOSGiServiceIdentifier();
289    
290            @Override
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
293                    throws PortalException;
294    
295            @Indexable(type = IndexableType.REINDEX)
296            public ExportImportConfiguration moveExportImportConfigurationToTrash(
297                    long userId, long exportImportConfigurationId)
298                    throws PortalException;
299    
300            @Indexable(type = IndexableType.REINDEX)
301            public ExportImportConfiguration restoreExportImportConfigurationFromTrash(
302                    long userId, long exportImportConfigurationId)
303                    throws PortalException;
304    
305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public BaseModelSearchResult<ExportImportConfiguration> searchExportImportConfigurations(
307                    long companyId, long groupId, int type, java.lang.String keywords,
308                    int start, int end, Sort sort) throws PortalException;
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public BaseModelSearchResult<ExportImportConfiguration> searchExportImportConfigurations(
312                    long companyId, long groupId, int type, java.lang.String name,
313                    java.lang.String description, boolean andSearch, int start, int end,
314                    Sort sort) throws PortalException;
315    
316            /**
317            * Updates the export import configuration in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
318            *
319            * @param exportImportConfiguration the export import configuration
320            * @return the export import configuration that was updated
321            */
322            @Indexable(type = IndexableType.REINDEX)
323            public ExportImportConfiguration updateExportImportConfiguration(
324                    ExportImportConfiguration exportImportConfiguration);
325    
326            @Indexable(type = IndexableType.REINDEX)
327            public ExportImportConfiguration updateExportImportConfiguration(
328                    long userId, long exportImportConfigurationId, java.lang.String name,
329                    java.lang.String description,
330                    Map<java.lang.String, Serializable> settingsMap,
331                    ServiceContext serviceContext) throws PortalException;
332    
333            @Indexable(type = IndexableType.REINDEX)
334            public ExportImportConfiguration updateStatus(long userId,
335                    long exportImportConfigurationId, int status) throws PortalException;
336    }