001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.social.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.social.model.SocialActivityLimit; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the social activity limit service. This utility wraps {@link com.liferay.portlet.social.service.persistence.impl.SocialActivityLimitPersistenceImpl} 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. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see SocialActivityLimitPersistence 038 * @see com.liferay.portlet.social.service.persistence.impl.SocialActivityLimitPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class SocialActivityLimitUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(SocialActivityLimit socialActivityLimit) { 060 getPersistence().clearCache(socialActivityLimit); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<SocialActivityLimit> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<SocialActivityLimit> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 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<SocialActivityLimit> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<SocialActivityLimit> orderByComparator) { 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) 099 */ 100 public static SocialActivityLimit update( 101 SocialActivityLimit socialActivityLimit) { 102 return getPersistence().update(socialActivityLimit); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static SocialActivityLimit update( 109 SocialActivityLimit socialActivityLimit, ServiceContext serviceContext) { 110 return getPersistence().update(socialActivityLimit, serviceContext); 111 } 112 113 /** 114 * Returns all the social activity limits where groupId = ?. 115 * 116 * @param groupId the group ID 117 * @return the matching social activity limits 118 */ 119 public static List<SocialActivityLimit> findByGroupId(long groupId) { 120 return getPersistence().findByGroupId(groupId); 121 } 122 123 /** 124 * Returns a range of all the social activity limits where groupId = ?. 125 * 126 * <p> 127 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 128 * </p> 129 * 130 * @param groupId the group ID 131 * @param start the lower bound of the range of social activity limits 132 * @param end the upper bound of the range of social activity limits (not inclusive) 133 * @return the range of matching social activity limits 134 */ 135 public static List<SocialActivityLimit> findByGroupId(long groupId, 136 int start, int end) { 137 return getPersistence().findByGroupId(groupId, start, end); 138 } 139 140 /** 141 * Returns an ordered range of all the social activity limits where groupId = ?. 142 * 143 * <p> 144 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 145 * </p> 146 * 147 * @param groupId the group ID 148 * @param start the lower bound of the range of social activity limits 149 * @param end the upper bound of the range of social activity limits (not inclusive) 150 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 151 * @return the ordered range of matching social activity limits 152 */ 153 public static List<SocialActivityLimit> findByGroupId(long groupId, 154 int start, int end, 155 OrderByComparator<SocialActivityLimit> orderByComparator) { 156 return getPersistence() 157 .findByGroupId(groupId, start, end, orderByComparator); 158 } 159 160 /** 161 * Returns the first social activity limit in the ordered set where groupId = ?. 162 * 163 * @param groupId the group ID 164 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 165 * @return the first matching social activity limit 166 * @throws NoSuchActivityLimitException if a matching social activity limit could not be found 167 */ 168 public static SocialActivityLimit findByGroupId_First(long groupId, 169 OrderByComparator<SocialActivityLimit> orderByComparator) 170 throws com.liferay.portlet.social.NoSuchActivityLimitException { 171 return getPersistence().findByGroupId_First(groupId, orderByComparator); 172 } 173 174 /** 175 * Returns the first social activity limit in the ordered set where groupId = ?. 176 * 177 * @param groupId the group ID 178 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 179 * @return the first matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 180 */ 181 public static SocialActivityLimit fetchByGroupId_First(long groupId, 182 OrderByComparator<SocialActivityLimit> orderByComparator) { 183 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 184 } 185 186 /** 187 * Returns the last social activity limit in the ordered set where groupId = ?. 188 * 189 * @param groupId the group ID 190 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 191 * @return the last matching social activity limit 192 * @throws NoSuchActivityLimitException if a matching social activity limit could not be found 193 */ 194 public static SocialActivityLimit findByGroupId_Last(long groupId, 195 OrderByComparator<SocialActivityLimit> orderByComparator) 196 throws com.liferay.portlet.social.NoSuchActivityLimitException { 197 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 198 } 199 200 /** 201 * Returns the last social activity limit in the ordered set where groupId = ?. 202 * 203 * @param groupId the group ID 204 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 205 * @return the last matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 206 */ 207 public static SocialActivityLimit fetchByGroupId_Last(long groupId, 208 OrderByComparator<SocialActivityLimit> orderByComparator) { 209 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 210 } 211 212 /** 213 * Returns the social activity limits before and after the current social activity limit in the ordered set where groupId = ?. 214 * 215 * @param activityLimitId the primary key of the current social activity limit 216 * @param groupId the group ID 217 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 218 * @return the previous, current, and next social activity limit 219 * @throws NoSuchActivityLimitException if a social activity limit with the primary key could not be found 220 */ 221 public static SocialActivityLimit[] findByGroupId_PrevAndNext( 222 long activityLimitId, long groupId, 223 OrderByComparator<SocialActivityLimit> orderByComparator) 224 throws com.liferay.portlet.social.NoSuchActivityLimitException { 225 return getPersistence() 226 .findByGroupId_PrevAndNext(activityLimitId, groupId, 227 orderByComparator); 228 } 229 230 /** 231 * Removes all the social activity limits where groupId = ? from the database. 232 * 233 * @param groupId the group ID 234 */ 235 public static void removeByGroupId(long groupId) { 236 getPersistence().removeByGroupId(groupId); 237 } 238 239 /** 240 * Returns the number of social activity limits where groupId = ?. 241 * 242 * @param groupId the group ID 243 * @return the number of matching social activity limits 244 */ 245 public static int countByGroupId(long groupId) { 246 return getPersistence().countByGroupId(groupId); 247 } 248 249 /** 250 * Returns all the social activity limits where userId = ?. 251 * 252 * @param userId the user ID 253 * @return the matching social activity limits 254 */ 255 public static List<SocialActivityLimit> findByUserId(long userId) { 256 return getPersistence().findByUserId(userId); 257 } 258 259 /** 260 * Returns a range of all the social activity limits where userId = ?. 261 * 262 * <p> 263 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 264 * </p> 265 * 266 * @param userId the user ID 267 * @param start the lower bound of the range of social activity limits 268 * @param end the upper bound of the range of social activity limits (not inclusive) 269 * @return the range of matching social activity limits 270 */ 271 public static List<SocialActivityLimit> findByUserId(long userId, 272 int start, int end) { 273 return getPersistence().findByUserId(userId, start, end); 274 } 275 276 /** 277 * Returns an ordered range of all the social activity limits where userId = ?. 278 * 279 * <p> 280 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 281 * </p> 282 * 283 * @param userId the user ID 284 * @param start the lower bound of the range of social activity limits 285 * @param end the upper bound of the range of social activity limits (not inclusive) 286 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 287 * @return the ordered range of matching social activity limits 288 */ 289 public static List<SocialActivityLimit> findByUserId(long userId, 290 int start, int end, 291 OrderByComparator<SocialActivityLimit> orderByComparator) { 292 return getPersistence() 293 .findByUserId(userId, start, end, orderByComparator); 294 } 295 296 /** 297 * Returns the first social activity limit in the ordered set where userId = ?. 298 * 299 * @param userId the user ID 300 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 301 * @return the first matching social activity limit 302 * @throws NoSuchActivityLimitException if a matching social activity limit could not be found 303 */ 304 public static SocialActivityLimit findByUserId_First(long userId, 305 OrderByComparator<SocialActivityLimit> orderByComparator) 306 throws com.liferay.portlet.social.NoSuchActivityLimitException { 307 return getPersistence().findByUserId_First(userId, orderByComparator); 308 } 309 310 /** 311 * Returns the first social activity limit in the ordered set where userId = ?. 312 * 313 * @param userId the user ID 314 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 315 * @return the first matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 316 */ 317 public static SocialActivityLimit fetchByUserId_First(long userId, 318 OrderByComparator<SocialActivityLimit> orderByComparator) { 319 return getPersistence().fetchByUserId_First(userId, orderByComparator); 320 } 321 322 /** 323 * Returns the last social activity limit in the ordered set where userId = ?. 324 * 325 * @param userId the user ID 326 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 327 * @return the last matching social activity limit 328 * @throws NoSuchActivityLimitException if a matching social activity limit could not be found 329 */ 330 public static SocialActivityLimit findByUserId_Last(long userId, 331 OrderByComparator<SocialActivityLimit> orderByComparator) 332 throws com.liferay.portlet.social.NoSuchActivityLimitException { 333 return getPersistence().findByUserId_Last(userId, orderByComparator); 334 } 335 336 /** 337 * Returns the last social activity limit in the ordered set where userId = ?. 338 * 339 * @param userId the user ID 340 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 341 * @return the last matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 342 */ 343 public static SocialActivityLimit fetchByUserId_Last(long userId, 344 OrderByComparator<SocialActivityLimit> orderByComparator) { 345 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 346 } 347 348 /** 349 * Returns the social activity limits before and after the current social activity limit in the ordered set where userId = ?. 350 * 351 * @param activityLimitId the primary key of the current social activity limit 352 * @param userId the user ID 353 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 354 * @return the previous, current, and next social activity limit 355 * @throws NoSuchActivityLimitException if a social activity limit with the primary key could not be found 356 */ 357 public static SocialActivityLimit[] findByUserId_PrevAndNext( 358 long activityLimitId, long userId, 359 OrderByComparator<SocialActivityLimit> orderByComparator) 360 throws com.liferay.portlet.social.NoSuchActivityLimitException { 361 return getPersistence() 362 .findByUserId_PrevAndNext(activityLimitId, userId, 363 orderByComparator); 364 } 365 366 /** 367 * Removes all the social activity limits where userId = ? from the database. 368 * 369 * @param userId the user ID 370 */ 371 public static void removeByUserId(long userId) { 372 getPersistence().removeByUserId(userId); 373 } 374 375 /** 376 * Returns the number of social activity limits where userId = ?. 377 * 378 * @param userId the user ID 379 * @return the number of matching social activity limits 380 */ 381 public static int countByUserId(long userId) { 382 return getPersistence().countByUserId(userId); 383 } 384 385 /** 386 * Returns all the social activity limits where classNameId = ? and classPK = ?. 387 * 388 * @param classNameId the class name ID 389 * @param classPK the class p k 390 * @return the matching social activity limits 391 */ 392 public static List<SocialActivityLimit> findByC_C(long classNameId, 393 long classPK) { 394 return getPersistence().findByC_C(classNameId, classPK); 395 } 396 397 /** 398 * Returns a range of all the social activity limits where classNameId = ? and classPK = ?. 399 * 400 * <p> 401 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 402 * </p> 403 * 404 * @param classNameId the class name ID 405 * @param classPK the class p k 406 * @param start the lower bound of the range of social activity limits 407 * @param end the upper bound of the range of social activity limits (not inclusive) 408 * @return the range of matching social activity limits 409 */ 410 public static List<SocialActivityLimit> findByC_C(long classNameId, 411 long classPK, int start, int end) { 412 return getPersistence().findByC_C(classNameId, classPK, start, end); 413 } 414 415 /** 416 * Returns an ordered range of all the social activity limits where classNameId = ? and classPK = ?. 417 * 418 * <p> 419 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 420 * </p> 421 * 422 * @param classNameId the class name ID 423 * @param classPK the class p k 424 * @param start the lower bound of the range of social activity limits 425 * @param end the upper bound of the range of social activity limits (not inclusive) 426 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 427 * @return the ordered range of matching social activity limits 428 */ 429 public static List<SocialActivityLimit> findByC_C(long classNameId, 430 long classPK, int start, int end, 431 OrderByComparator<SocialActivityLimit> orderByComparator) { 432 return getPersistence() 433 .findByC_C(classNameId, classPK, start, end, 434 orderByComparator); 435 } 436 437 /** 438 * Returns the first social activity limit in the ordered set where classNameId = ? and classPK = ?. 439 * 440 * @param classNameId the class name ID 441 * @param classPK the class p k 442 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 443 * @return the first matching social activity limit 444 * @throws NoSuchActivityLimitException if a matching social activity limit could not be found 445 */ 446 public static SocialActivityLimit findByC_C_First(long classNameId, 447 long classPK, OrderByComparator<SocialActivityLimit> orderByComparator) 448 throws com.liferay.portlet.social.NoSuchActivityLimitException { 449 return getPersistence() 450 .findByC_C_First(classNameId, classPK, orderByComparator); 451 } 452 453 /** 454 * Returns the first social activity limit in the ordered set where classNameId = ? and classPK = ?. 455 * 456 * @param classNameId the class name ID 457 * @param classPK the class p k 458 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 459 * @return the first matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 460 */ 461 public static SocialActivityLimit fetchByC_C_First(long classNameId, 462 long classPK, OrderByComparator<SocialActivityLimit> orderByComparator) { 463 return getPersistence() 464 .fetchByC_C_First(classNameId, classPK, orderByComparator); 465 } 466 467 /** 468 * Returns the last social activity limit in the ordered set where classNameId = ? and classPK = ?. 469 * 470 * @param classNameId the class name ID 471 * @param classPK the class p k 472 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 473 * @return the last matching social activity limit 474 * @throws NoSuchActivityLimitException if a matching social activity limit could not be found 475 */ 476 public static SocialActivityLimit findByC_C_Last(long classNameId, 477 long classPK, OrderByComparator<SocialActivityLimit> orderByComparator) 478 throws com.liferay.portlet.social.NoSuchActivityLimitException { 479 return getPersistence() 480 .findByC_C_Last(classNameId, classPK, orderByComparator); 481 } 482 483 /** 484 * Returns the last social activity limit in the ordered set where classNameId = ? and classPK = ?. 485 * 486 * @param classNameId the class name ID 487 * @param classPK the class p k 488 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 489 * @return the last matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 490 */ 491 public static SocialActivityLimit fetchByC_C_Last(long classNameId, 492 long classPK, OrderByComparator<SocialActivityLimit> orderByComparator) { 493 return getPersistence() 494 .fetchByC_C_Last(classNameId, classPK, orderByComparator); 495 } 496 497 /** 498 * Returns the social activity limits before and after the current social activity limit in the ordered set where classNameId = ? and classPK = ?. 499 * 500 * @param activityLimitId the primary key of the current social activity limit 501 * @param classNameId the class name ID 502 * @param classPK the class p k 503 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 504 * @return the previous, current, and next social activity limit 505 * @throws NoSuchActivityLimitException if a social activity limit with the primary key could not be found 506 */ 507 public static SocialActivityLimit[] findByC_C_PrevAndNext( 508 long activityLimitId, long classNameId, long classPK, 509 OrderByComparator<SocialActivityLimit> orderByComparator) 510 throws com.liferay.portlet.social.NoSuchActivityLimitException { 511 return getPersistence() 512 .findByC_C_PrevAndNext(activityLimitId, classNameId, 513 classPK, orderByComparator); 514 } 515 516 /** 517 * Removes all the social activity limits where classNameId = ? and classPK = ? from the database. 518 * 519 * @param classNameId the class name ID 520 * @param classPK the class p k 521 */ 522 public static void removeByC_C(long classNameId, long classPK) { 523 getPersistence().removeByC_C(classNameId, classPK); 524 } 525 526 /** 527 * Returns the number of social activity limits where classNameId = ? and classPK = ?. 528 * 529 * @param classNameId the class name ID 530 * @param classPK the class p k 531 * @return the number of matching social activity limits 532 */ 533 public static int countByC_C(long classNameId, long classPK) { 534 return getPersistence().countByC_C(classNameId, classPK); 535 } 536 537 /** 538 * Returns the social activity limit where groupId = ? and userId = ? and classNameId = ? and classPK = ? and activityType = ? and activityCounterName = ? or throws a {@link NoSuchActivityLimitException} if it could not be found. 539 * 540 * @param groupId the group ID 541 * @param userId the user ID 542 * @param classNameId the class name ID 543 * @param classPK the class p k 544 * @param activityType the activity type 545 * @param activityCounterName the activity counter name 546 * @return the matching social activity limit 547 * @throws NoSuchActivityLimitException if a matching social activity limit could not be found 548 */ 549 public static SocialActivityLimit findByG_U_C_C_A_A(long groupId, 550 long userId, long classNameId, long classPK, int activityType, 551 java.lang.String activityCounterName) 552 throws com.liferay.portlet.social.NoSuchActivityLimitException { 553 return getPersistence() 554 .findByG_U_C_C_A_A(groupId, userId, classNameId, classPK, 555 activityType, activityCounterName); 556 } 557 558 /** 559 * Returns the social activity limit where groupId = ? and userId = ? and classNameId = ? and classPK = ? and activityType = ? and activityCounterName = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 560 * 561 * @param groupId the group ID 562 * @param userId the user ID 563 * @param classNameId the class name ID 564 * @param classPK the class p k 565 * @param activityType the activity type 566 * @param activityCounterName the activity counter name 567 * @return the matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 568 */ 569 public static SocialActivityLimit fetchByG_U_C_C_A_A(long groupId, 570 long userId, long classNameId, long classPK, int activityType, 571 java.lang.String activityCounterName) { 572 return getPersistence() 573 .fetchByG_U_C_C_A_A(groupId, userId, classNameId, classPK, 574 activityType, activityCounterName); 575 } 576 577 /** 578 * Returns the social activity limit where groupId = ? and userId = ? and classNameId = ? and classPK = ? and activityType = ? and activityCounterName = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 579 * 580 * @param groupId the group ID 581 * @param userId the user ID 582 * @param classNameId the class name ID 583 * @param classPK the class p k 584 * @param activityType the activity type 585 * @param activityCounterName the activity counter name 586 * @param retrieveFromCache whether to use the finder cache 587 * @return the matching social activity limit, or <code>null</code> if a matching social activity limit could not be found 588 */ 589 public static SocialActivityLimit fetchByG_U_C_C_A_A(long groupId, 590 long userId, long classNameId, long classPK, int activityType, 591 java.lang.String activityCounterName, boolean retrieveFromCache) { 592 return getPersistence() 593 .fetchByG_U_C_C_A_A(groupId, userId, classNameId, classPK, 594 activityType, activityCounterName, retrieveFromCache); 595 } 596 597 /** 598 * Removes the social activity limit where groupId = ? and userId = ? and classNameId = ? and classPK = ? and activityType = ? and activityCounterName = ? from the database. 599 * 600 * @param groupId the group ID 601 * @param userId the user ID 602 * @param classNameId the class name ID 603 * @param classPK the class p k 604 * @param activityType the activity type 605 * @param activityCounterName the activity counter name 606 * @return the social activity limit that was removed 607 */ 608 public static SocialActivityLimit removeByG_U_C_C_A_A(long groupId, 609 long userId, long classNameId, long classPK, int activityType, 610 java.lang.String activityCounterName) 611 throws com.liferay.portlet.social.NoSuchActivityLimitException { 612 return getPersistence() 613 .removeByG_U_C_C_A_A(groupId, userId, classNameId, classPK, 614 activityType, activityCounterName); 615 } 616 617 /** 618 * Returns the number of social activity limits where groupId = ? and userId = ? and classNameId = ? and classPK = ? and activityType = ? and activityCounterName = ?. 619 * 620 * @param groupId the group ID 621 * @param userId the user ID 622 * @param classNameId the class name ID 623 * @param classPK the class p k 624 * @param activityType the activity type 625 * @param activityCounterName the activity counter name 626 * @return the number of matching social activity limits 627 */ 628 public static int countByG_U_C_C_A_A(long groupId, long userId, 629 long classNameId, long classPK, int activityType, 630 java.lang.String activityCounterName) { 631 return getPersistence() 632 .countByG_U_C_C_A_A(groupId, userId, classNameId, classPK, 633 activityType, activityCounterName); 634 } 635 636 /** 637 * Caches the social activity limit in the entity cache if it is enabled. 638 * 639 * @param socialActivityLimit the social activity limit 640 */ 641 public static void cacheResult(SocialActivityLimit socialActivityLimit) { 642 getPersistence().cacheResult(socialActivityLimit); 643 } 644 645 /** 646 * Caches the social activity limits in the entity cache if it is enabled. 647 * 648 * @param socialActivityLimits the social activity limits 649 */ 650 public static void cacheResult( 651 List<SocialActivityLimit> socialActivityLimits) { 652 getPersistence().cacheResult(socialActivityLimits); 653 } 654 655 /** 656 * Creates a new social activity limit with the primary key. Does not add the social activity limit to the database. 657 * 658 * @param activityLimitId the primary key for the new social activity limit 659 * @return the new social activity limit 660 */ 661 public static SocialActivityLimit create(long activityLimitId) { 662 return getPersistence().create(activityLimitId); 663 } 664 665 /** 666 * Removes the social activity limit with the primary key from the database. Also notifies the appropriate model listeners. 667 * 668 * @param activityLimitId the primary key of the social activity limit 669 * @return the social activity limit that was removed 670 * @throws NoSuchActivityLimitException if a social activity limit with the primary key could not be found 671 */ 672 public static SocialActivityLimit remove(long activityLimitId) 673 throws com.liferay.portlet.social.NoSuchActivityLimitException { 674 return getPersistence().remove(activityLimitId); 675 } 676 677 public static SocialActivityLimit updateImpl( 678 SocialActivityLimit socialActivityLimit) { 679 return getPersistence().updateImpl(socialActivityLimit); 680 } 681 682 /** 683 * Returns the social activity limit with the primary key or throws a {@link NoSuchActivityLimitException} if it could not be found. 684 * 685 * @param activityLimitId the primary key of the social activity limit 686 * @return the social activity limit 687 * @throws NoSuchActivityLimitException if a social activity limit with the primary key could not be found 688 */ 689 public static SocialActivityLimit findByPrimaryKey(long activityLimitId) 690 throws com.liferay.portlet.social.NoSuchActivityLimitException { 691 return getPersistence().findByPrimaryKey(activityLimitId); 692 } 693 694 /** 695 * Returns the social activity limit with the primary key or returns <code>null</code> if it could not be found. 696 * 697 * @param activityLimitId the primary key of the social activity limit 698 * @return the social activity limit, or <code>null</code> if a social activity limit with the primary key could not be found 699 */ 700 public static SocialActivityLimit fetchByPrimaryKey(long activityLimitId) { 701 return getPersistence().fetchByPrimaryKey(activityLimitId); 702 } 703 704 public static java.util.Map<java.io.Serializable, SocialActivityLimit> fetchByPrimaryKeys( 705 java.util.Set<java.io.Serializable> primaryKeys) { 706 return getPersistence().fetchByPrimaryKeys(primaryKeys); 707 } 708 709 /** 710 * Returns all the social activity limits. 711 * 712 * @return the social activity limits 713 */ 714 public static List<SocialActivityLimit> findAll() { 715 return getPersistence().findAll(); 716 } 717 718 /** 719 * Returns a range of all the social activity limits. 720 * 721 * <p> 722 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 723 * </p> 724 * 725 * @param start the lower bound of the range of social activity limits 726 * @param end the upper bound of the range of social activity limits (not inclusive) 727 * @return the range of social activity limits 728 */ 729 public static List<SocialActivityLimit> findAll(int start, int end) { 730 return getPersistence().findAll(start, end); 731 } 732 733 /** 734 * Returns an ordered range of all the social activity limits. 735 * 736 * <p> 737 * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SocialActivityLimitModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 738 * </p> 739 * 740 * @param start the lower bound of the range of social activity limits 741 * @param end the upper bound of the range of social activity limits (not inclusive) 742 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 743 * @return the ordered range of social activity limits 744 */ 745 public static List<SocialActivityLimit> findAll(int start, int end, 746 OrderByComparator<SocialActivityLimit> orderByComparator) { 747 return getPersistence().findAll(start, end, orderByComparator); 748 } 749 750 /** 751 * Removes all the social activity limits from the database. 752 */ 753 public static void removeAll() { 754 getPersistence().removeAll(); 755 } 756 757 /** 758 * Returns the number of social activity limits. 759 * 760 * @return the number of social activity limits 761 */ 762 public static int countAll() { 763 return getPersistence().countAll(); 764 } 765 766 public static SocialActivityLimitPersistence getPersistence() { 767 if (_persistence == null) { 768 _persistence = (SocialActivityLimitPersistence)PortalBeanLocatorUtil.locate(SocialActivityLimitPersistence.class.getName()); 769 770 ReferenceRegistry.registerReference(SocialActivityLimitUtil.class, 771 "_persistence"); 772 } 773 774 return _persistence; 775 } 776 777 /** 778 * @deprecated As of 6.2.0 779 */ 780 @Deprecated 781 public void setPersistence(SocialActivityLimitPersistence persistence) { 782 } 783 784 private static SocialActivityLimitPersistence _persistence; 785 }