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