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