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.journal.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.journal.model.JournalArticleResource; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the journal article resource service. This utility wraps {@link JournalArticleResourcePersistenceImpl} 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 JournalArticleResourcePersistence 037 * @see JournalArticleResourcePersistenceImpl 038 * @generated 039 */ 040 public class JournalArticleResourceUtil { 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(JournalArticleResource journalArticleResource) { 058 getPersistence().clearCache(journalArticleResource); 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<JournalArticleResource> 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<JournalArticleResource> 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<JournalArticleResource> 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, boolean) 099 */ 100 public static JournalArticleResource update( 101 JournalArticleResource journalArticleResource, boolean merge) 102 throws SystemException { 103 return getPersistence().update(journalArticleResource, merge); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 108 */ 109 public static JournalArticleResource update( 110 JournalArticleResource journalArticleResource, boolean merge, 111 ServiceContext serviceContext) throws SystemException { 112 return getPersistence() 113 .update(journalArticleResource, merge, serviceContext); 114 } 115 116 /** 117 * Caches the journal article resource in the entity cache if it is enabled. 118 * 119 * @param journalArticleResource the journal article resource 120 */ 121 public static void cacheResult( 122 com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) { 123 getPersistence().cacheResult(journalArticleResource); 124 } 125 126 /** 127 * Caches the journal article resources in the entity cache if it is enabled. 128 * 129 * @param journalArticleResources the journal article resources 130 */ 131 public static void cacheResult( 132 java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> journalArticleResources) { 133 getPersistence().cacheResult(journalArticleResources); 134 } 135 136 /** 137 * Creates a new journal article resource with the primary key. Does not add the journal article resource to the database. 138 * 139 * @param resourcePrimKey the primary key for the new journal article resource 140 * @return the new journal article resource 141 */ 142 public static com.liferay.portlet.journal.model.JournalArticleResource create( 143 long resourcePrimKey) { 144 return getPersistence().create(resourcePrimKey); 145 } 146 147 /** 148 * Removes the journal article resource with the primary key from the database. Also notifies the appropriate model listeners. 149 * 150 * @param resourcePrimKey the primary key of the journal article resource 151 * @return the journal article resource that was removed 152 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found 153 * @throws SystemException if a system exception occurred 154 */ 155 public static com.liferay.portlet.journal.model.JournalArticleResource remove( 156 long resourcePrimKey) 157 throws com.liferay.portal.kernel.exception.SystemException, 158 com.liferay.portlet.journal.NoSuchArticleResourceException { 159 return getPersistence().remove(resourcePrimKey); 160 } 161 162 public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl( 163 com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource, 164 boolean merge) 165 throws com.liferay.portal.kernel.exception.SystemException { 166 return getPersistence().updateImpl(journalArticleResource, merge); 167 } 168 169 /** 170 * Returns the journal article resource with the primary key or throws a {@link com.liferay.portlet.journal.NoSuchArticleResourceException} if it could not be found. 171 * 172 * @param resourcePrimKey the primary key of the journal article resource 173 * @return the journal article resource 174 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found 175 * @throws SystemException if a system exception occurred 176 */ 177 public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey( 178 long resourcePrimKey) 179 throws com.liferay.portal.kernel.exception.SystemException, 180 com.liferay.portlet.journal.NoSuchArticleResourceException { 181 return getPersistence().findByPrimaryKey(resourcePrimKey); 182 } 183 184 /** 185 * Returns the journal article resource with the primary key or returns <code>null</code> if it could not be found. 186 * 187 * @param resourcePrimKey the primary key of the journal article resource 188 * @return the journal article resource, or <code>null</code> if a journal article resource with the primary key could not be found 189 * @throws SystemException if a system exception occurred 190 */ 191 public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey( 192 long resourcePrimKey) 193 throws com.liferay.portal.kernel.exception.SystemException { 194 return getPersistence().fetchByPrimaryKey(resourcePrimKey); 195 } 196 197 /** 198 * Returns all the journal article resources where uuid = ?. 199 * 200 * @param uuid the uuid 201 * @return the matching journal article resources 202 * @throws SystemException if a system exception occurred 203 */ 204 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByUuid( 205 java.lang.String uuid) 206 throws com.liferay.portal.kernel.exception.SystemException { 207 return getPersistence().findByUuid(uuid); 208 } 209 210 /** 211 * Returns a range of all the journal article resources 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 218 * @param start the lower bound of the range of journal article resources 219 * @param end the upper bound of the range of journal article resources (not inclusive) 220 * @return the range of matching journal article resources 221 * @throws SystemException if a system exception occurred 222 */ 223 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> 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 * Returns an ordered range of all the journal article resources 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 237 * @param start the lower bound of the range of journal article resources 238 * @param end the upper bound of the range of journal article resources (not inclusive) 239 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 240 * @return the ordered range of matching journal article resources 241 * @throws SystemException if a system exception occurred 242 */ 243 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> 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 * Returns the first journal article resource 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 258 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 259 * @return the first matching journal article resource 260 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found 261 * @throws SystemException if a system exception occurred 262 */ 263 public static com.liferay.portlet.journal.model.JournalArticleResource 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.journal.NoSuchArticleResourceException { 268 return getPersistence().findByUuid_First(uuid, orderByComparator); 269 } 270 271 /** 272 * Returns the last journal article resource 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 279 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 280 * @return the last matching journal article resource 281 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found 282 * @throws SystemException if a system exception occurred 283 */ 284 public static com.liferay.portlet.journal.model.JournalArticleResource 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.journal.NoSuchArticleResourceException { 289 return getPersistence().findByUuid_Last(uuid, orderByComparator); 290 } 291 292 /** 293 * Returns the journal article resources before and after the current journal article resource 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 resourcePrimKey the primary key of the current journal article resource 300 * @param uuid the uuid 301 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 302 * @return the previous, current, and next journal article resource 303 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found 304 * @throws SystemException if a system exception occurred 305 */ 306 public static com.liferay.portlet.journal.model.JournalArticleResource[] findByUuid_PrevAndNext( 307 long resourcePrimKey, java.lang.String uuid, 308 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 309 throws com.liferay.portal.kernel.exception.SystemException, 310 com.liferay.portlet.journal.NoSuchArticleResourceException { 311 return getPersistence() 312 .findByUuid_PrevAndNext(resourcePrimKey, uuid, 313 orderByComparator); 314 } 315 316 /** 317 * Returns the journal article resource where uuid = ? and groupId = ? or throws a {@link com.liferay.portlet.journal.NoSuchArticleResourceException} if it could not be found. 318 * 319 * @param uuid the uuid 320 * @param groupId the group ID 321 * @return the matching journal article resource 322 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found 323 * @throws SystemException if a system exception occurred 324 */ 325 public static com.liferay.portlet.journal.model.JournalArticleResource findByUUID_G( 326 java.lang.String uuid, long groupId) 327 throws com.liferay.portal.kernel.exception.SystemException, 328 com.liferay.portlet.journal.NoSuchArticleResourceException { 329 return getPersistence().findByUUID_G(uuid, groupId); 330 } 331 332 /** 333 * Returns the journal article resource where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 334 * 335 * @param uuid the uuid 336 * @param groupId the group ID 337 * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found 338 * @throws SystemException if a system exception occurred 339 */ 340 public static com.liferay.portlet.journal.model.JournalArticleResource fetchByUUID_G( 341 java.lang.String uuid, long groupId) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().fetchByUUID_G(uuid, groupId); 344 } 345 346 /** 347 * Returns the journal article resource where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 348 * 349 * @param uuid the uuid 350 * @param groupId the group ID 351 * @param retrieveFromCache whether to use the finder cache 352 * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found 353 * @throws SystemException if a system exception occurred 354 */ 355 public static com.liferay.portlet.journal.model.JournalArticleResource fetchByUUID_G( 356 java.lang.String uuid, long groupId, boolean retrieveFromCache) 357 throws com.liferay.portal.kernel.exception.SystemException { 358 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 359 } 360 361 /** 362 * Returns all the journal article resources where groupId = ?. 363 * 364 * @param groupId the group ID 365 * @return the matching journal article resources 366 * @throws SystemException if a system exception occurred 367 */ 368 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId( 369 long groupId) 370 throws com.liferay.portal.kernel.exception.SystemException { 371 return getPersistence().findByGroupId(groupId); 372 } 373 374 /** 375 * Returns a range of all the journal article resources where groupId = ?. 376 * 377 * <p> 378 * 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. 379 * </p> 380 * 381 * @param groupId the group ID 382 * @param start the lower bound of the range of journal article resources 383 * @param end the upper bound of the range of journal article resources (not inclusive) 384 * @return the range of matching journal article resources 385 * @throws SystemException if a system exception occurred 386 */ 387 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId( 388 long groupId, int start, int end) 389 throws com.liferay.portal.kernel.exception.SystemException { 390 return getPersistence().findByGroupId(groupId, start, end); 391 } 392 393 /** 394 * Returns an ordered range of all the journal article resources where groupId = ?. 395 * 396 * <p> 397 * 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. 398 * </p> 399 * 400 * @param groupId the group ID 401 * @param start the lower bound of the range of journal article resources 402 * @param end the upper bound of the range of journal article resources (not inclusive) 403 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 404 * @return the ordered range of matching journal article resources 405 * @throws SystemException if a system exception occurred 406 */ 407 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId( 408 long groupId, int start, int end, 409 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 410 throws com.liferay.portal.kernel.exception.SystemException { 411 return getPersistence() 412 .findByGroupId(groupId, start, end, orderByComparator); 413 } 414 415 /** 416 * Returns the first journal article resource in the ordered set where groupId = ?. 417 * 418 * <p> 419 * 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. 420 * </p> 421 * 422 * @param groupId the group ID 423 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 424 * @return the first matching journal article resource 425 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found 426 * @throws SystemException if a system exception occurred 427 */ 428 public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First( 429 long groupId, 430 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 431 throws com.liferay.portal.kernel.exception.SystemException, 432 com.liferay.portlet.journal.NoSuchArticleResourceException { 433 return getPersistence().findByGroupId_First(groupId, orderByComparator); 434 } 435 436 /** 437 * Returns the last journal article resource in the ordered set where groupId = ?. 438 * 439 * <p> 440 * 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. 441 * </p> 442 * 443 * @param groupId the group ID 444 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 445 * @return the last matching journal article resource 446 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found 447 * @throws SystemException if a system exception occurred 448 */ 449 public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last( 450 long groupId, 451 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 452 throws com.liferay.portal.kernel.exception.SystemException, 453 com.liferay.portlet.journal.NoSuchArticleResourceException { 454 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 455 } 456 457 /** 458 * Returns the journal article resources before and after the current journal article resource in the ordered set where groupId = ?. 459 * 460 * <p> 461 * 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. 462 * </p> 463 * 464 * @param resourcePrimKey the primary key of the current journal article resource 465 * @param groupId the group ID 466 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 467 * @return the previous, current, and next journal article resource 468 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a journal article resource with the primary key could not be found 469 * @throws SystemException if a system exception occurred 470 */ 471 public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext( 472 long resourcePrimKey, long groupId, 473 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 474 throws com.liferay.portal.kernel.exception.SystemException, 475 com.liferay.portlet.journal.NoSuchArticleResourceException { 476 return getPersistence() 477 .findByGroupId_PrevAndNext(resourcePrimKey, groupId, 478 orderByComparator); 479 } 480 481 /** 482 * Returns the journal article resource where groupId = ? and articleId = ? or throws a {@link com.liferay.portlet.journal.NoSuchArticleResourceException} if it could not be found. 483 * 484 * @param groupId the group ID 485 * @param articleId the article ID 486 * @return the matching journal article resource 487 * @throws com.liferay.portlet.journal.NoSuchArticleResourceException if a matching journal article resource could not be found 488 * @throws SystemException if a system exception occurred 489 */ 490 public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A( 491 long groupId, java.lang.String articleId) 492 throws com.liferay.portal.kernel.exception.SystemException, 493 com.liferay.portlet.journal.NoSuchArticleResourceException { 494 return getPersistence().findByG_A(groupId, articleId); 495 } 496 497 /** 498 * Returns the journal article resource where groupId = ? and articleId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 499 * 500 * @param groupId the group ID 501 * @param articleId the article ID 502 * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found 503 * @throws SystemException if a system exception occurred 504 */ 505 public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A( 506 long groupId, java.lang.String articleId) 507 throws com.liferay.portal.kernel.exception.SystemException { 508 return getPersistence().fetchByG_A(groupId, articleId); 509 } 510 511 /** 512 * Returns the journal article resource where groupId = ? and articleId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 513 * 514 * @param groupId the group ID 515 * @param articleId the article ID 516 * @param retrieveFromCache whether to use the finder cache 517 * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found 518 * @throws SystemException if a system exception occurred 519 */ 520 public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A( 521 long groupId, java.lang.String articleId, boolean retrieveFromCache) 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache); 524 } 525 526 /** 527 * Returns all the journal article resources. 528 * 529 * @return the journal article resources 530 * @throws SystemException if a system exception occurred 531 */ 532 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll() 533 throws com.liferay.portal.kernel.exception.SystemException { 534 return getPersistence().findAll(); 535 } 536 537 /** 538 * Returns a range of all the journal article resources. 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 start the lower bound of the range of journal article resources 545 * @param end the upper bound of the range of journal article resources (not inclusive) 546 * @return the range of journal article resources 547 * @throws SystemException if a system exception occurred 548 */ 549 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll( 550 int start, int end) 551 throws com.liferay.portal.kernel.exception.SystemException { 552 return getPersistence().findAll(start, end); 553 } 554 555 /** 556 * Returns an ordered range of all the journal article resources. 557 * 558 * <p> 559 * 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. 560 * </p> 561 * 562 * @param start the lower bound of the range of journal article resources 563 * @param end the upper bound of the range of journal article resources (not inclusive) 564 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 565 * @return the ordered range of journal article resources 566 * @throws SystemException if a system exception occurred 567 */ 568 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll( 569 int start, int end, 570 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 571 throws com.liferay.portal.kernel.exception.SystemException { 572 return getPersistence().findAll(start, end, orderByComparator); 573 } 574 575 /** 576 * Removes all the journal article resources where uuid = ? from the database. 577 * 578 * @param uuid the uuid 579 * @throws SystemException if a system exception occurred 580 */ 581 public static void removeByUuid(java.lang.String uuid) 582 throws com.liferay.portal.kernel.exception.SystemException { 583 getPersistence().removeByUuid(uuid); 584 } 585 586 /** 587 * Removes the journal article resource where uuid = ? and groupId = ? from the database. 588 * 589 * @param uuid the uuid 590 * @param groupId the group ID 591 * @throws SystemException if a system exception occurred 592 */ 593 public static void removeByUUID_G(java.lang.String uuid, long groupId) 594 throws com.liferay.portal.kernel.exception.SystemException, 595 com.liferay.portlet.journal.NoSuchArticleResourceException { 596 getPersistence().removeByUUID_G(uuid, groupId); 597 } 598 599 /** 600 * Removes all the journal article resources where groupId = ? from the database. 601 * 602 * @param groupId the group ID 603 * @throws SystemException if a system exception occurred 604 */ 605 public static void removeByGroupId(long groupId) 606 throws com.liferay.portal.kernel.exception.SystemException { 607 getPersistence().removeByGroupId(groupId); 608 } 609 610 /** 611 * Removes the journal article resource where groupId = ? and articleId = ? from the database. 612 * 613 * @param groupId the group ID 614 * @param articleId the article ID 615 * @throws SystemException if a system exception occurred 616 */ 617 public static void removeByG_A(long groupId, java.lang.String articleId) 618 throws com.liferay.portal.kernel.exception.SystemException, 619 com.liferay.portlet.journal.NoSuchArticleResourceException { 620 getPersistence().removeByG_A(groupId, articleId); 621 } 622 623 /** 624 * Removes all the journal article resources from the database. 625 * 626 * @throws SystemException if a system exception occurred 627 */ 628 public static void removeAll() 629 throws com.liferay.portal.kernel.exception.SystemException { 630 getPersistence().removeAll(); 631 } 632 633 /** 634 * Returns the number of journal article resources where uuid = ?. 635 * 636 * @param uuid the uuid 637 * @return the number of matching journal article resources 638 * @throws SystemException if a system exception occurred 639 */ 640 public static int countByUuid(java.lang.String uuid) 641 throws com.liferay.portal.kernel.exception.SystemException { 642 return getPersistence().countByUuid(uuid); 643 } 644 645 /** 646 * Returns the number of journal article resources where uuid = ? and groupId = ?. 647 * 648 * @param uuid the uuid 649 * @param groupId the group ID 650 * @return the number of matching journal article resources 651 * @throws SystemException if a system exception occurred 652 */ 653 public static int countByUUID_G(java.lang.String uuid, long groupId) 654 throws com.liferay.portal.kernel.exception.SystemException { 655 return getPersistence().countByUUID_G(uuid, groupId); 656 } 657 658 /** 659 * Returns the number of journal article resources where groupId = ?. 660 * 661 * @param groupId the group ID 662 * @return the number of matching journal article resources 663 * @throws SystemException if a system exception occurred 664 */ 665 public static int countByGroupId(long groupId) 666 throws com.liferay.portal.kernel.exception.SystemException { 667 return getPersistence().countByGroupId(groupId); 668 } 669 670 /** 671 * Returns the number of journal article resources where groupId = ? and articleId = ?. 672 * 673 * @param groupId the group ID 674 * @param articleId the article ID 675 * @return the number of matching journal article resources 676 * @throws SystemException if a system exception occurred 677 */ 678 public static int countByG_A(long groupId, java.lang.String articleId) 679 throws com.liferay.portal.kernel.exception.SystemException { 680 return getPersistence().countByG_A(groupId, articleId); 681 } 682 683 /** 684 * Returns the number of journal article resources. 685 * 686 * @return the number of journal article resources 687 * @throws SystemException if a system exception occurred 688 */ 689 public static int countAll() 690 throws com.liferay.portal.kernel.exception.SystemException { 691 return getPersistence().countAll(); 692 } 693 694 public static JournalArticleResourcePersistence getPersistence() { 695 if (_persistence == null) { 696 _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName()); 697 698 ReferenceRegistry.registerReference(JournalArticleResourceUtil.class, 699 "_persistence"); 700 } 701 702 return _persistence; 703 } 704 705 public void setPersistence(JournalArticleResourcePersistence persistence) { 706 _persistence = persistence; 707 708 ReferenceRegistry.registerReference(JournalArticleResourceUtil.class, 709 "_persistence"); 710 } 711 712 private static JournalArticleResourcePersistence _persistence; 713 }