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.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            * @param groupId the group ID
259            * @param activityType the activity type
260            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
261            * @return the first matching social activity setting
262            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
263            * @throws SystemException if a system exception occurred
264            */
265            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_A_First(
266                    long groupId, int activityType,
267                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
268                    throws com.liferay.portal.kernel.exception.SystemException,
269                            com.liferay.portlet.social.NoSuchActivitySettingException {
270                    return getPersistence()
271                                       .findByG_A_First(groupId, activityType, orderByComparator);
272            }
273    
274            /**
275            * Returns the first social activity setting in the ordered set where groupId = &#63; and activityType = &#63;.
276            *
277            * @param groupId the group ID
278            * @param activityType the activity type
279            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
280            * @return the first matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_A_First(
284                    long groupId, int activityType,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.kernel.exception.SystemException {
287                    return getPersistence()
288                                       .fetchByG_A_First(groupId, activityType, orderByComparator);
289            }
290    
291            /**
292            * Returns the last social activity setting in the ordered set where groupId = &#63; and activityType = &#63;.
293            *
294            * @param groupId the group ID
295            * @param activityType the activity type
296            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
297            * @return the last matching social activity setting
298            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_A_Last(
302                    long groupId, int activityType,
303                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304                    throws com.liferay.portal.kernel.exception.SystemException,
305                            com.liferay.portlet.social.NoSuchActivitySettingException {
306                    return getPersistence()
307                                       .findByG_A_Last(groupId, activityType, orderByComparator);
308            }
309    
310            /**
311            * Returns the last social activity setting in the ordered set where groupId = &#63; and activityType = &#63;.
312            *
313            * @param groupId the group ID
314            * @param activityType the activity type
315            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
316            * @return the last matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
317            * @throws SystemException if a system exception occurred
318            */
319            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_A_Last(
320                    long groupId, int activityType,
321                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence()
324                                       .fetchByG_A_Last(groupId, activityType, orderByComparator);
325            }
326    
327            /**
328            * Returns the social activity settings before and after the current social activity setting in the ordered set where groupId = &#63; and activityType = &#63;.
329            *
330            * @param activitySettingId the primary key of the current social activity setting
331            * @param groupId the group ID
332            * @param activityType the activity type
333            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
334            * @return the previous, current, and next social activity setting
335            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a social activity setting with the primary key could not be found
336            * @throws SystemException if a system exception occurred
337            */
338            public static com.liferay.portlet.social.model.SocialActivitySetting[] findByG_A_PrevAndNext(
339                    long activitySettingId, long groupId, int activityType,
340                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
341                    throws com.liferay.portal.kernel.exception.SystemException,
342                            com.liferay.portlet.social.NoSuchActivitySettingException {
343                    return getPersistence()
344                                       .findByG_A_PrevAndNext(activitySettingId, groupId,
345                            activityType, orderByComparator);
346            }
347    
348            /**
349            * Returns all the social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
350            *
351            * @param groupId the group ID
352            * @param classNameId the class name ID
353            * @param activityType the activity type
354            * @return the matching social activity settings
355            * @throws SystemException if a system exception occurred
356            */
357            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_C_A(
358                    long groupId, long classNameId, int activityType)
359                    throws com.liferay.portal.kernel.exception.SystemException {
360                    return getPersistence().findByG_C_A(groupId, classNameId, activityType);
361            }
362    
363            /**
364            * Returns a 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            * @return the range of matching social activity settings
376            * @throws SystemException if a system exception occurred
377            */
378            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_C_A(
379                    long groupId, long classNameId, int activityType, int start, int end)
380                    throws com.liferay.portal.kernel.exception.SystemException {
381                    return getPersistence()
382                                       .findByG_C_A(groupId, classNameId, activityType, start, end);
383            }
384    
385            /**
386            * Returns an ordered range of all the social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
387            *
388            * <p>
389            * 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.
390            * </p>
391            *
392            * @param groupId the group ID
393            * @param classNameId the class name ID
394            * @param activityType the activity type
395            * @param start the lower bound of the range of social activity settings
396            * @param end the upper bound of the range of social activity settings (not inclusive)
397            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
398            * @return the ordered range of matching social activity settings
399            * @throws SystemException if a system exception occurred
400            */
401            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findByG_C_A(
402                    long groupId, long classNameId, int activityType, int start, int end,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return getPersistence()
406                                       .findByG_C_A(groupId, classNameId, activityType, start, end,
407                            orderByComparator);
408            }
409    
410            /**
411            * Returns the first social activity setting in the ordered set where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
412            *
413            * @param groupId the group ID
414            * @param classNameId the class name ID
415            * @param activityType the activity type
416            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
417            * @return the first matching social activity setting
418            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
419            * @throws SystemException if a system exception occurred
420            */
421            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_C_A_First(
422                    long groupId, long classNameId, int activityType,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.kernel.exception.SystemException,
425                            com.liferay.portlet.social.NoSuchActivitySettingException {
426                    return getPersistence()
427                                       .findByG_C_A_First(groupId, classNameId, activityType,
428                            orderByComparator);
429            }
430    
431            /**
432            * Returns the first social activity setting in the ordered set where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
433            *
434            * @param groupId the group ID
435            * @param classNameId the class name ID
436            * @param activityType the activity type
437            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
438            * @return the first matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
439            * @throws SystemException if a system exception occurred
440            */
441            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_C_A_First(
442                    long groupId, long classNameId, int activityType,
443                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    return getPersistence()
446                                       .fetchByG_C_A_First(groupId, classNameId, activityType,
447                            orderByComparator);
448            }
449    
450            /**
451            * Returns the last social activity setting in the ordered set where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
452            *
453            * @param groupId the group ID
454            * @param classNameId the class name ID
455            * @param activityType the activity type
456            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
457            * @return the last matching social activity setting
458            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
459            * @throws SystemException if a system exception occurred
460            */
461            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_C_A_Last(
462                    long groupId, long classNameId, int activityType,
463                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
464                    throws com.liferay.portal.kernel.exception.SystemException,
465                            com.liferay.portlet.social.NoSuchActivitySettingException {
466                    return getPersistence()
467                                       .findByG_C_A_Last(groupId, classNameId, activityType,
468                            orderByComparator);
469            }
470    
471            /**
472            * Returns the last social activity setting in the ordered set where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
473            *
474            * @param groupId the group ID
475            * @param classNameId the class name ID
476            * @param activityType the activity type
477            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
478            * @return the last matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
479            * @throws SystemException if a system exception occurred
480            */
481            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_C_A_Last(
482                    long groupId, long classNameId, int activityType,
483                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    return getPersistence()
486                                       .fetchByG_C_A_Last(groupId, classNameId, activityType,
487                            orderByComparator);
488            }
489    
490            /**
491            * 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;.
492            *
493            * @param activitySettingId the primary key of the current social activity setting
494            * @param groupId the group ID
495            * @param classNameId the class name ID
496            * @param activityType the activity type
497            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
498            * @return the previous, current, and next social activity setting
499            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a social activity setting with the primary key could not be found
500            * @throws SystemException if a system exception occurred
501            */
502            public static com.liferay.portlet.social.model.SocialActivitySetting[] findByG_C_A_PrevAndNext(
503                    long activitySettingId, long groupId, long classNameId,
504                    int activityType,
505                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
506                    throws com.liferay.portal.kernel.exception.SystemException,
507                            com.liferay.portlet.social.NoSuchActivitySettingException {
508                    return getPersistence()
509                                       .findByG_C_A_PrevAndNext(activitySettingId, groupId,
510                            classNameId, activityType, orderByComparator);
511            }
512    
513            /**
514            * 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.
515            *
516            * @param groupId the group ID
517            * @param classNameId the class name ID
518            * @param activityType the activity type
519            * @param name the name
520            * @return the matching social activity setting
521            * @throws com.liferay.portlet.social.NoSuchActivitySettingException if a matching social activity setting could not be found
522            * @throws SystemException if a system exception occurred
523            */
524            public static com.liferay.portlet.social.model.SocialActivitySetting findByG_C_A_N(
525                    long groupId, long classNameId, int activityType, java.lang.String name)
526                    throws com.liferay.portal.kernel.exception.SystemException,
527                            com.liferay.portlet.social.NoSuchActivitySettingException {
528                    return getPersistence()
529                                       .findByG_C_A_N(groupId, classNameId, activityType, name);
530            }
531    
532            /**
533            * 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.
534            *
535            * @param groupId the group ID
536            * @param classNameId the class name ID
537            * @param activityType the activity type
538            * @param name the name
539            * @return the matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_C_A_N(
543                    long groupId, long classNameId, int activityType, java.lang.String name)
544                    throws com.liferay.portal.kernel.exception.SystemException {
545                    return getPersistence()
546                                       .fetchByG_C_A_N(groupId, classNameId, activityType, name);
547            }
548    
549            /**
550            * 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.
551            *
552            * @param groupId the group ID
553            * @param classNameId the class name ID
554            * @param activityType the activity type
555            * @param name the name
556            * @param retrieveFromCache whether to use the finder cache
557            * @return the matching social activity setting, or <code>null</code> if a matching social activity setting could not be found
558            * @throws SystemException if a system exception occurred
559            */
560            public static com.liferay.portlet.social.model.SocialActivitySetting fetchByG_C_A_N(
561                    long groupId, long classNameId, int activityType,
562                    java.lang.String name, boolean retrieveFromCache)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    return getPersistence()
565                                       .fetchByG_C_A_N(groupId, classNameId, activityType, name,
566                            retrieveFromCache);
567            }
568    
569            /**
570            * Returns all the social activity settings.
571            *
572            * @return the social activity settings
573            * @throws SystemException if a system exception occurred
574            */
575            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findAll()
576                    throws com.liferay.portal.kernel.exception.SystemException {
577                    return getPersistence().findAll();
578            }
579    
580            /**
581            * Returns a range of all the social activity settings.
582            *
583            * <p>
584            * 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.
585            * </p>
586            *
587            * @param start the lower bound of the range of social activity settings
588            * @param end the upper bound of the range of social activity settings (not inclusive)
589            * @return the range of social activity settings
590            * @throws SystemException if a system exception occurred
591            */
592            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findAll(
593                    int start, int end)
594                    throws com.liferay.portal.kernel.exception.SystemException {
595                    return getPersistence().findAll(start, end);
596            }
597    
598            /**
599            * Returns an ordered range of all the social activity settings.
600            *
601            * <p>
602            * 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.
603            * </p>
604            *
605            * @param start the lower bound of the range of social activity settings
606            * @param end the upper bound of the range of social activity settings (not inclusive)
607            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
608            * @return the ordered range of social activity settings
609            * @throws SystemException if a system exception occurred
610            */
611            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> findAll(
612                    int start, int end,
613                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
614                    throws com.liferay.portal.kernel.exception.SystemException {
615                    return getPersistence().findAll(start, end, orderByComparator);
616            }
617    
618            /**
619            * Removes all the social activity settings where groupId = &#63; and activityType = &#63; from the database.
620            *
621            * @param groupId the group ID
622            * @param activityType the activity type
623            * @throws SystemException if a system exception occurred
624            */
625            public static void removeByG_A(long groupId, int activityType)
626                    throws com.liferay.portal.kernel.exception.SystemException {
627                    getPersistence().removeByG_A(groupId, activityType);
628            }
629    
630            /**
631            * Removes all the social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63; from the database.
632            *
633            * @param groupId the group ID
634            * @param classNameId the class name ID
635            * @param activityType the activity type
636            * @throws SystemException if a system exception occurred
637            */
638            public static void removeByG_C_A(long groupId, long classNameId,
639                    int activityType)
640                    throws com.liferay.portal.kernel.exception.SystemException {
641                    getPersistence().removeByG_C_A(groupId, classNameId, activityType);
642            }
643    
644            /**
645            * Removes the social activity setting where groupId = &#63; and classNameId = &#63; and activityType = &#63; and name = &#63; from the database.
646            *
647            * @param groupId the group ID
648            * @param classNameId the class name ID
649            * @param activityType the activity type
650            * @param name the name
651            * @return the social activity setting that was removed
652            * @throws SystemException if a system exception occurred
653            */
654            public static com.liferay.portlet.social.model.SocialActivitySetting removeByG_C_A_N(
655                    long groupId, long classNameId, int activityType, java.lang.String name)
656                    throws com.liferay.portal.kernel.exception.SystemException,
657                            com.liferay.portlet.social.NoSuchActivitySettingException {
658                    return getPersistence()
659                                       .removeByG_C_A_N(groupId, classNameId, activityType, name);
660            }
661    
662            /**
663            * Removes all the social activity settings from the database.
664            *
665            * @throws SystemException if a system exception occurred
666            */
667            public static void removeAll()
668                    throws com.liferay.portal.kernel.exception.SystemException {
669                    getPersistence().removeAll();
670            }
671    
672            /**
673            * Returns the number of social activity settings where groupId = &#63; and activityType = &#63;.
674            *
675            * @param groupId the group ID
676            * @param activityType the activity type
677            * @return the number of matching social activity settings
678            * @throws SystemException if a system exception occurred
679            */
680            public static int countByG_A(long groupId, int activityType)
681                    throws com.liferay.portal.kernel.exception.SystemException {
682                    return getPersistence().countByG_A(groupId, activityType);
683            }
684    
685            /**
686            * Returns the number of social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63;.
687            *
688            * @param groupId the group ID
689            * @param classNameId the class name ID
690            * @param activityType the activity type
691            * @return the number of matching social activity settings
692            * @throws SystemException if a system exception occurred
693            */
694            public static int countByG_C_A(long groupId, long classNameId,
695                    int activityType)
696                    throws com.liferay.portal.kernel.exception.SystemException {
697                    return getPersistence().countByG_C_A(groupId, classNameId, activityType);
698            }
699    
700            /**
701            * Returns the number of social activity settings where groupId = &#63; and classNameId = &#63; and activityType = &#63; and name = &#63;.
702            *
703            * @param groupId the group ID
704            * @param classNameId the class name ID
705            * @param activityType the activity type
706            * @param name the name
707            * @return the number of matching social activity settings
708            * @throws SystemException if a system exception occurred
709            */
710            public static int countByG_C_A_N(long groupId, long classNameId,
711                    int activityType, java.lang.String name)
712                    throws com.liferay.portal.kernel.exception.SystemException {
713                    return getPersistence()
714                                       .countByG_C_A_N(groupId, classNameId, activityType, name);
715            }
716    
717            /**
718            * Returns the number of social activity settings.
719            *
720            * @return the number of social activity settings
721            * @throws SystemException if a system exception occurred
722            */
723            public static int countAll()
724                    throws com.liferay.portal.kernel.exception.SystemException {
725                    return getPersistence().countAll();
726            }
727    
728            public static SocialActivitySettingPersistence getPersistence() {
729                    if (_persistence == null) {
730                            _persistence = (SocialActivitySettingPersistence)PortalBeanLocatorUtil.locate(SocialActivitySettingPersistence.class.getName());
731    
732                            ReferenceRegistry.registerReference(SocialActivitySettingUtil.class,
733                                    "_persistence");
734                    }
735    
736                    return _persistence;
737            }
738    
739            /**
740             * @deprecated
741             */
742            public void setPersistence(SocialActivitySettingPersistence persistence) {
743            }
744    
745            private static SocialActivitySettingPersistence _persistence;
746    }