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