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.SocialActivityAchievement; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the social activity achievement service. This utility wraps {@link com.liferay.portlet.social.service.persistence.impl.SocialActivityAchievementPersistenceImpl} 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 SocialActivityAchievementPersistence 038 * @see com.liferay.portlet.social.service.persistence.impl.SocialActivityAchievementPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class SocialActivityAchievementUtil { 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( 060 SocialActivityAchievement socialActivityAchievement) { 061 getPersistence().clearCache(socialActivityAchievement); 062 } 063 064 /** 065 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 066 */ 067 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 068 return getPersistence().countWithDynamicQuery(dynamicQuery); 069 } 070 071 /** 072 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 073 */ 074 public static List<SocialActivityAchievement> findWithDynamicQuery( 075 DynamicQuery dynamicQuery) { 076 return getPersistence().findWithDynamicQuery(dynamicQuery); 077 } 078 079 /** 080 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 081 */ 082 public static List<SocialActivityAchievement> findWithDynamicQuery( 083 DynamicQuery dynamicQuery, int start, int end) { 084 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 085 } 086 087 /** 088 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 089 */ 090 public static List<SocialActivityAchievement> findWithDynamicQuery( 091 DynamicQuery dynamicQuery, int start, int end, 092 OrderByComparator<SocialActivityAchievement> orderByComparator) { 093 return getPersistence() 094 .findWithDynamicQuery(dynamicQuery, start, end, 095 orderByComparator); 096 } 097 098 /** 099 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 100 */ 101 public static SocialActivityAchievement update( 102 SocialActivityAchievement socialActivityAchievement) { 103 return getPersistence().update(socialActivityAchievement); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 108 */ 109 public static SocialActivityAchievement update( 110 SocialActivityAchievement socialActivityAchievement, 111 ServiceContext serviceContext) { 112 return getPersistence().update(socialActivityAchievement, serviceContext); 113 } 114 115 /** 116 * Returns all the social activity achievements where groupId = ?. 117 * 118 * @param groupId the group ID 119 * @return the matching social activity achievements 120 */ 121 public static List<SocialActivityAchievement> findByGroupId(long groupId) { 122 return getPersistence().findByGroupId(groupId); 123 } 124 125 /** 126 * Returns a range of all the social activity achievements where groupId = ?. 127 * 128 * <p> 129 * 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 SocialActivityAchievementModelImpl}. 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. 130 * </p> 131 * 132 * @param groupId the group ID 133 * @param start the lower bound of the range of social activity achievements 134 * @param end the upper bound of the range of social activity achievements (not inclusive) 135 * @return the range of matching social activity achievements 136 */ 137 public static List<SocialActivityAchievement> findByGroupId(long groupId, 138 int start, int end) { 139 return getPersistence().findByGroupId(groupId, start, end); 140 } 141 142 /** 143 * Returns an ordered range of all the social activity achievements where groupId = ?. 144 * 145 * <p> 146 * 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 SocialActivityAchievementModelImpl}. 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. 147 * </p> 148 * 149 * @param groupId the group ID 150 * @param start the lower bound of the range of social activity achievements 151 * @param end the upper bound of the range of social activity achievements (not inclusive) 152 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 153 * @return the ordered range of matching social activity achievements 154 */ 155 public static List<SocialActivityAchievement> findByGroupId(long groupId, 156 int start, int end, 157 OrderByComparator<SocialActivityAchievement> orderByComparator) { 158 return getPersistence() 159 .findByGroupId(groupId, start, end, orderByComparator); 160 } 161 162 /** 163 * Returns the first social activity achievement in the ordered set where groupId = ?. 164 * 165 * @param groupId the group ID 166 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 167 * @return the first matching social activity achievement 168 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 169 */ 170 public static SocialActivityAchievement findByGroupId_First(long groupId, 171 OrderByComparator<SocialActivityAchievement> orderByComparator) 172 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 173 return getPersistence().findByGroupId_First(groupId, orderByComparator); 174 } 175 176 /** 177 * Returns the first social activity achievement in the ordered set where groupId = ?. 178 * 179 * @param groupId the group ID 180 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 181 * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 182 */ 183 public static SocialActivityAchievement fetchByGroupId_First(long groupId, 184 OrderByComparator<SocialActivityAchievement> orderByComparator) { 185 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 186 } 187 188 /** 189 * Returns the last social activity achievement in the ordered set where groupId = ?. 190 * 191 * @param groupId the group ID 192 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 193 * @return the last matching social activity achievement 194 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 195 */ 196 public static SocialActivityAchievement findByGroupId_Last(long groupId, 197 OrderByComparator<SocialActivityAchievement> orderByComparator) 198 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 199 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 200 } 201 202 /** 203 * Returns the last social activity achievement in the ordered set where groupId = ?. 204 * 205 * @param groupId the group ID 206 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 207 * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 208 */ 209 public static SocialActivityAchievement fetchByGroupId_Last(long groupId, 210 OrderByComparator<SocialActivityAchievement> orderByComparator) { 211 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 212 } 213 214 /** 215 * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = ?. 216 * 217 * @param activityAchievementId the primary key of the current social activity achievement 218 * @param groupId the group ID 219 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 220 * @return the previous, current, and next social activity achievement 221 * @throws NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found 222 */ 223 public static SocialActivityAchievement[] findByGroupId_PrevAndNext( 224 long activityAchievementId, long groupId, 225 OrderByComparator<SocialActivityAchievement> orderByComparator) 226 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 227 return getPersistence() 228 .findByGroupId_PrevAndNext(activityAchievementId, groupId, 229 orderByComparator); 230 } 231 232 /** 233 * Removes all the social activity achievements where groupId = ? from the database. 234 * 235 * @param groupId the group ID 236 */ 237 public static void removeByGroupId(long groupId) { 238 getPersistence().removeByGroupId(groupId); 239 } 240 241 /** 242 * Returns the number of social activity achievements where groupId = ?. 243 * 244 * @param groupId the group ID 245 * @return the number of matching social activity achievements 246 */ 247 public static int countByGroupId(long groupId) { 248 return getPersistence().countByGroupId(groupId); 249 } 250 251 /** 252 * Returns all the social activity achievements where groupId = ? and userId = ?. 253 * 254 * @param groupId the group ID 255 * @param userId the user ID 256 * @return the matching social activity achievements 257 */ 258 public static List<SocialActivityAchievement> findByG_U(long groupId, 259 long userId) { 260 return getPersistence().findByG_U(groupId, userId); 261 } 262 263 /** 264 * Returns a range of all the social activity achievements where groupId = ? and userId = ?. 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 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 SocialActivityAchievementModelImpl}. 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. 268 * </p> 269 * 270 * @param groupId the group ID 271 * @param userId the user ID 272 * @param start the lower bound of the range of social activity achievements 273 * @param end the upper bound of the range of social activity achievements (not inclusive) 274 * @return the range of matching social activity achievements 275 */ 276 public static List<SocialActivityAchievement> findByG_U(long groupId, 277 long userId, int start, int end) { 278 return getPersistence().findByG_U(groupId, userId, start, end); 279 } 280 281 /** 282 * Returns an ordered range of all the social activity achievements where groupId = ? and userId = ?. 283 * 284 * <p> 285 * 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 SocialActivityAchievementModelImpl}. 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. 286 * </p> 287 * 288 * @param groupId the group ID 289 * @param userId the user ID 290 * @param start the lower bound of the range of social activity achievements 291 * @param end the upper bound of the range of social activity achievements (not inclusive) 292 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 293 * @return the ordered range of matching social activity achievements 294 */ 295 public static List<SocialActivityAchievement> findByG_U(long groupId, 296 long userId, int start, int end, 297 OrderByComparator<SocialActivityAchievement> orderByComparator) { 298 return getPersistence() 299 .findByG_U(groupId, userId, start, end, orderByComparator); 300 } 301 302 /** 303 * Returns the first social activity achievement in the ordered set where groupId = ? and userId = ?. 304 * 305 * @param groupId the group ID 306 * @param userId the user ID 307 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 308 * @return the first matching social activity achievement 309 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 310 */ 311 public static SocialActivityAchievement findByG_U_First(long groupId, 312 long userId, 313 OrderByComparator<SocialActivityAchievement> orderByComparator) 314 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 315 return getPersistence() 316 .findByG_U_First(groupId, userId, orderByComparator); 317 } 318 319 /** 320 * Returns the first social activity achievement in the ordered set where groupId = ? and userId = ?. 321 * 322 * @param groupId the group ID 323 * @param userId the user ID 324 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 325 * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 326 */ 327 public static SocialActivityAchievement fetchByG_U_First(long groupId, 328 long userId, 329 OrderByComparator<SocialActivityAchievement> orderByComparator) { 330 return getPersistence() 331 .fetchByG_U_First(groupId, userId, orderByComparator); 332 } 333 334 /** 335 * Returns the last social activity achievement in the ordered set where groupId = ? and userId = ?. 336 * 337 * @param groupId the group ID 338 * @param userId the user ID 339 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 340 * @return the last matching social activity achievement 341 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 342 */ 343 public static SocialActivityAchievement findByG_U_Last(long groupId, 344 long userId, 345 OrderByComparator<SocialActivityAchievement> orderByComparator) 346 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 347 return getPersistence() 348 .findByG_U_Last(groupId, userId, orderByComparator); 349 } 350 351 /** 352 * Returns the last social activity achievement in the ordered set where groupId = ? and userId = ?. 353 * 354 * @param groupId the group ID 355 * @param userId the user ID 356 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 357 * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 358 */ 359 public static SocialActivityAchievement fetchByG_U_Last(long groupId, 360 long userId, 361 OrderByComparator<SocialActivityAchievement> orderByComparator) { 362 return getPersistence() 363 .fetchByG_U_Last(groupId, userId, orderByComparator); 364 } 365 366 /** 367 * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = ? and userId = ?. 368 * 369 * @param activityAchievementId the primary key of the current social activity achievement 370 * @param groupId the group ID 371 * @param userId the user ID 372 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 373 * @return the previous, current, and next social activity achievement 374 * @throws NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found 375 */ 376 public static SocialActivityAchievement[] findByG_U_PrevAndNext( 377 long activityAchievementId, long groupId, long userId, 378 OrderByComparator<SocialActivityAchievement> orderByComparator) 379 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 380 return getPersistence() 381 .findByG_U_PrevAndNext(activityAchievementId, groupId, 382 userId, orderByComparator); 383 } 384 385 /** 386 * Removes all the social activity achievements where groupId = ? and userId = ? from the database. 387 * 388 * @param groupId the group ID 389 * @param userId the user ID 390 */ 391 public static void removeByG_U(long groupId, long userId) { 392 getPersistence().removeByG_U(groupId, userId); 393 } 394 395 /** 396 * Returns the number of social activity achievements where groupId = ? and userId = ?. 397 * 398 * @param groupId the group ID 399 * @param userId the user ID 400 * @return the number of matching social activity achievements 401 */ 402 public static int countByG_U(long groupId, long userId) { 403 return getPersistence().countByG_U(groupId, userId); 404 } 405 406 /** 407 * Returns all the social activity achievements where groupId = ? and name = ?. 408 * 409 * @param groupId the group ID 410 * @param name the name 411 * @return the matching social activity achievements 412 */ 413 public static List<SocialActivityAchievement> findByG_N(long groupId, 414 java.lang.String name) { 415 return getPersistence().findByG_N(groupId, name); 416 } 417 418 /** 419 * Returns a range of all the social activity achievements where groupId = ? and name = ?. 420 * 421 * <p> 422 * 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 SocialActivityAchievementModelImpl}. 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. 423 * </p> 424 * 425 * @param groupId the group ID 426 * @param name the name 427 * @param start the lower bound of the range of social activity achievements 428 * @param end the upper bound of the range of social activity achievements (not inclusive) 429 * @return the range of matching social activity achievements 430 */ 431 public static List<SocialActivityAchievement> findByG_N(long groupId, 432 java.lang.String name, int start, int end) { 433 return getPersistence().findByG_N(groupId, name, start, end); 434 } 435 436 /** 437 * Returns an ordered range of all the social activity achievements where groupId = ? and name = ?. 438 * 439 * <p> 440 * 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 SocialActivityAchievementModelImpl}. 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. 441 * </p> 442 * 443 * @param groupId the group ID 444 * @param name the name 445 * @param start the lower bound of the range of social activity achievements 446 * @param end the upper bound of the range of social activity achievements (not inclusive) 447 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 448 * @return the ordered range of matching social activity achievements 449 */ 450 public static List<SocialActivityAchievement> findByG_N(long groupId, 451 java.lang.String name, int start, int end, 452 OrderByComparator<SocialActivityAchievement> orderByComparator) { 453 return getPersistence() 454 .findByG_N(groupId, name, start, end, orderByComparator); 455 } 456 457 /** 458 * Returns the first social activity achievement in the ordered set where groupId = ? and name = ?. 459 * 460 * @param groupId the group ID 461 * @param name the name 462 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 463 * @return the first matching social activity achievement 464 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 465 */ 466 public static SocialActivityAchievement findByG_N_First(long groupId, 467 java.lang.String name, 468 OrderByComparator<SocialActivityAchievement> orderByComparator) 469 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 470 return getPersistence().findByG_N_First(groupId, name, orderByComparator); 471 } 472 473 /** 474 * Returns the first social activity achievement in the ordered set where groupId = ? and name = ?. 475 * 476 * @param groupId the group ID 477 * @param name the name 478 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 479 * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 480 */ 481 public static SocialActivityAchievement fetchByG_N_First(long groupId, 482 java.lang.String name, 483 OrderByComparator<SocialActivityAchievement> orderByComparator) { 484 return getPersistence() 485 .fetchByG_N_First(groupId, name, orderByComparator); 486 } 487 488 /** 489 * Returns the last social activity achievement in the ordered set where groupId = ? and name = ?. 490 * 491 * @param groupId the group ID 492 * @param name the name 493 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 494 * @return the last matching social activity achievement 495 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 496 */ 497 public static SocialActivityAchievement findByG_N_Last(long groupId, 498 java.lang.String name, 499 OrderByComparator<SocialActivityAchievement> orderByComparator) 500 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 501 return getPersistence().findByG_N_Last(groupId, name, orderByComparator); 502 } 503 504 /** 505 * Returns the last social activity achievement in the ordered set where groupId = ? and name = ?. 506 * 507 * @param groupId the group ID 508 * @param name the name 509 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 510 * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 511 */ 512 public static SocialActivityAchievement fetchByG_N_Last(long groupId, 513 java.lang.String name, 514 OrderByComparator<SocialActivityAchievement> orderByComparator) { 515 return getPersistence().fetchByG_N_Last(groupId, name, orderByComparator); 516 } 517 518 /** 519 * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = ? and name = ?. 520 * 521 * @param activityAchievementId the primary key of the current social activity achievement 522 * @param groupId the group ID 523 * @param name the name 524 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 525 * @return the previous, current, and next social activity achievement 526 * @throws NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found 527 */ 528 public static SocialActivityAchievement[] findByG_N_PrevAndNext( 529 long activityAchievementId, long groupId, java.lang.String name, 530 OrderByComparator<SocialActivityAchievement> orderByComparator) 531 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 532 return getPersistence() 533 .findByG_N_PrevAndNext(activityAchievementId, groupId, name, 534 orderByComparator); 535 } 536 537 /** 538 * Removes all the social activity achievements where groupId = ? and name = ? from the database. 539 * 540 * @param groupId the group ID 541 * @param name the name 542 */ 543 public static void removeByG_N(long groupId, java.lang.String name) { 544 getPersistence().removeByG_N(groupId, name); 545 } 546 547 /** 548 * Returns the number of social activity achievements where groupId = ? and name = ?. 549 * 550 * @param groupId the group ID 551 * @param name the name 552 * @return the number of matching social activity achievements 553 */ 554 public static int countByG_N(long groupId, java.lang.String name) { 555 return getPersistence().countByG_N(groupId, name); 556 } 557 558 /** 559 * Returns all the social activity achievements where groupId = ? and firstInGroup = ?. 560 * 561 * @param groupId the group ID 562 * @param firstInGroup the first in group 563 * @return the matching social activity achievements 564 */ 565 public static List<SocialActivityAchievement> findByG_F(long groupId, 566 boolean firstInGroup) { 567 return getPersistence().findByG_F(groupId, firstInGroup); 568 } 569 570 /** 571 * Returns a range of all the social activity achievements where groupId = ? and firstInGroup = ?. 572 * 573 * <p> 574 * 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 SocialActivityAchievementModelImpl}. 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. 575 * </p> 576 * 577 * @param groupId the group ID 578 * @param firstInGroup the first in group 579 * @param start the lower bound of the range of social activity achievements 580 * @param end the upper bound of the range of social activity achievements (not inclusive) 581 * @return the range of matching social activity achievements 582 */ 583 public static List<SocialActivityAchievement> findByG_F(long groupId, 584 boolean firstInGroup, int start, int end) { 585 return getPersistence().findByG_F(groupId, firstInGroup, start, end); 586 } 587 588 /** 589 * Returns an ordered range of all the social activity achievements where groupId = ? and firstInGroup = ?. 590 * 591 * <p> 592 * 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 SocialActivityAchievementModelImpl}. 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. 593 * </p> 594 * 595 * @param groupId the group ID 596 * @param firstInGroup the first in group 597 * @param start the lower bound of the range of social activity achievements 598 * @param end the upper bound of the range of social activity achievements (not inclusive) 599 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 600 * @return the ordered range of matching social activity achievements 601 */ 602 public static List<SocialActivityAchievement> findByG_F(long groupId, 603 boolean firstInGroup, int start, int end, 604 OrderByComparator<SocialActivityAchievement> orderByComparator) { 605 return getPersistence() 606 .findByG_F(groupId, firstInGroup, start, end, 607 orderByComparator); 608 } 609 610 /** 611 * Returns the first social activity achievement in the ordered set where groupId = ? and firstInGroup = ?. 612 * 613 * @param groupId the group ID 614 * @param firstInGroup the first in group 615 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 616 * @return the first matching social activity achievement 617 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 618 */ 619 public static SocialActivityAchievement findByG_F_First(long groupId, 620 boolean firstInGroup, 621 OrderByComparator<SocialActivityAchievement> orderByComparator) 622 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 623 return getPersistence() 624 .findByG_F_First(groupId, firstInGroup, orderByComparator); 625 } 626 627 /** 628 * Returns the first social activity achievement in the ordered set where groupId = ? and firstInGroup = ?. 629 * 630 * @param groupId the group ID 631 * @param firstInGroup the first in group 632 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 633 * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 634 */ 635 public static SocialActivityAchievement fetchByG_F_First(long groupId, 636 boolean firstInGroup, 637 OrderByComparator<SocialActivityAchievement> orderByComparator) { 638 return getPersistence() 639 .fetchByG_F_First(groupId, firstInGroup, orderByComparator); 640 } 641 642 /** 643 * Returns the last social activity achievement in the ordered set where groupId = ? and firstInGroup = ?. 644 * 645 * @param groupId the group ID 646 * @param firstInGroup the first in group 647 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 648 * @return the last matching social activity achievement 649 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 650 */ 651 public static SocialActivityAchievement findByG_F_Last(long groupId, 652 boolean firstInGroup, 653 OrderByComparator<SocialActivityAchievement> orderByComparator) 654 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 655 return getPersistence() 656 .findByG_F_Last(groupId, firstInGroup, orderByComparator); 657 } 658 659 /** 660 * Returns the last social activity achievement in the ordered set where groupId = ? and firstInGroup = ?. 661 * 662 * @param groupId the group ID 663 * @param firstInGroup the first in group 664 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 665 * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 666 */ 667 public static SocialActivityAchievement fetchByG_F_Last(long groupId, 668 boolean firstInGroup, 669 OrderByComparator<SocialActivityAchievement> orderByComparator) { 670 return getPersistence() 671 .fetchByG_F_Last(groupId, firstInGroup, orderByComparator); 672 } 673 674 /** 675 * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = ? and firstInGroup = ?. 676 * 677 * @param activityAchievementId the primary key of the current social activity achievement 678 * @param groupId the group ID 679 * @param firstInGroup the first in group 680 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 681 * @return the previous, current, and next social activity achievement 682 * @throws NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found 683 */ 684 public static SocialActivityAchievement[] findByG_F_PrevAndNext( 685 long activityAchievementId, long groupId, boolean firstInGroup, 686 OrderByComparator<SocialActivityAchievement> orderByComparator) 687 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 688 return getPersistence() 689 .findByG_F_PrevAndNext(activityAchievementId, groupId, 690 firstInGroup, orderByComparator); 691 } 692 693 /** 694 * Removes all the social activity achievements where groupId = ? and firstInGroup = ? from the database. 695 * 696 * @param groupId the group ID 697 * @param firstInGroup the first in group 698 */ 699 public static void removeByG_F(long groupId, boolean firstInGroup) { 700 getPersistence().removeByG_F(groupId, firstInGroup); 701 } 702 703 /** 704 * Returns the number of social activity achievements where groupId = ? and firstInGroup = ?. 705 * 706 * @param groupId the group ID 707 * @param firstInGroup the first in group 708 * @return the number of matching social activity achievements 709 */ 710 public static int countByG_F(long groupId, boolean firstInGroup) { 711 return getPersistence().countByG_F(groupId, firstInGroup); 712 } 713 714 /** 715 * Returns the social activity achievement where groupId = ? and userId = ? and name = ? or throws a {@link NoSuchActivityAchievementException} if it could not be found. 716 * 717 * @param groupId the group ID 718 * @param userId the user ID 719 * @param name the name 720 * @return the matching social activity achievement 721 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 722 */ 723 public static SocialActivityAchievement findByG_U_N(long groupId, 724 long userId, java.lang.String name) 725 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 726 return getPersistence().findByG_U_N(groupId, userId, name); 727 } 728 729 /** 730 * Returns the social activity achievement where groupId = ? and userId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 731 * 732 * @param groupId the group ID 733 * @param userId the user ID 734 * @param name the name 735 * @return the matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 736 */ 737 public static SocialActivityAchievement fetchByG_U_N(long groupId, 738 long userId, java.lang.String name) { 739 return getPersistence().fetchByG_U_N(groupId, userId, name); 740 } 741 742 /** 743 * Returns the social activity achievement where groupId = ? and userId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 744 * 745 * @param groupId the group ID 746 * @param userId the user ID 747 * @param name the name 748 * @param retrieveFromCache whether to use the finder cache 749 * @return the matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 750 */ 751 public static SocialActivityAchievement fetchByG_U_N(long groupId, 752 long userId, java.lang.String name, boolean retrieveFromCache) { 753 return getPersistence() 754 .fetchByG_U_N(groupId, userId, name, retrieveFromCache); 755 } 756 757 /** 758 * Removes the social activity achievement where groupId = ? and userId = ? and name = ? from the database. 759 * 760 * @param groupId the group ID 761 * @param userId the user ID 762 * @param name the name 763 * @return the social activity achievement that was removed 764 */ 765 public static SocialActivityAchievement removeByG_U_N(long groupId, 766 long userId, java.lang.String name) 767 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 768 return getPersistence().removeByG_U_N(groupId, userId, name); 769 } 770 771 /** 772 * Returns the number of social activity achievements where groupId = ? and userId = ? and name = ?. 773 * 774 * @param groupId the group ID 775 * @param userId the user ID 776 * @param name the name 777 * @return the number of matching social activity achievements 778 */ 779 public static int countByG_U_N(long groupId, long userId, 780 java.lang.String name) { 781 return getPersistence().countByG_U_N(groupId, userId, name); 782 } 783 784 /** 785 * Returns all the social activity achievements where groupId = ? and userId = ? and firstInGroup = ?. 786 * 787 * @param groupId the group ID 788 * @param userId the user ID 789 * @param firstInGroup the first in group 790 * @return the matching social activity achievements 791 */ 792 public static List<SocialActivityAchievement> findByG_U_F(long groupId, 793 long userId, boolean firstInGroup) { 794 return getPersistence().findByG_U_F(groupId, userId, firstInGroup); 795 } 796 797 /** 798 * Returns a range of all the social activity achievements where groupId = ? and userId = ? and firstInGroup = ?. 799 * 800 * <p> 801 * 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 SocialActivityAchievementModelImpl}. 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. 802 * </p> 803 * 804 * @param groupId the group ID 805 * @param userId the user ID 806 * @param firstInGroup the first in group 807 * @param start the lower bound of the range of social activity achievements 808 * @param end the upper bound of the range of social activity achievements (not inclusive) 809 * @return the range of matching social activity achievements 810 */ 811 public static List<SocialActivityAchievement> findByG_U_F(long groupId, 812 long userId, boolean firstInGroup, int start, int end) { 813 return getPersistence() 814 .findByG_U_F(groupId, userId, firstInGroup, start, end); 815 } 816 817 /** 818 * Returns an ordered range of all the social activity achievements where groupId = ? and userId = ? and firstInGroup = ?. 819 * 820 * <p> 821 * 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 SocialActivityAchievementModelImpl}. 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. 822 * </p> 823 * 824 * @param groupId the group ID 825 * @param userId the user ID 826 * @param firstInGroup the first in group 827 * @param start the lower bound of the range of social activity achievements 828 * @param end the upper bound of the range of social activity achievements (not inclusive) 829 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 830 * @return the ordered range of matching social activity achievements 831 */ 832 public static List<SocialActivityAchievement> findByG_U_F(long groupId, 833 long userId, boolean firstInGroup, int start, int end, 834 OrderByComparator<SocialActivityAchievement> orderByComparator) { 835 return getPersistence() 836 .findByG_U_F(groupId, userId, firstInGroup, start, end, 837 orderByComparator); 838 } 839 840 /** 841 * Returns the first social activity achievement in the ordered set where groupId = ? and userId = ? and firstInGroup = ?. 842 * 843 * @param groupId the group ID 844 * @param userId the user ID 845 * @param firstInGroup the first in group 846 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 847 * @return the first matching social activity achievement 848 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 849 */ 850 public static SocialActivityAchievement findByG_U_F_First(long groupId, 851 long userId, boolean firstInGroup, 852 OrderByComparator<SocialActivityAchievement> orderByComparator) 853 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 854 return getPersistence() 855 .findByG_U_F_First(groupId, userId, firstInGroup, 856 orderByComparator); 857 } 858 859 /** 860 * Returns the first social activity achievement in the ordered set where groupId = ? and userId = ? and firstInGroup = ?. 861 * 862 * @param groupId the group ID 863 * @param userId the user ID 864 * @param firstInGroup the first in group 865 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 866 * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 867 */ 868 public static SocialActivityAchievement fetchByG_U_F_First(long groupId, 869 long userId, boolean firstInGroup, 870 OrderByComparator<SocialActivityAchievement> orderByComparator) { 871 return getPersistence() 872 .fetchByG_U_F_First(groupId, userId, firstInGroup, 873 orderByComparator); 874 } 875 876 /** 877 * Returns the last social activity achievement in the ordered set where groupId = ? and userId = ? and firstInGroup = ?. 878 * 879 * @param groupId the group ID 880 * @param userId the user ID 881 * @param firstInGroup the first in group 882 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 883 * @return the last matching social activity achievement 884 * @throws NoSuchActivityAchievementException if a matching social activity achievement could not be found 885 */ 886 public static SocialActivityAchievement findByG_U_F_Last(long groupId, 887 long userId, boolean firstInGroup, 888 OrderByComparator<SocialActivityAchievement> orderByComparator) 889 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 890 return getPersistence() 891 .findByG_U_F_Last(groupId, userId, firstInGroup, 892 orderByComparator); 893 } 894 895 /** 896 * Returns the last social activity achievement in the ordered set where groupId = ? and userId = ? and firstInGroup = ?. 897 * 898 * @param groupId the group ID 899 * @param userId the user ID 900 * @param firstInGroup the first in group 901 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 902 * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found 903 */ 904 public static SocialActivityAchievement fetchByG_U_F_Last(long groupId, 905 long userId, boolean firstInGroup, 906 OrderByComparator<SocialActivityAchievement> orderByComparator) { 907 return getPersistence() 908 .fetchByG_U_F_Last(groupId, userId, firstInGroup, 909 orderByComparator); 910 } 911 912 /** 913 * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = ? and userId = ? and firstInGroup = ?. 914 * 915 * @param activityAchievementId the primary key of the current social activity achievement 916 * @param groupId the group ID 917 * @param userId the user ID 918 * @param firstInGroup the first in group 919 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 920 * @return the previous, current, and next social activity achievement 921 * @throws NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found 922 */ 923 public static SocialActivityAchievement[] findByG_U_F_PrevAndNext( 924 long activityAchievementId, long groupId, long userId, 925 boolean firstInGroup, 926 OrderByComparator<SocialActivityAchievement> orderByComparator) 927 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 928 return getPersistence() 929 .findByG_U_F_PrevAndNext(activityAchievementId, groupId, 930 userId, firstInGroup, orderByComparator); 931 } 932 933 /** 934 * Removes all the social activity achievements where groupId = ? and userId = ? and firstInGroup = ? from the database. 935 * 936 * @param groupId the group ID 937 * @param userId the user ID 938 * @param firstInGroup the first in group 939 */ 940 public static void removeByG_U_F(long groupId, long userId, 941 boolean firstInGroup) { 942 getPersistence().removeByG_U_F(groupId, userId, firstInGroup); 943 } 944 945 /** 946 * Returns the number of social activity achievements where groupId = ? and userId = ? and firstInGroup = ?. 947 * 948 * @param groupId the group ID 949 * @param userId the user ID 950 * @param firstInGroup the first in group 951 * @return the number of matching social activity achievements 952 */ 953 public static int countByG_U_F(long groupId, long userId, 954 boolean firstInGroup) { 955 return getPersistence().countByG_U_F(groupId, userId, firstInGroup); 956 } 957 958 /** 959 * Caches the social activity achievement in the entity cache if it is enabled. 960 * 961 * @param socialActivityAchievement the social activity achievement 962 */ 963 public static void cacheResult( 964 SocialActivityAchievement socialActivityAchievement) { 965 getPersistence().cacheResult(socialActivityAchievement); 966 } 967 968 /** 969 * Caches the social activity achievements in the entity cache if it is enabled. 970 * 971 * @param socialActivityAchievements the social activity achievements 972 */ 973 public static void cacheResult( 974 List<SocialActivityAchievement> socialActivityAchievements) { 975 getPersistence().cacheResult(socialActivityAchievements); 976 } 977 978 /** 979 * Creates a new social activity achievement with the primary key. Does not add the social activity achievement to the database. 980 * 981 * @param activityAchievementId the primary key for the new social activity achievement 982 * @return the new social activity achievement 983 */ 984 public static SocialActivityAchievement create(long activityAchievementId) { 985 return getPersistence().create(activityAchievementId); 986 } 987 988 /** 989 * Removes the social activity achievement with the primary key from the database. Also notifies the appropriate model listeners. 990 * 991 * @param activityAchievementId the primary key of the social activity achievement 992 * @return the social activity achievement that was removed 993 * @throws NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found 994 */ 995 public static SocialActivityAchievement remove(long activityAchievementId) 996 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 997 return getPersistence().remove(activityAchievementId); 998 } 999 1000 public static SocialActivityAchievement updateImpl( 1001 SocialActivityAchievement socialActivityAchievement) { 1002 return getPersistence().updateImpl(socialActivityAchievement); 1003 } 1004 1005 /** 1006 * Returns the social activity achievement with the primary key or throws a {@link NoSuchActivityAchievementException} if it could not be found. 1007 * 1008 * @param activityAchievementId the primary key of the social activity achievement 1009 * @return the social activity achievement 1010 * @throws NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found 1011 */ 1012 public static SocialActivityAchievement findByPrimaryKey( 1013 long activityAchievementId) 1014 throws com.liferay.portlet.social.NoSuchActivityAchievementException { 1015 return getPersistence().findByPrimaryKey(activityAchievementId); 1016 } 1017 1018 /** 1019 * Returns the social activity achievement with the primary key or returns <code>null</code> if it could not be found. 1020 * 1021 * @param activityAchievementId the primary key of the social activity achievement 1022 * @return the social activity achievement, or <code>null</code> if a social activity achievement with the primary key could not be found 1023 */ 1024 public static SocialActivityAchievement fetchByPrimaryKey( 1025 long activityAchievementId) { 1026 return getPersistence().fetchByPrimaryKey(activityAchievementId); 1027 } 1028 1029 public static java.util.Map<java.io.Serializable, SocialActivityAchievement> fetchByPrimaryKeys( 1030 java.util.Set<java.io.Serializable> primaryKeys) { 1031 return getPersistence().fetchByPrimaryKeys(primaryKeys); 1032 } 1033 1034 /** 1035 * Returns all the social activity achievements. 1036 * 1037 * @return the social activity achievements 1038 */ 1039 public static List<SocialActivityAchievement> findAll() { 1040 return getPersistence().findAll(); 1041 } 1042 1043 /** 1044 * Returns a range of all the social activity achievements. 1045 * 1046 * <p> 1047 * 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 SocialActivityAchievementModelImpl}. 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. 1048 * </p> 1049 * 1050 * @param start the lower bound of the range of social activity achievements 1051 * @param end the upper bound of the range of social activity achievements (not inclusive) 1052 * @return the range of social activity achievements 1053 */ 1054 public static List<SocialActivityAchievement> findAll(int start, int end) { 1055 return getPersistence().findAll(start, end); 1056 } 1057 1058 /** 1059 * Returns an ordered range of all the social activity achievements. 1060 * 1061 * <p> 1062 * 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 SocialActivityAchievementModelImpl}. 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. 1063 * </p> 1064 * 1065 * @param start the lower bound of the range of social activity achievements 1066 * @param end the upper bound of the range of social activity achievements (not inclusive) 1067 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1068 * @return the ordered range of social activity achievements 1069 */ 1070 public static List<SocialActivityAchievement> findAll(int start, int end, 1071 OrderByComparator<SocialActivityAchievement> orderByComparator) { 1072 return getPersistence().findAll(start, end, orderByComparator); 1073 } 1074 1075 /** 1076 * Removes all the social activity achievements from the database. 1077 */ 1078 public static void removeAll() { 1079 getPersistence().removeAll(); 1080 } 1081 1082 /** 1083 * Returns the number of social activity achievements. 1084 * 1085 * @return the number of social activity achievements 1086 */ 1087 public static int countAll() { 1088 return getPersistence().countAll(); 1089 } 1090 1091 public static SocialActivityAchievementPersistence getPersistence() { 1092 if (_persistence == null) { 1093 _persistence = (SocialActivityAchievementPersistence)PortalBeanLocatorUtil.locate(SocialActivityAchievementPersistence.class.getName()); 1094 1095 ReferenceRegistry.registerReference(SocialActivityAchievementUtil.class, 1096 "_persistence"); 1097 } 1098 1099 return _persistence; 1100 } 1101 1102 /** 1103 * @deprecated As of 6.2.0 1104 */ 1105 @Deprecated 1106 public void setPersistence(SocialActivityAchievementPersistence persistence) { 1107 } 1108 1109 private static SocialActivityAchievementPersistence _persistence; 1110 }