001    /**
002     * Copyright (c) 2000-2013 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.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.PluginSetting;
020    
021    /**
022     * The persistence interface for the plugin setting service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see PluginSettingPersistenceImpl
030     * @see PluginSettingUtil
031     * @generated
032     */
033    @ProviderType
034    public interface PluginSettingPersistence extends BasePersistence<PluginSetting> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link PluginSettingUtil} to access the plugin setting persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the plugin settings where companyId = &#63;.
043            *
044            * @param companyId the company ID
045            * @return the matching plugin settings
046            * @throws SystemException if a system exception occurred
047            */
048            public java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
049                    long companyId)
050                    throws com.liferay.portal.kernel.exception.SystemException;
051    
052            /**
053            * Returns a range of all the plugin settings where companyId = &#63;.
054            *
055            * <p>
056            * 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.portal.model.impl.PluginSettingModelImpl}. 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.
057            * </p>
058            *
059            * @param companyId the company ID
060            * @param start the lower bound of the range of plugin settings
061            * @param end the upper bound of the range of plugin settings (not inclusive)
062            * @return the range of matching plugin settings
063            * @throws SystemException if a system exception occurred
064            */
065            public java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
066                    long companyId, int start, int end)
067                    throws com.liferay.portal.kernel.exception.SystemException;
068    
069            /**
070            * Returns an ordered range of all the plugin settings where companyId = &#63;.
071            *
072            * <p>
073            * 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.portal.model.impl.PluginSettingModelImpl}. 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.
074            * </p>
075            *
076            * @param companyId the company ID
077            * @param start the lower bound of the range of plugin settings
078            * @param end the upper bound of the range of plugin settings (not inclusive)
079            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
080            * @return the ordered range of matching plugin settings
081            * @throws SystemException if a system exception occurred
082            */
083            public java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
084                    long companyId, int start, int end,
085                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * Returns the first plugin setting in the ordered set where companyId = &#63;.
090            *
091            * @param companyId the company ID
092            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
093            * @return the first matching plugin setting
094            * @throws com.liferay.portal.NoSuchPluginSettingException if a matching plugin setting could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.PluginSetting findByCompanyId_First(
098                    long companyId,
099                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
100                    throws com.liferay.portal.NoSuchPluginSettingException,
101                            com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Returns the first plugin setting in the ordered set where companyId = &#63;.
105            *
106            * @param companyId the company ID
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the first matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
109            * @throws SystemException if a system exception occurred
110            */
111            public com.liferay.portal.model.PluginSetting fetchByCompanyId_First(
112                    long companyId,
113                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns the last plugin setting in the ordered set where companyId = &#63;.
118            *
119            * @param companyId the company ID
120            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
121            * @return the last matching plugin setting
122            * @throws com.liferay.portal.NoSuchPluginSettingException if a matching plugin setting could not be found
123            * @throws SystemException if a system exception occurred
124            */
125            public com.liferay.portal.model.PluginSetting findByCompanyId_Last(
126                    long companyId,
127                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
128                    throws com.liferay.portal.NoSuchPluginSettingException,
129                            com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * Returns the last plugin setting in the ordered set where companyId = &#63;.
133            *
134            * @param companyId the company ID
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the last matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
137            * @throws SystemException if a system exception occurred
138            */
139            public com.liferay.portal.model.PluginSetting fetchByCompanyId_Last(
140                    long companyId,
141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Returns the plugin settings before and after the current plugin setting in the ordered set where companyId = &#63;.
146            *
147            * @param pluginSettingId the primary key of the current plugin setting
148            * @param companyId the company ID
149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
150            * @return the previous, current, and next plugin setting
151            * @throws com.liferay.portal.NoSuchPluginSettingException if a plugin setting with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.PluginSetting[] findByCompanyId_PrevAndNext(
155                    long pluginSettingId, long companyId,
156                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157                    throws com.liferay.portal.NoSuchPluginSettingException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Removes all the plugin settings where companyId = &#63; from the database.
162            *
163            * @param companyId the company ID
164            * @throws SystemException if a system exception occurred
165            */
166            public void removeByCompanyId(long companyId)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            /**
170            * Returns the number of plugin settings where companyId = &#63;.
171            *
172            * @param companyId the company ID
173            * @return the number of matching plugin settings
174            * @throws SystemException if a system exception occurred
175            */
176            public int countByCompanyId(long companyId)
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Returns the plugin setting where companyId = &#63; and pluginId = &#63; and pluginType = &#63; or throws a {@link com.liferay.portal.NoSuchPluginSettingException} if it could not be found.
181            *
182            * @param companyId the company ID
183            * @param pluginId the plugin ID
184            * @param pluginType the plugin type
185            * @return the matching plugin setting
186            * @throws com.liferay.portal.NoSuchPluginSettingException if a matching plugin setting could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public com.liferay.portal.model.PluginSetting findByC_I_T(long companyId,
190                    java.lang.String pluginId, java.lang.String pluginType)
191                    throws com.liferay.portal.NoSuchPluginSettingException,
192                            com.liferay.portal.kernel.exception.SystemException;
193    
194            /**
195            * Returns the plugin setting where companyId = &#63; and pluginId = &#63; and pluginType = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
196            *
197            * @param companyId the company ID
198            * @param pluginId the plugin ID
199            * @param pluginType the plugin type
200            * @return the matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
201            * @throws SystemException if a system exception occurred
202            */
203            public com.liferay.portal.model.PluginSetting fetchByC_I_T(long companyId,
204                    java.lang.String pluginId, java.lang.String pluginType)
205                    throws com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * Returns the plugin setting where companyId = &#63; and pluginId = &#63; and pluginType = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
209            *
210            * @param companyId the company ID
211            * @param pluginId the plugin ID
212            * @param pluginType the plugin type
213            * @param retrieveFromCache whether to use the finder cache
214            * @return the matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
215            * @throws SystemException if a system exception occurred
216            */
217            public com.liferay.portal.model.PluginSetting fetchByC_I_T(long companyId,
218                    java.lang.String pluginId, java.lang.String pluginType,
219                    boolean retrieveFromCache)
220                    throws com.liferay.portal.kernel.exception.SystemException;
221    
222            /**
223            * Removes the plugin setting where companyId = &#63; and pluginId = &#63; and pluginType = &#63; from the database.
224            *
225            * @param companyId the company ID
226            * @param pluginId the plugin ID
227            * @param pluginType the plugin type
228            * @return the plugin setting that was removed
229            * @throws SystemException if a system exception occurred
230            */
231            public com.liferay.portal.model.PluginSetting removeByC_I_T(
232                    long companyId, java.lang.String pluginId, java.lang.String pluginType)
233                    throws com.liferay.portal.NoSuchPluginSettingException,
234                            com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Returns the number of plugin settings where companyId = &#63; and pluginId = &#63; and pluginType = &#63;.
238            *
239            * @param companyId the company ID
240            * @param pluginId the plugin ID
241            * @param pluginType the plugin type
242            * @return the number of matching plugin settings
243            * @throws SystemException if a system exception occurred
244            */
245            public int countByC_I_T(long companyId, java.lang.String pluginId,
246                    java.lang.String pluginType)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Caches the plugin setting in the entity cache if it is enabled.
251            *
252            * @param pluginSetting the plugin setting
253            */
254            public void cacheResult(
255                    com.liferay.portal.model.PluginSetting pluginSetting);
256    
257            /**
258            * Caches the plugin settings in the entity cache if it is enabled.
259            *
260            * @param pluginSettings the plugin settings
261            */
262            public void cacheResult(
263                    java.util.List<com.liferay.portal.model.PluginSetting> pluginSettings);
264    
265            /**
266            * Creates a new plugin setting with the primary key. Does not add the plugin setting to the database.
267            *
268            * @param pluginSettingId the primary key for the new plugin setting
269            * @return the new plugin setting
270            */
271            public com.liferay.portal.model.PluginSetting create(long pluginSettingId);
272    
273            /**
274            * Removes the plugin setting with the primary key from the database. Also notifies the appropriate model listeners.
275            *
276            * @param pluginSettingId the primary key of the plugin setting
277            * @return the plugin setting that was removed
278            * @throws com.liferay.portal.NoSuchPluginSettingException if a plugin setting with the primary key could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public com.liferay.portal.model.PluginSetting remove(long pluginSettingId)
282                    throws com.liferay.portal.NoSuchPluginSettingException,
283                            com.liferay.portal.kernel.exception.SystemException;
284    
285            public com.liferay.portal.model.PluginSetting updateImpl(
286                    com.liferay.portal.model.PluginSetting pluginSetting)
287                    throws com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * Returns the plugin setting with the primary key or throws a {@link com.liferay.portal.NoSuchPluginSettingException} if it could not be found.
291            *
292            * @param pluginSettingId the primary key of the plugin setting
293            * @return the plugin setting
294            * @throws com.liferay.portal.NoSuchPluginSettingException if a plugin setting with the primary key could not be found
295            * @throws SystemException if a system exception occurred
296            */
297            public com.liferay.portal.model.PluginSetting findByPrimaryKey(
298                    long pluginSettingId)
299                    throws com.liferay.portal.NoSuchPluginSettingException,
300                            com.liferay.portal.kernel.exception.SystemException;
301    
302            /**
303            * Returns the plugin setting with the primary key or returns <code>null</code> if it could not be found.
304            *
305            * @param pluginSettingId the primary key of the plugin setting
306            * @return the plugin setting, or <code>null</code> if a plugin setting with the primary key could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public com.liferay.portal.model.PluginSetting fetchByPrimaryKey(
310                    long pluginSettingId)
311                    throws com.liferay.portal.kernel.exception.SystemException;
312    
313            /**
314            * Returns all the plugin settings.
315            *
316            * @return the plugin settings
317            * @throws SystemException if a system exception occurred
318            */
319            public java.util.List<com.liferay.portal.model.PluginSetting> findAll()
320                    throws com.liferay.portal.kernel.exception.SystemException;
321    
322            /**
323            * Returns a range of all the plugin settings.
324            *
325            * <p>
326            * 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.portal.model.impl.PluginSettingModelImpl}. 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.
327            * </p>
328            *
329            * @param start the lower bound of the range of plugin settings
330            * @param end the upper bound of the range of plugin settings (not inclusive)
331            * @return the range of plugin settings
332            * @throws SystemException if a system exception occurred
333            */
334            public java.util.List<com.liferay.portal.model.PluginSetting> findAll(
335                    int start, int end)
336                    throws com.liferay.portal.kernel.exception.SystemException;
337    
338            /**
339            * Returns an ordered range of all the plugin settings.
340            *
341            * <p>
342            * 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.portal.model.impl.PluginSettingModelImpl}. 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.
343            * </p>
344            *
345            * @param start the lower bound of the range of plugin settings
346            * @param end the upper bound of the range of plugin settings (not inclusive)
347            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
348            * @return the ordered range of plugin settings
349            * @throws SystemException if a system exception occurred
350            */
351            public java.util.List<com.liferay.portal.model.PluginSetting> findAll(
352                    int start, int end,
353                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
354                    throws com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * Removes all the plugin settings from the database.
358            *
359            * @throws SystemException if a system exception occurred
360            */
361            public void removeAll()
362                    throws com.liferay.portal.kernel.exception.SystemException;
363    
364            /**
365            * Returns the number of plugin settings.
366            *
367            * @return the number of plugin settings
368            * @throws SystemException if a system exception occurred
369            */
370            public int countAll()
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    }