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.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.PluginSetting;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the plugin setting service. This utility wraps {@link PluginSettingPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see PluginSettingPersistence
037     * @see PluginSettingPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class PluginSettingUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(PluginSetting pluginSetting) {
059                    getPersistence().clearCache(pluginSetting);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<PluginSetting> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<PluginSetting> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<PluginSetting> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<PluginSetting> orderByComparator) {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static PluginSetting update(PluginSetting pluginSetting) {
100                    return getPersistence().update(pluginSetting);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static PluginSetting update(PluginSetting pluginSetting,
107                    ServiceContext serviceContext) {
108                    return getPersistence().update(pluginSetting, serviceContext);
109            }
110    
111            /**
112            * Returns all the plugin settings where companyId = &#63;.
113            *
114            * @param companyId the company ID
115            * @return the matching plugin settings
116            */
117            public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
118                    long companyId) {
119                    return getPersistence().findByCompanyId(companyId);
120            }
121    
122            /**
123            * Returns a range of all the plugin settings where companyId = &#63;.
124            *
125            * <p>
126            * 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.
127            * </p>
128            *
129            * @param companyId the company ID
130            * @param start the lower bound of the range of plugin settings
131            * @param end the upper bound of the range of plugin settings (not inclusive)
132            * @return the range of matching plugin settings
133            */
134            public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
135                    long companyId, int start, int end) {
136                    return getPersistence().findByCompanyId(companyId, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the plugin settings where companyId = &#63;.
141            *
142            * <p>
143            * 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.
144            * </p>
145            *
146            * @param companyId the company ID
147            * @param start the lower bound of the range of plugin settings
148            * @param end the upper bound of the range of plugin settings (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching plugin settings
151            */
152            public static java.util.List<com.liferay.portal.model.PluginSetting> findByCompanyId(
153                    long companyId, int start, int end,
154                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PluginSetting> orderByComparator) {
155                    return getPersistence()
156                                       .findByCompanyId(companyId, start, end, orderByComparator);
157            }
158    
159            /**
160            * Returns the first plugin setting in the ordered set where companyId = &#63;.
161            *
162            * @param companyId the company ID
163            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
164            * @return the first matching plugin setting
165            * @throws com.liferay.portal.NoSuchPluginSettingException if a matching plugin setting could not be found
166            */
167            public static com.liferay.portal.model.PluginSetting findByCompanyId_First(
168                    long companyId,
169                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PluginSetting> orderByComparator)
170                    throws com.liferay.portal.NoSuchPluginSettingException {
171                    return getPersistence()
172                                       .findByCompanyId_First(companyId, orderByComparator);
173            }
174    
175            /**
176            * Returns the first plugin setting in the ordered set where companyId = &#63;.
177            *
178            * @param companyId the company ID
179            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
180            * @return the first matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
181            */
182            public static com.liferay.portal.model.PluginSetting fetchByCompanyId_First(
183                    long companyId,
184                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PluginSetting> orderByComparator) {
185                    return getPersistence()
186                                       .fetchByCompanyId_First(companyId, orderByComparator);
187            }
188    
189            /**
190            * Returns the last plugin setting in the ordered set where companyId = &#63;.
191            *
192            * @param companyId the company ID
193            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
194            * @return the last matching plugin setting
195            * @throws com.liferay.portal.NoSuchPluginSettingException if a matching plugin setting could not be found
196            */
197            public static com.liferay.portal.model.PluginSetting findByCompanyId_Last(
198                    long companyId,
199                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PluginSetting> orderByComparator)
200                    throws com.liferay.portal.NoSuchPluginSettingException {
201                    return getPersistence()
202                                       .findByCompanyId_Last(companyId, orderByComparator);
203            }
204    
205            /**
206            * Returns the last plugin setting in the ordered set where companyId = &#63;.
207            *
208            * @param companyId the company ID
209            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
210            * @return the last matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
211            */
212            public static com.liferay.portal.model.PluginSetting fetchByCompanyId_Last(
213                    long companyId,
214                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PluginSetting> orderByComparator) {
215                    return getPersistence()
216                                       .fetchByCompanyId_Last(companyId, orderByComparator);
217            }
218    
219            /**
220            * Returns the plugin settings before and after the current plugin setting in the ordered set where companyId = &#63;.
221            *
222            * @param pluginSettingId the primary key of the current plugin setting
223            * @param companyId the company ID
224            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
225            * @return the previous, current, and next plugin setting
226            * @throws com.liferay.portal.NoSuchPluginSettingException if a plugin setting with the primary key could not be found
227            */
228            public static com.liferay.portal.model.PluginSetting[] findByCompanyId_PrevAndNext(
229                    long pluginSettingId, long companyId,
230                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PluginSetting> orderByComparator)
231                    throws com.liferay.portal.NoSuchPluginSettingException {
232                    return getPersistence()
233                                       .findByCompanyId_PrevAndNext(pluginSettingId, companyId,
234                            orderByComparator);
235            }
236    
237            /**
238            * Removes all the plugin settings where companyId = &#63; from the database.
239            *
240            * @param companyId the company ID
241            */
242            public static void removeByCompanyId(long companyId) {
243                    getPersistence().removeByCompanyId(companyId);
244            }
245    
246            /**
247            * Returns the number of plugin settings where companyId = &#63;.
248            *
249            * @param companyId the company ID
250            * @return the number of matching plugin settings
251            */
252            public static int countByCompanyId(long companyId) {
253                    return getPersistence().countByCompanyId(companyId);
254            }
255    
256            /**
257            * 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.
258            *
259            * @param companyId the company ID
260            * @param pluginId the plugin ID
261            * @param pluginType the plugin type
262            * @return the matching plugin setting
263            * @throws com.liferay.portal.NoSuchPluginSettingException if a matching plugin setting could not be found
264            */
265            public static com.liferay.portal.model.PluginSetting findByC_I_T(
266                    long companyId, java.lang.String pluginId, java.lang.String pluginType)
267                    throws com.liferay.portal.NoSuchPluginSettingException {
268                    return getPersistence().findByC_I_T(companyId, pluginId, pluginType);
269            }
270    
271            /**
272            * 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.
273            *
274            * @param companyId the company ID
275            * @param pluginId the plugin ID
276            * @param pluginType the plugin type
277            * @return the matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
278            */
279            public static com.liferay.portal.model.PluginSetting fetchByC_I_T(
280                    long companyId, java.lang.String pluginId, java.lang.String pluginType) {
281                    return getPersistence().fetchByC_I_T(companyId, pluginId, pluginType);
282            }
283    
284            /**
285            * 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.
286            *
287            * @param companyId the company ID
288            * @param pluginId the plugin ID
289            * @param pluginType the plugin type
290            * @param retrieveFromCache whether to use the finder cache
291            * @return the matching plugin setting, or <code>null</code> if a matching plugin setting could not be found
292            */
293            public static com.liferay.portal.model.PluginSetting fetchByC_I_T(
294                    long companyId, java.lang.String pluginId, java.lang.String pluginType,
295                    boolean retrieveFromCache) {
296                    return getPersistence()
297                                       .fetchByC_I_T(companyId, pluginId, pluginType,
298                            retrieveFromCache);
299            }
300    
301            /**
302            * Removes the plugin setting where companyId = &#63; and pluginId = &#63; and pluginType = &#63; from the database.
303            *
304            * @param companyId the company ID
305            * @param pluginId the plugin ID
306            * @param pluginType the plugin type
307            * @return the plugin setting that was removed
308            */
309            public static com.liferay.portal.model.PluginSetting removeByC_I_T(
310                    long companyId, java.lang.String pluginId, java.lang.String pluginType)
311                    throws com.liferay.portal.NoSuchPluginSettingException {
312                    return getPersistence().removeByC_I_T(companyId, pluginId, pluginType);
313            }
314    
315            /**
316            * Returns the number of plugin settings where companyId = &#63; and pluginId = &#63; and pluginType = &#63;.
317            *
318            * @param companyId the company ID
319            * @param pluginId the plugin ID
320            * @param pluginType the plugin type
321            * @return the number of matching plugin settings
322            */
323            public static int countByC_I_T(long companyId, java.lang.String pluginId,
324                    java.lang.String pluginType) {
325                    return getPersistence().countByC_I_T(companyId, pluginId, pluginType);
326            }
327    
328            /**
329            * Caches the plugin setting in the entity cache if it is enabled.
330            *
331            * @param pluginSetting the plugin setting
332            */
333            public static void cacheResult(
334                    com.liferay.portal.model.PluginSetting pluginSetting) {
335                    getPersistence().cacheResult(pluginSetting);
336            }
337    
338            /**
339            * Caches the plugin settings in the entity cache if it is enabled.
340            *
341            * @param pluginSettings the plugin settings
342            */
343            public static void cacheResult(
344                    java.util.List<com.liferay.portal.model.PluginSetting> pluginSettings) {
345                    getPersistence().cacheResult(pluginSettings);
346            }
347    
348            /**
349            * Creates a new plugin setting with the primary key. Does not add the plugin setting to the database.
350            *
351            * @param pluginSettingId the primary key for the new plugin setting
352            * @return the new plugin setting
353            */
354            public static com.liferay.portal.model.PluginSetting create(
355                    long pluginSettingId) {
356                    return getPersistence().create(pluginSettingId);
357            }
358    
359            /**
360            * Removes the plugin setting with the primary key from the database. Also notifies the appropriate model listeners.
361            *
362            * @param pluginSettingId the primary key of the plugin setting
363            * @return the plugin setting that was removed
364            * @throws com.liferay.portal.NoSuchPluginSettingException if a plugin setting with the primary key could not be found
365            */
366            public static com.liferay.portal.model.PluginSetting remove(
367                    long pluginSettingId)
368                    throws com.liferay.portal.NoSuchPluginSettingException {
369                    return getPersistence().remove(pluginSettingId);
370            }
371    
372            public static com.liferay.portal.model.PluginSetting updateImpl(
373                    com.liferay.portal.model.PluginSetting pluginSetting) {
374                    return getPersistence().updateImpl(pluginSetting);
375            }
376    
377            /**
378            * Returns the plugin setting with the primary key or throws a {@link com.liferay.portal.NoSuchPluginSettingException} if it could not be found.
379            *
380            * @param pluginSettingId the primary key of the plugin setting
381            * @return the plugin setting
382            * @throws com.liferay.portal.NoSuchPluginSettingException if a plugin setting with the primary key could not be found
383            */
384            public static com.liferay.portal.model.PluginSetting findByPrimaryKey(
385                    long pluginSettingId)
386                    throws com.liferay.portal.NoSuchPluginSettingException {
387                    return getPersistence().findByPrimaryKey(pluginSettingId);
388            }
389    
390            /**
391            * Returns the plugin setting with the primary key or returns <code>null</code> if it could not be found.
392            *
393            * @param pluginSettingId the primary key of the plugin setting
394            * @return the plugin setting, or <code>null</code> if a plugin setting with the primary key could not be found
395            */
396            public static com.liferay.portal.model.PluginSetting fetchByPrimaryKey(
397                    long pluginSettingId) {
398                    return getPersistence().fetchByPrimaryKey(pluginSettingId);
399            }
400    
401            public static java.util.Map<java.io.Serializable, com.liferay.portal.model.PluginSetting> fetchByPrimaryKeys(
402                    java.util.Set<java.io.Serializable> primaryKeys) {
403                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
404            }
405    
406            /**
407            * Returns all the plugin settings.
408            *
409            * @return the plugin settings
410            */
411            public static java.util.List<com.liferay.portal.model.PluginSetting> findAll() {
412                    return getPersistence().findAll();
413            }
414    
415            /**
416            * Returns a range of all the plugin settings.
417            *
418            * <p>
419            * 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.
420            * </p>
421            *
422            * @param start the lower bound of the range of plugin settings
423            * @param end the upper bound of the range of plugin settings (not inclusive)
424            * @return the range of plugin settings
425            */
426            public static java.util.List<com.liferay.portal.model.PluginSetting> findAll(
427                    int start, int end) {
428                    return getPersistence().findAll(start, end);
429            }
430    
431            /**
432            * Returns an ordered range of all the plugin settings.
433            *
434            * <p>
435            * 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.
436            * </p>
437            *
438            * @param start the lower bound of the range of plugin settings
439            * @param end the upper bound of the range of plugin settings (not inclusive)
440            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
441            * @return the ordered range of plugin settings
442            */
443            public static java.util.List<com.liferay.portal.model.PluginSetting> findAll(
444                    int start, int end,
445                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PluginSetting> orderByComparator) {
446                    return getPersistence().findAll(start, end, orderByComparator);
447            }
448    
449            /**
450            * Removes all the plugin settings from the database.
451            */
452            public static void removeAll() {
453                    getPersistence().removeAll();
454            }
455    
456            /**
457            * Returns the number of plugin settings.
458            *
459            * @return the number of plugin settings
460            */
461            public static int countAll() {
462                    return getPersistence().countAll();
463            }
464    
465            public static PluginSettingPersistence getPersistence() {
466                    if (_persistence == null) {
467                            _persistence = (PluginSettingPersistence)PortalBeanLocatorUtil.locate(PluginSettingPersistence.class.getName());
468    
469                            ReferenceRegistry.registerReference(PluginSettingUtil.class,
470                                    "_persistence");
471                    }
472    
473                    return _persistence;
474            }
475    
476            /**
477             * @deprecated As of 6.2.0
478             */
479            @Deprecated
480            public void setPersistence(PluginSettingPersistence persistence) {
481            }
482    
483            private static PluginSettingPersistence _persistence;
484    }