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