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