001    /**
002     * Copyright (c) 2000-2012 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.portlet.social.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.social.model.SocialActivitySetting;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the social activity setting service. This utility wraps {@link SocialActivitySettingPersistenceImpl} 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 SocialActivitySettingPersistence
037     * @see SocialActivitySettingPersistenceImpl
038     * @generated
039     */
040    public class SocialActivitySettingUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(SocialActivitySetting socialActivitySetting) {
058                    getPersistence().clearCache(socialActivitySetting);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<SocialActivitySetting> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
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<SocialActivitySetting> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<SocialActivitySetting> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static SocialActivitySetting update(
101                    SocialActivitySetting socialActivitySetting, boolean merge)
102                    throws SystemException {
103                    return getPersistence().update(socialActivitySetting, merge);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
108             */
109            public static SocialActivitySetting update(
110                    SocialActivitySetting socialActivitySetting, boolean merge,
111                    ServiceContext serviceContext) throws SystemException {
112                    return getPersistence()
113                                       .update(socialActivitySetting, merge, serviceContext);
114            }
115    
116            /**
117            * Caches the social activity setting in the entity cache if it is enabled.
118            *
119            * @param socialActivitySetting the social activity setting
120            */
121            public static void cacheResult(
122                    com.liferay.portlet.social.model.SocialActivitySetting socialActivitySetting) {
123                    getPersistence().cacheResult(socialActivitySetting);
124            }
125    
126            /**
127            * Caches the social activity settings in the entity cache if it is enabled.
128            *
129            * @param socialActivitySettings the social activity settings
130            */
131            public static void cacheResult(
132                    java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> socialActivitySettings) {
133                    getPersistence().cacheResult(socialActivitySettings);
134            }
135    
136            /**
137            * Creates a new social activity setting with the primary key. Does not add the social activity setting to the database.
138            *
139            * @param activitySettingId the primary key for the new social activity setting
140            * @return the new social activity setting
141            */
142            public static com.liferay.portlet.social.model.SocialActivitySetting create(
143                    long activitySettingId) {
144                    return getPersistence().create(activitySettingId);
145            }
146    
147            /**
148            * Removes the social activity setting with the primary key from the database. Also notifies the appropriate model listeners.
149            *
150            * @param activitySettingId the primary key of the social activity setting
151            * @return the social activity setting that was removed
152            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a social activity setting with the primary key could not be found
153            * @throws SystemException if a system exception occurred
154            */
155            public static com.liferay.portlet.social.model.SocialActivitySetting remove(
156                    long activitySettingId)
157                    throws com.liferay.portal.kernel.exception.SystemException,
158                            com.liferay.portlet.social.NoSuchActivitySettingException {
159                    return getPersistence().remove(activitySettingId);
160            }
161    
162            public static com.liferay.portlet.social.model.SocialActivitySetting updateImpl(
163                    com.liferay.portlet.social.model.SocialActivitySetting socialActivitySetting,
164                    boolean merge)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().updateImpl(socialActivitySetting, merge);
167            }
168    
169            /**
170            * Returns the social activity setting with the primary key or throws a {@link com.liferay.portlet.social.NoSuchActivitySettingException} if it could not be found.
171            *
172            * @param activitySettingId the primary key of the social activity setting
173            * @return the social activity setting
174            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a social activity setting with the primary key could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public static com.liferay.portlet.social.model.SocialActivitySetting findByPrimaryKey(
178                    long activitySettingId)
179                    throws com.liferay.portal.kernel.exception.SystemException,
180                            com.liferay.portlet.social.NoSuchActivitySettingException {
181                    return getPersistence().findByPrimaryKey(activitySettingId);
182            }
183    
184            /**
185            * Returns the social activity setting with the primary key or returns <code>null</code> if it could not be found.
186            *
187            * @param activitySettingId the primary key of the social activity setting
188            * @return the social activity setting, or <code>null</code> if a social activity setting with the primary key could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByPrimaryKey(
192                    long activitySettingId)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence().fetchByPrimaryKey(activitySettingId);
195            }
196    
197            /**
198            * Returns all the social activity settings where groupId = &#63; and activityType = &#63;.
199            *
200            * @param groupId the group ID
201            * @param activityType the activity type
202            * @return the matching social activity settings
203            * @throws SystemException if a system exception occurred
204            */
205            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_A(
206                    long groupId, int activityType)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return getPersistence().findByG_A(groupId, activityType);
209            }
210    
211            /**
212            * Returns a range of all the social activity settings where groupId = &#63; and activityType = &#63;.
213            *
214            * <p>
215            * 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.
216            * </p>
217            *
218            * @param groupId the group ID
219            * @param activityType the activity type
220            * @param start the lower bound of the range of social activity settings
221            * @param end the upper bound of the range of social activity settings (not inclusive)
222            * @return the range of matching social activity settings
223            * @throws SystemException if a system exception occurred
224            */
225            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_A(
226                    long groupId, int activityType, int start, int end)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getPersistence().findByG_A(groupId, activityType, start, end);
229            }
230    
231            /**
232            * Returns an ordered range of all the social activity settings where groupId = &#63; and activityType = &#63;.
233            *
234            * <p>
235            * 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.
236            * </p>
237            *
238            * @param groupId the group ID
239            * @param activityType the activity type
240            * @param start the lower bound of the range of social activity settings
241            * @param end the upper bound of the range of social activity settings (not inclusive)
242            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
243            * @return the ordered range of matching social activity settings
244            * @throws SystemException if a system exception occurred
245            */
246            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_A(
247                    long groupId, int activityType, int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return getPersistence()
251                                       .findByG_A(groupId, activityType, start, end,
252                            orderByComparator);
253            }
254    
255            /**
256            * Returns the first social activity setting in the ordered set where groupId = &#63; and activityType = &#63;.
257            *
258            * <p>
259            * 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.
260            * </p>
261            *
262            * @param groupId the group ID
263            * @param activityType the activity type
264            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
265            * @return the first matching social activity setting
266            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_A_First(
270                    long groupId, int activityType,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException,
273                            com.liferay.portlet.social.NoSuchActivitySettingException {
274                    return getPersistence()
275                                       .findByG_A_First(groupId, activityType, orderByComparator);
276            }
277    
278            /**
279            * Returns the last social activity setting in the ordered set where groupId = &#63; and activityType = &#63;.
280            *
281            * <p>
282            * 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.
283            * </p>
284            *
285            * @param groupId the group ID
286            * @param activityType the activity type
287            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
288            * @return the last matching social activity setting
289            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
290            * @throws SystemException if a system exception occurred
291            */
292            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_A_Last(
293                    long groupId, int activityType,
294                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
295                    throws com.liferay.portal.kernel.exception.SystemException,
296                            com.liferay.portlet.social.NoSuchActivitySettingException {
297                    return getPersistence()
298                                       .findByG_A_Last(groupId, activityType, orderByComparator);
299            }
300    
301            /**
302            * Returns the social activity settings before and after the current social activity setting in the ordered set where groupId = &#63; and activityType = &#63;.
303            *
304            * <p>
305            * 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.
306            * </p>
307            *
308            * @param activitySettingId the primary key of the current social activity setting
309            * @param groupId the group ID
310            * @param activityType the activity type
311            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
312            * @return the previous, current, and next social activity setting
313            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a social activity setting with the primary key could not be found
314            * @throws SystemException if a system exception occurred
315            */
316            public static com.liferay.portlet.social.model.SocialActivitySetting[] findByG_A_PrevAndNext(
317                    long activitySettingId, long groupId, int activityType,
318                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319                    throws com.liferay.portal.kernel.exception.SystemException,
320                            com.liferay.portlet.social.NoSuchActivitySettingException {
321                    return getPersistence()
322                                       .findByG_A_PrevAndNext(activitySettingId, groupId,
323                            activityType, orderByComparator);
324            }
325    
326            /**
327            * Returns all the social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
328            *
329            * @param groupId the group ID
330            * @param classNameId the class name ID
331            * @param activityType the activity type
332            * @return the matching social activity settings
333            * @throws SystemException if a system exception occurred
334            */
335            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_C_A(
336                    long groupId, long classNameId, int activityType)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    return getPersistence().findByG_C_A(groupId, classNameId, activityType);
339            }
340    
341            /**
342            * Returns a range of all the social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
343            *
344            * <p>
345            * 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.
346            * </p>
347            *
348            * @param groupId the group ID
349            * @param classNameId the class name ID
350            * @param activityType the activity type
351            * @param start the lower bound of the range of social activity settings
352            * @param end the upper bound of the range of social activity settings (not inclusive)
353            * @return the range of matching social activity settings
354            * @throws SystemException if a system exception occurred
355            */
356            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_C_A(
357                    long groupId, long classNameId, int activityType, int start, int end)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getPersistence()
360                                       .findByG_C_A(groupId, classNameId, activityType, start, end);
361            }
362    
363            /**
364            * Returns an ordered range of all the social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
365            *
366            * <p>
367            * 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.
368            * </p>
369            *
370            * @param groupId the group ID
371            * @param classNameId the class name ID
372            * @param activityType the activity type
373            * @param start the lower bound of the range of social activity settings
374            * @param end the upper bound of the range of social activity settings (not inclusive)
375            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
376            * @return the ordered range of matching social activity settings
377            * @throws SystemException if a system exception occurred
378            */
379            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_C_A(
380                    long groupId, long classNameId, int activityType, int start, int end,
381                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
382                    throws com.liferay.portal.kernel.exception.SystemException {
383                    return getPersistence()
384                                       .findByG_C_A(groupId, classNameId, activityType, start, end,
385                            orderByComparator);
386            }
387    
388            /**
389            * Returns the first social activity setting in the ordered set where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
390            *
391            * <p>
392            * 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.
393            * </p>
394            *
395            * @param groupId the group ID
396            * @param classNameId the class name ID
397            * @param activityType the activity type
398            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
399            * @return the first matching social activity setting
400            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
401            * @throws SystemException if a system exception occurred
402            */
403            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_C_A_First(
404                    long groupId, long classNameId, int activityType,
405                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
406                    throws com.liferay.portal.kernel.exception.SystemException,
407                            com.liferay.portlet.social.NoSuchActivitySettingException {
408                    return getPersistence()
409                                       .findByG_C_A_First(groupId, classNameId, activityType,
410                            orderByComparator);
411            }
412    
413            /**
414            * Returns the last social activity setting in the ordered set where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
415            *
416            * <p>
417            * 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.
418            * </p>
419            *
420            * @param groupId the group ID
421            * @param classNameId the class name ID
422            * @param activityType the activity type
423            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
424            * @return the last matching social activity setting
425            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
426            * @throws SystemException if a system exception occurred
427            */
428            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_C_A_Last(
429                    long groupId, long classNameId, int activityType,
430                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
431                    throws com.liferay.portal.kernel.exception.SystemException,
432                            com.liferay.portlet.social.NoSuchActivitySettingException {
433                    return getPersistence()
434                                       .findByG_C_A_Last(groupId, classNameId, activityType,
435                            orderByComparator);
436            }
437    
438            /**
439            * Returns the social activity settings before and after the current social activity setting in the ordered set where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
440            *
441            * <p>
442            * 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.
443            * </p>
444            *
445            * @param activitySettingId the primary key of the current social activity setting
446            * @param groupId the group ID
447            * @param classNameId the class name ID
448            * @param activityType the activity type
449            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
450            * @return the previous, current, and next social activity setting
451            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a social activity setting with the primary key could not be found
452            * @throws SystemException if a system exception occurred
453            */
454            public static com.liferay.portlet.social.model.SocialActivitySetting[] findByG_C_A_PrevAndNext(
455                    long activitySettingId, long groupId, long classNameId,
456                    int activityType,
457                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
458                    throws com.liferay.portal.kernel.exception.SystemException,
459                            com.liferay.portlet.social.NoSuchActivitySettingException {
460                    return getPersistence()
461                                       .findByG_C_A_PrevAndNext(activitySettingId, groupId,
462                            classNameId, activityType, orderByComparator);
463            }
464    
465            /**
466            * Returns the social activity setting where groupId = &#63; and classNameId = &#63; and activityType = &#63; and name = &#63; or throws a {@link com.liferay.portlet.social.NoSuchActivitySettingException} if it could not be found.
467            *
468            * @param groupId the group ID
469            * @param classNameId the class name ID
470            * @param activityType the activity type
471            * @param name the name
472            * @return the matching social activity setting
473            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
474            * @throws SystemException if a system exception occurred
475            */
476            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_C_A_N(
477                    long groupId, long classNameId, int activityType, java.lang.String name)
478                    throws com.liferay.portal.kernel.exception.SystemException,
479                            com.liferay.portlet.social.NoSuchActivitySettingException {
480                    return getPersistence()
481                                       .findByG_C_A_N(groupId, classNameId, activityType, name);
482            }
483    
484            /**
485            * Returns the social activity setting where groupId = &#63; and classNameId = &#63; and activityType = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
486            *
487            * @param groupId the group ID
488            * @param classNameId the class name ID
489            * @param activityType the activity type
490            * @param name the name
491            * @return the matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
492            * @throws SystemException if a system exception occurred
493            */
494            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_C_A_N(
495                    long groupId, long classNameId, int activityType, java.lang.String name)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return getPersistence()
498                                       .fetchByG_C_A_N(groupId, classNameId, activityType, name);
499            }
500    
501            /**
502            * Returns the social activity setting where groupId = &#63; and classNameId = &#63; and activityType = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
503            *
504            * @param groupId the group ID
505            * @param classNameId the class name ID
506            * @param activityType the activity type
507            * @param name the name
508            * @param retrieveFromCache whether to use the finder cache
509            * @return the matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
510            * @throws SystemException if a system exception occurred
511            */
512            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_C_A_N(
513                    long groupId, long classNameId, int activityType,
514                    java.lang.String name, boolean retrieveFromCache)
515                    throws com.liferay.portal.kernel.exception.SystemException {
516                    return getPersistence()
517                                       .fetchByG_C_A_N(groupId, classNameId, activityType, name,
518                            retrieveFromCache);
519            }
520    
521            /**
522            * Returns all the social activity settings.
523            *
524            * @return the social activity settings
525            * @throws SystemException if a system exception occurred
526            */
527            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findAll()
528                    throws com.liferay.portal.kernel.exception.SystemException {
529                    return getPersistence().findAll();
530            }
531    
532            /**
533            * Returns a range of all the social activity settings.
534            *
535            * <p>
536            * 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.
537            * </p>
538            *
539            * @param start the lower bound of the range of social activity settings
540            * @param end the upper bound of the range of social activity settings (not inclusive)
541            * @return the range of social activity settings
542            * @throws SystemException if a system exception occurred
543            */
544            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findAll(
545                    int start, int end)
546                    throws com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence().findAll(start, end);
548            }
549    
550            /**
551            * Returns an ordered range of all the social activity settings.
552            *
553            * <p>
554            * 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.
555            * </p>
556            *
557            * @param start the lower bound of the range of social activity settings
558            * @param end the upper bound of the range of social activity settings (not inclusive)
559            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
560            * @return the ordered range of social activity settings
561            * @throws SystemException if a system exception occurred
562            */
563            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findAll(
564                    int start, int end,
565                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
566                    throws com.liferay.portal.kernel.exception.SystemException {
567                    return getPersistence().findAll(start, end, orderByComparator);
568            }
569    
570            /**
571            * Removes all the social activity settings where groupId = &#63; and activityType = &#63; from the database.
572            *
573            * @param groupId the group ID
574            * @param activityType the activity type
575            * @throws SystemException if a system exception occurred
576            */
577            public static void removeByG_A(long groupId, int activityType)
578                    throws com.liferay.portal.kernel.exception.SystemException {
579                    getPersistence().removeByG_A(groupId, activityType);
580            }
581    
582            /**
583            * Removes all the social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63; from the database.
584            *
585            * @param groupId the group ID
586            * @param classNameId the class name ID
587            * @param activityType the activity type
588            * @throws SystemException if a system exception occurred
589            */
590            public static void removeByG_C_A(long groupId, long classNameId,
591                    int activityType)
592                    throws com.liferay.portal.kernel.exception.SystemException {
593                    getPersistence().removeByG_C_A(groupId, classNameId, activityType);
594            }
595    
596            /**
597            * Removes the social activity setting where groupId = &#63; and classNameId = &#63; and activityType = &#63; and name = &#63; from the database.
598            *
599            * @param groupId the group ID
600            * @param classNameId the class name ID
601            * @param activityType the activity type
602            * @param name the name
603            * @throws SystemException if a system exception occurred
604            */
605            public static void removeByG_C_A_N(long groupId, long classNameId,
606                    int activityType, java.lang.String name)
607                    throws com.liferay.portal.kernel.exception.SystemException,
608                            com.liferay.portlet.social.NoSuchActivitySettingException {
609                    getPersistence()
610                            .removeByG_C_A_N(groupId, classNameId, activityType, name);
611            }
612    
613            /**
614            * Removes all the social activity settings from the database.
615            *
616            * @throws SystemException if a system exception occurred
617            */
618            public static void removeAll()
619                    throws com.liferay.portal.kernel.exception.SystemException {
620                    getPersistence().removeAll();
621            }
622    
623            /**
624            * Returns the number of social activity settings where groupId = &#63; and activityType = &#63;.
625            *
626            * @param groupId the group ID
627            * @param activityType the activity type
628            * @return the number of matching social activity settings
629            * @throws SystemException if a system exception occurred
630            */
631            public static int countByG_A(long groupId, int activityType)
632                    throws com.liferay.portal.kernel.exception.SystemException {
633                    return getPersistence().countByG_A(groupId, activityType);
634            }
635    
636            /**
637            * Returns the number of social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
638            *
639            * @param groupId the group ID
640            * @param classNameId the class name ID
641            * @param activityType the activity type
642            * @return the number of matching social activity settings
643            * @throws SystemException if a system exception occurred
644            */
645            public static int countByG_C_A(long groupId, long classNameId,
646                    int activityType)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    return getPersistence().countByG_C_A(groupId, classNameId, activityType);
649            }
650    
651            /**
652            * Returns the number of social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63; and name = &#63;.
653            *
654            * @param groupId the group ID
655            * @param classNameId the class name ID
656            * @param activityType the activity type
657            * @param name the name
658            * @return the number of matching social activity settings
659            * @throws SystemException if a system exception occurred
660            */
661            public static int countByG_C_A_N(long groupId, long classNameId,
662                    int activityType, java.lang.String name)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    return getPersistence()
665                                       .countByG_C_A_N(groupId, classNameId, activityType, name);
666            }
667    
668            /**
669            * Returns the number of social activity settings.
670            *
671            * @return the number of social activity settings
672            * @throws SystemException if a system exception occurred
673            */
674            public static int countAll()
675                    throws com.liferay.portal.kernel.exception.SystemException {
676                    return getPersistence().countAll();
677            }
678    
679            public static SocialActivitySettingPersistence getPersistence() {
680                    if (_persistence == null) {
681                            _persistence = (SocialActivitySettingPersistence)PortalBeanLocatorUtil.locate(SocialActivitySettingPersistence.class.getName());
682    
683                            ReferenceRegistry.registerReference(SocialActivitySettingUtil.class,
684                                    "_persistence");
685                    }
686    
687                    return _persistence;
688            }
689    
690            public void setPersistence(SocialActivitySettingPersistence persistence) {
691                    _persistence = persistence;
692    
693                    ReferenceRegistry.registerReference(SocialActivitySettingUtil.class,
694                            "_persistence");
695            }
696    
697            private static SocialActivitySettingPersistence _persistence;
698    }