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