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.SocialActivityCounter; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the social activity counter service. This utility wraps {@link SocialActivityCounterPersistenceImpl} 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 SocialActivityCounterPersistence 038 * @see SocialActivityCounterPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class SocialActivityCounterUtil { 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(SocialActivityCounter socialActivityCounter) { 060 getPersistence().clearCache(socialActivityCounter); 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<SocialActivityCounter> 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<SocialActivityCounter> 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<SocialActivityCounter> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<SocialActivityCounter> 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 SocialActivityCounter update( 101 SocialActivityCounter socialActivityCounter) { 102 return getPersistence().update(socialActivityCounter); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static SocialActivityCounter update( 109 SocialActivityCounter socialActivityCounter, 110 ServiceContext serviceContext) { 111 return getPersistence().update(socialActivityCounter, serviceContext); 112 } 113 114 /** 115 * Returns all the social activity counters where groupId = ?. 116 * 117 * @param groupId the group ID 118 * @return the matching social activity counters 119 */ 120 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByGroupId( 121 long groupId) { 122 return getPersistence().findByGroupId(groupId); 123 } 124 125 /** 126 * Returns a range of all the social activity counters 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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 counters 134 * @param end the upper bound of the range of social activity counters (not inclusive) 135 * @return the range of matching social activity counters 136 */ 137 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByGroupId( 138 long groupId, int start, int end) { 139 return getPersistence().findByGroupId(groupId, start, end); 140 } 141 142 /** 143 * Returns an ordered range of all the social activity counters 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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 counters 151 * @param end the upper bound of the range of social activity counters (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 counters 154 */ 155 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByGroupId( 156 long groupId, int start, int end, 157 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 158 return getPersistence() 159 .findByGroupId(groupId, start, end, orderByComparator); 160 } 161 162 /** 163 * Returns the first social activity counter 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 counter 168 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 169 */ 170 public static com.liferay.portlet.social.model.SocialActivityCounter findByGroupId_First( 171 long groupId, 172 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 173 throws com.liferay.portlet.social.NoSuchActivityCounterException { 174 return getPersistence().findByGroupId_First(groupId, orderByComparator); 175 } 176 177 /** 178 * Returns the first social activity counter in the ordered set where groupId = ?. 179 * 180 * @param groupId the group ID 181 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 182 * @return the first matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 183 */ 184 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByGroupId_First( 185 long groupId, 186 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 187 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 188 } 189 190 /** 191 * Returns the last social activity counter in the ordered set where groupId = ?. 192 * 193 * @param groupId the group ID 194 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 195 * @return the last matching social activity counter 196 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 197 */ 198 public static com.liferay.portlet.social.model.SocialActivityCounter findByGroupId_Last( 199 long groupId, 200 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 201 throws com.liferay.portlet.social.NoSuchActivityCounterException { 202 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 203 } 204 205 /** 206 * Returns the last social activity counter in the ordered set where groupId = ?. 207 * 208 * @param groupId the group ID 209 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 210 * @return the last matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 211 */ 212 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByGroupId_Last( 213 long groupId, 214 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 215 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 216 } 217 218 /** 219 * Returns the social activity counters before and after the current social activity counter in the ordered set where groupId = ?. 220 * 221 * @param activityCounterId the primary key of the current social activity counter 222 * @param groupId the group ID 223 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 224 * @return the previous, current, and next social activity counter 225 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a social activity counter with the primary key could not be found 226 */ 227 public static com.liferay.portlet.social.model.SocialActivityCounter[] findByGroupId_PrevAndNext( 228 long activityCounterId, long groupId, 229 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 230 throws com.liferay.portlet.social.NoSuchActivityCounterException { 231 return getPersistence() 232 .findByGroupId_PrevAndNext(activityCounterId, groupId, 233 orderByComparator); 234 } 235 236 /** 237 * Removes all the social activity counters where groupId = ? from the database. 238 * 239 * @param groupId the group ID 240 */ 241 public static void removeByGroupId(long groupId) { 242 getPersistence().removeByGroupId(groupId); 243 } 244 245 /** 246 * Returns the number of social activity counters where groupId = ?. 247 * 248 * @param groupId the group ID 249 * @return the number of matching social activity counters 250 */ 251 public static int countByGroupId(long groupId) { 252 return getPersistence().countByGroupId(groupId); 253 } 254 255 /** 256 * Returns all the social activity counters where classNameId = ? and classPK = ?. 257 * 258 * @param classNameId the class name ID 259 * @param classPK the class p k 260 * @return the matching social activity counters 261 */ 262 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByC_C( 263 long classNameId, long classPK) { 264 return getPersistence().findByC_C(classNameId, classPK); 265 } 266 267 /** 268 * Returns a range of all the social activity counters where classNameId = ? and classPK = ?. 269 * 270 * <p> 271 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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. 272 * </p> 273 * 274 * @param classNameId the class name ID 275 * @param classPK the class p k 276 * @param start the lower bound of the range of social activity counters 277 * @param end the upper bound of the range of social activity counters (not inclusive) 278 * @return the range of matching social activity counters 279 */ 280 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByC_C( 281 long classNameId, long classPK, int start, int end) { 282 return getPersistence().findByC_C(classNameId, classPK, start, end); 283 } 284 285 /** 286 * Returns an ordered range of all the social activity counters where classNameId = ? and classPK = ?. 287 * 288 * <p> 289 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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. 290 * </p> 291 * 292 * @param classNameId the class name ID 293 * @param classPK the class p k 294 * @param start the lower bound of the range of social activity counters 295 * @param end the upper bound of the range of social activity counters (not inclusive) 296 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 297 * @return the ordered range of matching social activity counters 298 */ 299 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByC_C( 300 long classNameId, long classPK, int start, int end, 301 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 302 return getPersistence() 303 .findByC_C(classNameId, classPK, start, end, 304 orderByComparator); 305 } 306 307 /** 308 * Returns the first social activity counter in the ordered set where classNameId = ? and classPK = ?. 309 * 310 * @param classNameId the class name ID 311 * @param classPK the class p k 312 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 313 * @return the first matching social activity counter 314 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 315 */ 316 public static com.liferay.portlet.social.model.SocialActivityCounter findByC_C_First( 317 long classNameId, long classPK, 318 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 319 throws com.liferay.portlet.social.NoSuchActivityCounterException { 320 return getPersistence() 321 .findByC_C_First(classNameId, classPK, orderByComparator); 322 } 323 324 /** 325 * Returns the first social activity counter in the ordered set where classNameId = ? and classPK = ?. 326 * 327 * @param classNameId the class name ID 328 * @param classPK the class p k 329 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 330 * @return the first matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 331 */ 332 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByC_C_First( 333 long classNameId, long classPK, 334 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 335 return getPersistence() 336 .fetchByC_C_First(classNameId, classPK, orderByComparator); 337 } 338 339 /** 340 * Returns the last social activity counter in the ordered set where classNameId = ? and classPK = ?. 341 * 342 * @param classNameId the class name ID 343 * @param classPK the class p k 344 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 345 * @return the last matching social activity counter 346 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 347 */ 348 public static com.liferay.portlet.social.model.SocialActivityCounter findByC_C_Last( 349 long classNameId, long classPK, 350 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 351 throws com.liferay.portlet.social.NoSuchActivityCounterException { 352 return getPersistence() 353 .findByC_C_Last(classNameId, classPK, orderByComparator); 354 } 355 356 /** 357 * Returns the last social activity counter in the ordered set where classNameId = ? and classPK = ?. 358 * 359 * @param classNameId the class name ID 360 * @param classPK the class p k 361 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 362 * @return the last matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 363 */ 364 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByC_C_Last( 365 long classNameId, long classPK, 366 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 367 return getPersistence() 368 .fetchByC_C_Last(classNameId, classPK, orderByComparator); 369 } 370 371 /** 372 * Returns the social activity counters before and after the current social activity counter in the ordered set where classNameId = ? and classPK = ?. 373 * 374 * @param activityCounterId the primary key of the current social activity counter 375 * @param classNameId the class name ID 376 * @param classPK the class p k 377 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 378 * @return the previous, current, and next social activity counter 379 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a social activity counter with the primary key could not be found 380 */ 381 public static com.liferay.portlet.social.model.SocialActivityCounter[] findByC_C_PrevAndNext( 382 long activityCounterId, long classNameId, long classPK, 383 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 384 throws com.liferay.portlet.social.NoSuchActivityCounterException { 385 return getPersistence() 386 .findByC_C_PrevAndNext(activityCounterId, classNameId, 387 classPK, orderByComparator); 388 } 389 390 /** 391 * Removes all the social activity counters where classNameId = ? and classPK = ? from the database. 392 * 393 * @param classNameId the class name ID 394 * @param classPK the class p k 395 */ 396 public static void removeByC_C(long classNameId, long classPK) { 397 getPersistence().removeByC_C(classNameId, classPK); 398 } 399 400 /** 401 * Returns the number of social activity counters where classNameId = ? and classPK = ?. 402 * 403 * @param classNameId the class name ID 404 * @param classPK the class p k 405 * @return the number of matching social activity counters 406 */ 407 public static int countByC_C(long classNameId, long classPK) { 408 return getPersistence().countByC_C(classNameId, classPK); 409 } 410 411 /** 412 * Returns all the social activity counters where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 413 * 414 * @param groupId the group ID 415 * @param classNameId the class name ID 416 * @param classPK the class p k 417 * @param ownerType the owner type 418 * @return the matching social activity counters 419 */ 420 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByG_C_C_O( 421 long groupId, long classNameId, long classPK, int ownerType) { 422 return getPersistence() 423 .findByG_C_C_O(groupId, classNameId, classPK, ownerType); 424 } 425 426 /** 427 * Returns a range of all the social activity counters where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 428 * 429 * <p> 430 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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. 431 * </p> 432 * 433 * @param groupId the group ID 434 * @param classNameId the class name ID 435 * @param classPK the class p k 436 * @param ownerType the owner type 437 * @param start the lower bound of the range of social activity counters 438 * @param end the upper bound of the range of social activity counters (not inclusive) 439 * @return the range of matching social activity counters 440 */ 441 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByG_C_C_O( 442 long groupId, long classNameId, long classPK, int ownerType, int start, 443 int end) { 444 return getPersistence() 445 .findByG_C_C_O(groupId, classNameId, classPK, ownerType, 446 start, end); 447 } 448 449 /** 450 * Returns an ordered range of all the social activity counters where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 451 * 452 * <p> 453 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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. 454 * </p> 455 * 456 * @param groupId the group ID 457 * @param classNameId the class name ID 458 * @param classPK the class p k 459 * @param ownerType the owner type 460 * @param start the lower bound of the range of social activity counters 461 * @param end the upper bound of the range of social activity counters (not inclusive) 462 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 463 * @return the ordered range of matching social activity counters 464 */ 465 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByG_C_C_O( 466 long groupId, long classNameId, long classPK, int ownerType, int start, 467 int end, 468 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 469 return getPersistence() 470 .findByG_C_C_O(groupId, classNameId, classPK, ownerType, 471 start, end, orderByComparator); 472 } 473 474 /** 475 * Returns the first social activity counter in the ordered set where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 476 * 477 * @param groupId the group ID 478 * @param classNameId the class name ID 479 * @param classPK the class p k 480 * @param ownerType the owner type 481 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 482 * @return the first matching social activity counter 483 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 484 */ 485 public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_O_First( 486 long groupId, long classNameId, long classPK, int ownerType, 487 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 488 throws com.liferay.portlet.social.NoSuchActivityCounterException { 489 return getPersistence() 490 .findByG_C_C_O_First(groupId, classNameId, classPK, 491 ownerType, orderByComparator); 492 } 493 494 /** 495 * Returns the first social activity counter in the ordered set where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 496 * 497 * @param groupId the group ID 498 * @param classNameId the class name ID 499 * @param classPK the class p k 500 * @param ownerType the owner type 501 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 502 * @return the first matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 503 */ 504 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_O_First( 505 long groupId, long classNameId, long classPK, int ownerType, 506 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 507 return getPersistence() 508 .fetchByG_C_C_O_First(groupId, classNameId, classPK, 509 ownerType, orderByComparator); 510 } 511 512 /** 513 * Returns the last social activity counter in the ordered set where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 514 * 515 * @param groupId the group ID 516 * @param classNameId the class name ID 517 * @param classPK the class p k 518 * @param ownerType the owner type 519 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 520 * @return the last matching social activity counter 521 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 522 */ 523 public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_O_Last( 524 long groupId, long classNameId, long classPK, int ownerType, 525 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 526 throws com.liferay.portlet.social.NoSuchActivityCounterException { 527 return getPersistence() 528 .findByG_C_C_O_Last(groupId, classNameId, classPK, 529 ownerType, orderByComparator); 530 } 531 532 /** 533 * Returns the last social activity counter in the ordered set where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 534 * 535 * @param groupId the group ID 536 * @param classNameId the class name ID 537 * @param classPK the class p k 538 * @param ownerType the owner type 539 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 540 * @return the last matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 541 */ 542 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_O_Last( 543 long groupId, long classNameId, long classPK, int ownerType, 544 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 545 return getPersistence() 546 .fetchByG_C_C_O_Last(groupId, classNameId, classPK, 547 ownerType, orderByComparator); 548 } 549 550 /** 551 * Returns the social activity counters before and after the current social activity counter in the ordered set where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 552 * 553 * @param activityCounterId the primary key of the current social activity counter 554 * @param groupId the group ID 555 * @param classNameId the class name ID 556 * @param classPK the class p k 557 * @param ownerType the owner type 558 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 559 * @return the previous, current, and next social activity counter 560 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a social activity counter with the primary key could not be found 561 */ 562 public static com.liferay.portlet.social.model.SocialActivityCounter[] findByG_C_C_O_PrevAndNext( 563 long activityCounterId, long groupId, long classNameId, long classPK, 564 int ownerType, 565 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) 566 throws com.liferay.portlet.social.NoSuchActivityCounterException { 567 return getPersistence() 568 .findByG_C_C_O_PrevAndNext(activityCounterId, groupId, 569 classNameId, classPK, ownerType, orderByComparator); 570 } 571 572 /** 573 * Removes all the social activity counters where groupId = ? and classNameId = ? and classPK = ? and ownerType = ? from the database. 574 * 575 * @param groupId the group ID 576 * @param classNameId the class name ID 577 * @param classPK the class p k 578 * @param ownerType the owner type 579 */ 580 public static void removeByG_C_C_O(long groupId, long classNameId, 581 long classPK, int ownerType) { 582 getPersistence() 583 .removeByG_C_C_O(groupId, classNameId, classPK, ownerType); 584 } 585 586 /** 587 * Returns the number of social activity counters where groupId = ? and classNameId = ? and classPK = ? and ownerType = ?. 588 * 589 * @param groupId the group ID 590 * @param classNameId the class name ID 591 * @param classPK the class p k 592 * @param ownerType the owner type 593 * @return the number of matching social activity counters 594 */ 595 public static int countByG_C_C_O(long groupId, long classNameId, 596 long classPK, int ownerType) { 597 return getPersistence() 598 .countByG_C_C_O(groupId, classNameId, classPK, ownerType); 599 } 600 601 /** 602 * Returns the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and startPeriod = ? or throws a {@link com.liferay.portlet.social.NoSuchActivityCounterException} if it could not be found. 603 * 604 * @param groupId the group ID 605 * @param classNameId the class name ID 606 * @param classPK the class p k 607 * @param name the name 608 * @param ownerType the owner type 609 * @param startPeriod the start period 610 * @return the matching social activity counter 611 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 612 */ 613 public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_N_O_S( 614 long groupId, long classNameId, long classPK, java.lang.String name, 615 int ownerType, int startPeriod) 616 throws com.liferay.portlet.social.NoSuchActivityCounterException { 617 return getPersistence() 618 .findByG_C_C_N_O_S(groupId, classNameId, classPK, name, 619 ownerType, startPeriod); 620 } 621 622 /** 623 * Returns the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and startPeriod = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 624 * 625 * @param groupId the group ID 626 * @param classNameId the class name ID 627 * @param classPK the class p k 628 * @param name the name 629 * @param ownerType the owner type 630 * @param startPeriod the start period 631 * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 632 */ 633 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_S( 634 long groupId, long classNameId, long classPK, java.lang.String name, 635 int ownerType, int startPeriod) { 636 return getPersistence() 637 .fetchByG_C_C_N_O_S(groupId, classNameId, classPK, name, 638 ownerType, startPeriod); 639 } 640 641 /** 642 * Returns the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and startPeriod = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 643 * 644 * @param groupId the group ID 645 * @param classNameId the class name ID 646 * @param classPK the class p k 647 * @param name the name 648 * @param ownerType the owner type 649 * @param startPeriod the start period 650 * @param retrieveFromCache whether to use the finder cache 651 * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 652 */ 653 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_S( 654 long groupId, long classNameId, long classPK, java.lang.String name, 655 int ownerType, int startPeriod, boolean retrieveFromCache) { 656 return getPersistence() 657 .fetchByG_C_C_N_O_S(groupId, classNameId, classPK, name, 658 ownerType, startPeriod, retrieveFromCache); 659 } 660 661 /** 662 * Removes the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and startPeriod = ? from the database. 663 * 664 * @param groupId the group ID 665 * @param classNameId the class name ID 666 * @param classPK the class p k 667 * @param name the name 668 * @param ownerType the owner type 669 * @param startPeriod the start period 670 * @return the social activity counter that was removed 671 */ 672 public static com.liferay.portlet.social.model.SocialActivityCounter removeByG_C_C_N_O_S( 673 long groupId, long classNameId, long classPK, java.lang.String name, 674 int ownerType, int startPeriod) 675 throws com.liferay.portlet.social.NoSuchActivityCounterException { 676 return getPersistence() 677 .removeByG_C_C_N_O_S(groupId, classNameId, classPK, name, 678 ownerType, startPeriod); 679 } 680 681 /** 682 * Returns the number of social activity counters where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and startPeriod = ?. 683 * 684 * @param groupId the group ID 685 * @param classNameId the class name ID 686 * @param classPK the class p k 687 * @param name the name 688 * @param ownerType the owner type 689 * @param startPeriod the start period 690 * @return the number of matching social activity counters 691 */ 692 public static int countByG_C_C_N_O_S(long groupId, long classNameId, 693 long classPK, java.lang.String name, int ownerType, int startPeriod) { 694 return getPersistence() 695 .countByG_C_C_N_O_S(groupId, classNameId, classPK, name, 696 ownerType, startPeriod); 697 } 698 699 /** 700 * Returns the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and endPeriod = ? or throws a {@link com.liferay.portlet.social.NoSuchActivityCounterException} if it could not be found. 701 * 702 * @param groupId the group ID 703 * @param classNameId the class name ID 704 * @param classPK the class p k 705 * @param name the name 706 * @param ownerType the owner type 707 * @param endPeriod the end period 708 * @return the matching social activity counter 709 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found 710 */ 711 public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_N_O_E( 712 long groupId, long classNameId, long classPK, java.lang.String name, 713 int ownerType, int endPeriod) 714 throws com.liferay.portlet.social.NoSuchActivityCounterException { 715 return getPersistence() 716 .findByG_C_C_N_O_E(groupId, classNameId, classPK, name, 717 ownerType, endPeriod); 718 } 719 720 /** 721 * Returns the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and endPeriod = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 722 * 723 * @param groupId the group ID 724 * @param classNameId the class name ID 725 * @param classPK the class p k 726 * @param name the name 727 * @param ownerType the owner type 728 * @param endPeriod the end period 729 * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 730 */ 731 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_E( 732 long groupId, long classNameId, long classPK, java.lang.String name, 733 int ownerType, int endPeriod) { 734 return getPersistence() 735 .fetchByG_C_C_N_O_E(groupId, classNameId, classPK, name, 736 ownerType, endPeriod); 737 } 738 739 /** 740 * Returns the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and endPeriod = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 741 * 742 * @param groupId the group ID 743 * @param classNameId the class name ID 744 * @param classPK the class p k 745 * @param name the name 746 * @param ownerType the owner type 747 * @param endPeriod the end period 748 * @param retrieveFromCache whether to use the finder cache 749 * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found 750 */ 751 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_E( 752 long groupId, long classNameId, long classPK, java.lang.String name, 753 int ownerType, int endPeriod, boolean retrieveFromCache) { 754 return getPersistence() 755 .fetchByG_C_C_N_O_E(groupId, classNameId, classPK, name, 756 ownerType, endPeriod, retrieveFromCache); 757 } 758 759 /** 760 * Removes the social activity counter where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and endPeriod = ? from the database. 761 * 762 * @param groupId the group ID 763 * @param classNameId the class name ID 764 * @param classPK the class p k 765 * @param name the name 766 * @param ownerType the owner type 767 * @param endPeriod the end period 768 * @return the social activity counter that was removed 769 */ 770 public static com.liferay.portlet.social.model.SocialActivityCounter removeByG_C_C_N_O_E( 771 long groupId, long classNameId, long classPK, java.lang.String name, 772 int ownerType, int endPeriod) 773 throws com.liferay.portlet.social.NoSuchActivityCounterException { 774 return getPersistence() 775 .removeByG_C_C_N_O_E(groupId, classNameId, classPK, name, 776 ownerType, endPeriod); 777 } 778 779 /** 780 * Returns the number of social activity counters where groupId = ? and classNameId = ? and classPK = ? and name = ? and ownerType = ? and endPeriod = ?. 781 * 782 * @param groupId the group ID 783 * @param classNameId the class name ID 784 * @param classPK the class p k 785 * @param name the name 786 * @param ownerType the owner type 787 * @param endPeriod the end period 788 * @return the number of matching social activity counters 789 */ 790 public static int countByG_C_C_N_O_E(long groupId, long classNameId, 791 long classPK, java.lang.String name, int ownerType, int endPeriod) { 792 return getPersistence() 793 .countByG_C_C_N_O_E(groupId, classNameId, classPK, name, 794 ownerType, endPeriod); 795 } 796 797 /** 798 * Caches the social activity counter in the entity cache if it is enabled. 799 * 800 * @param socialActivityCounter the social activity counter 801 */ 802 public static void cacheResult( 803 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) { 804 getPersistence().cacheResult(socialActivityCounter); 805 } 806 807 /** 808 * Caches the social activity counters in the entity cache if it is enabled. 809 * 810 * @param socialActivityCounters the social activity counters 811 */ 812 public static void cacheResult( 813 java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> socialActivityCounters) { 814 getPersistence().cacheResult(socialActivityCounters); 815 } 816 817 /** 818 * Creates a new social activity counter with the primary key. Does not add the social activity counter to the database. 819 * 820 * @param activityCounterId the primary key for the new social activity counter 821 * @return the new social activity counter 822 */ 823 public static com.liferay.portlet.social.model.SocialActivityCounter create( 824 long activityCounterId) { 825 return getPersistence().create(activityCounterId); 826 } 827 828 /** 829 * Removes the social activity counter with the primary key from the database. Also notifies the appropriate model listeners. 830 * 831 * @param activityCounterId the primary key of the social activity counter 832 * @return the social activity counter that was removed 833 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a social activity counter with the primary key could not be found 834 */ 835 public static com.liferay.portlet.social.model.SocialActivityCounter remove( 836 long activityCounterId) 837 throws com.liferay.portlet.social.NoSuchActivityCounterException { 838 return getPersistence().remove(activityCounterId); 839 } 840 841 public static com.liferay.portlet.social.model.SocialActivityCounter updateImpl( 842 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) { 843 return getPersistence().updateImpl(socialActivityCounter); 844 } 845 846 /** 847 * Returns the social activity counter with the primary key or throws a {@link com.liferay.portlet.social.NoSuchActivityCounterException} if it could not be found. 848 * 849 * @param activityCounterId the primary key of the social activity counter 850 * @return the social activity counter 851 * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a social activity counter with the primary key could not be found 852 */ 853 public static com.liferay.portlet.social.model.SocialActivityCounter findByPrimaryKey( 854 long activityCounterId) 855 throws com.liferay.portlet.social.NoSuchActivityCounterException { 856 return getPersistence().findByPrimaryKey(activityCounterId); 857 } 858 859 /** 860 * Returns the social activity counter with the primary key or returns <code>null</code> if it could not be found. 861 * 862 * @param activityCounterId the primary key of the social activity counter 863 * @return the social activity counter, or <code>null</code> if a social activity counter with the primary key could not be found 864 */ 865 public static com.liferay.portlet.social.model.SocialActivityCounter fetchByPrimaryKey( 866 long activityCounterId) { 867 return getPersistence().fetchByPrimaryKey(activityCounterId); 868 } 869 870 public static java.util.Map<java.io.Serializable, com.liferay.portlet.social.model.SocialActivityCounter> fetchByPrimaryKeys( 871 java.util.Set<java.io.Serializable> primaryKeys) { 872 return getPersistence().fetchByPrimaryKeys(primaryKeys); 873 } 874 875 /** 876 * Returns all the social activity counters. 877 * 878 * @return the social activity counters 879 */ 880 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findAll() { 881 return getPersistence().findAll(); 882 } 883 884 /** 885 * Returns a range of all the social activity counters. 886 * 887 * <p> 888 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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. 889 * </p> 890 * 891 * @param start the lower bound of the range of social activity counters 892 * @param end the upper bound of the range of social activity counters (not inclusive) 893 * @return the range of social activity counters 894 */ 895 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findAll( 896 int start, int end) { 897 return getPersistence().findAll(start, end); 898 } 899 900 /** 901 * Returns an ordered range of all the social activity counters. 902 * 903 * <p> 904 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. 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. 905 * </p> 906 * 907 * @param start the lower bound of the range of social activity counters 908 * @param end the upper bound of the range of social activity counters (not inclusive) 909 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 910 * @return the ordered range of social activity counters 911 */ 912 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findAll( 913 int start, int end, 914 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityCounter> orderByComparator) { 915 return getPersistence().findAll(start, end, orderByComparator); 916 } 917 918 /** 919 * Removes all the social activity counters from the database. 920 */ 921 public static void removeAll() { 922 getPersistence().removeAll(); 923 } 924 925 /** 926 * Returns the number of social activity counters. 927 * 928 * @return the number of social activity counters 929 */ 930 public static int countAll() { 931 return getPersistence().countAll(); 932 } 933 934 public static SocialActivityCounterPersistence getPersistence() { 935 if (_persistence == null) { 936 _persistence = (SocialActivityCounterPersistence)PortalBeanLocatorUtil.locate(SocialActivityCounterPersistence.class.getName()); 937 938 ReferenceRegistry.registerReference(SocialActivityCounterUtil.class, 939 "_persistence"); 940 } 941 942 return _persistence; 943 } 944 945 /** 946 * @deprecated As of 6.2.0 947 */ 948 @Deprecated 949 public void setPersistence(SocialActivityCounterPersistence persistence) { 950 } 951 952 private static SocialActivityCounterPersistence _persistence; 953 }