001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.RepositoryEntry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the repository entry service. This utility wraps {@link RepositoryEntryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see RepositoryEntryPersistence 036 * @see RepositoryEntryPersistenceImpl 037 * @generated 038 */ 039 public class RepositoryEntryUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(RepositoryEntry repositoryEntry) { 057 getPersistence().clearCache(repositoryEntry); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<RepositoryEntry> findWithDynamicQuery( 072 DynamicQuery dynamicQuery) throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<RepositoryEntry> findWithDynamicQuery( 080 DynamicQuery dynamicQuery, int start, int end) 081 throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<RepositoryEntry> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 098 */ 099 public static RepositoryEntry remove(RepositoryEntry repositoryEntry) 100 throws SystemException { 101 return getPersistence().remove(repositoryEntry); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 106 */ 107 public static RepositoryEntry update(RepositoryEntry repositoryEntry, 108 boolean merge) throws SystemException { 109 return getPersistence().update(repositoryEntry, merge); 110 } 111 112 /** 113 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 114 */ 115 public static RepositoryEntry update(RepositoryEntry repositoryEntry, 116 boolean merge, ServiceContext serviceContext) throws SystemException { 117 return getPersistence().update(repositoryEntry, merge, serviceContext); 118 } 119 120 /** 121 * Caches the repository entry in the entity cache if it is enabled. 122 * 123 * @param repositoryEntry the repository entry 124 */ 125 public static void cacheResult( 126 com.liferay.portal.model.RepositoryEntry repositoryEntry) { 127 getPersistence().cacheResult(repositoryEntry); 128 } 129 130 /** 131 * Caches the repository entries in the entity cache if it is enabled. 132 * 133 * @param repositoryEntries the repository entries 134 */ 135 public static void cacheResult( 136 java.util.List<com.liferay.portal.model.RepositoryEntry> repositoryEntries) { 137 getPersistence().cacheResult(repositoryEntries); 138 } 139 140 /** 141 * Creates a new repository entry with the primary key. Does not add the repository entry to the database. 142 * 143 * @param repositoryEntryId the primary key for the new repository entry 144 * @return the new repository entry 145 */ 146 public static com.liferay.portal.model.RepositoryEntry create( 147 long repositoryEntryId) { 148 return getPersistence().create(repositoryEntryId); 149 } 150 151 /** 152 * Removes the repository entry with the primary key from the database. Also notifies the appropriate model listeners. 153 * 154 * @param repositoryEntryId the primary key of the repository entry 155 * @return the repository entry that was removed 156 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a repository entry with the primary key could not be found 157 * @throws SystemException if a system exception occurred 158 */ 159 public static com.liferay.portal.model.RepositoryEntry remove( 160 long repositoryEntryId) 161 throws com.liferay.portal.NoSuchRepositoryEntryException, 162 com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().remove(repositoryEntryId); 164 } 165 166 public static com.liferay.portal.model.RepositoryEntry updateImpl( 167 com.liferay.portal.model.RepositoryEntry repositoryEntry, boolean merge) 168 throws com.liferay.portal.kernel.exception.SystemException { 169 return getPersistence().updateImpl(repositoryEntry, merge); 170 } 171 172 /** 173 * Returns the repository entry with the primary key or throws a {@link com.liferay.portal.NoSuchRepositoryEntryException} if it could not be found. 174 * 175 * @param repositoryEntryId the primary key of the repository entry 176 * @return the repository entry 177 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a repository entry with the primary key could not be found 178 * @throws SystemException if a system exception occurred 179 */ 180 public static com.liferay.portal.model.RepositoryEntry findByPrimaryKey( 181 long repositoryEntryId) 182 throws com.liferay.portal.NoSuchRepositoryEntryException, 183 com.liferay.portal.kernel.exception.SystemException { 184 return getPersistence().findByPrimaryKey(repositoryEntryId); 185 } 186 187 /** 188 * Returns the repository entry with the primary key or returns <code>null</code> if it could not be found. 189 * 190 * @param repositoryEntryId the primary key of the repository entry 191 * @return the repository entry, or <code>null</code> if a repository entry with the primary key could not be found 192 * @throws SystemException if a system exception occurred 193 */ 194 public static com.liferay.portal.model.RepositoryEntry fetchByPrimaryKey( 195 long repositoryEntryId) 196 throws com.liferay.portal.kernel.exception.SystemException { 197 return getPersistence().fetchByPrimaryKey(repositoryEntryId); 198 } 199 200 /** 201 * Returns all the repository entries where uuid = ?. 202 * 203 * @param uuid the uuid 204 * @return the matching repository entries 205 * @throws SystemException if a system exception occurred 206 */ 207 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findByUuid( 208 java.lang.String uuid) 209 throws com.liferay.portal.kernel.exception.SystemException { 210 return getPersistence().findByUuid(uuid); 211 } 212 213 /** 214 * Returns a range of all the repository entries where uuid = ?. 215 * 216 * <p> 217 * 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. 218 * </p> 219 * 220 * @param uuid the uuid 221 * @param start the lower bound of the range of repository entries 222 * @param end the upper bound of the range of repository entries (not inclusive) 223 * @return the range of matching repository entries 224 * @throws SystemException if a system exception occurred 225 */ 226 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findByUuid( 227 java.lang.String uuid, int start, int end) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return getPersistence().findByUuid(uuid, start, end); 230 } 231 232 /** 233 * Returns an ordered range of all the repository entries where uuid = ?. 234 * 235 * <p> 236 * 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. 237 * </p> 238 * 239 * @param uuid the uuid 240 * @param start the lower bound of the range of repository entries 241 * @param end the upper bound of the range of repository entries (not inclusive) 242 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 243 * @return the ordered range of matching repository entries 244 * @throws SystemException if a system exception occurred 245 */ 246 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findByUuid( 247 java.lang.String uuid, int start, int end, 248 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 249 throws com.liferay.portal.kernel.exception.SystemException { 250 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 251 } 252 253 /** 254 * Returns the first repository entry in the ordered set where uuid = ?. 255 * 256 * <p> 257 * 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. 258 * </p> 259 * 260 * @param uuid the uuid 261 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 262 * @return the first matching repository entry 263 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a matching repository entry could not be found 264 * @throws SystemException if a system exception occurred 265 */ 266 public static com.liferay.portal.model.RepositoryEntry findByUuid_First( 267 java.lang.String uuid, 268 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 269 throws com.liferay.portal.NoSuchRepositoryEntryException, 270 com.liferay.portal.kernel.exception.SystemException { 271 return getPersistence().findByUuid_First(uuid, orderByComparator); 272 } 273 274 /** 275 * Returns the last repository entry in the ordered set where uuid = ?. 276 * 277 * <p> 278 * 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. 279 * </p> 280 * 281 * @param uuid the uuid 282 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 283 * @return the last matching repository entry 284 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a matching repository entry could not be found 285 * @throws SystemException if a system exception occurred 286 */ 287 public static com.liferay.portal.model.RepositoryEntry findByUuid_Last( 288 java.lang.String uuid, 289 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 290 throws com.liferay.portal.NoSuchRepositoryEntryException, 291 com.liferay.portal.kernel.exception.SystemException { 292 return getPersistence().findByUuid_Last(uuid, orderByComparator); 293 } 294 295 /** 296 * Returns the repository entries before and after the current repository entry in the ordered set where uuid = ?. 297 * 298 * <p> 299 * 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. 300 * </p> 301 * 302 * @param repositoryEntryId the primary key of the current repository entry 303 * @param uuid the uuid 304 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 305 * @return the previous, current, and next repository entry 306 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a repository entry with the primary key could not be found 307 * @throws SystemException if a system exception occurred 308 */ 309 public static com.liferay.portal.model.RepositoryEntry[] findByUuid_PrevAndNext( 310 long repositoryEntryId, java.lang.String uuid, 311 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 312 throws com.liferay.portal.NoSuchRepositoryEntryException, 313 com.liferay.portal.kernel.exception.SystemException { 314 return getPersistence() 315 .findByUuid_PrevAndNext(repositoryEntryId, uuid, 316 orderByComparator); 317 } 318 319 /** 320 * Returns the repository entry where uuid = ? and groupId = ? or throws a {@link com.liferay.portal.NoSuchRepositoryEntryException} if it could not be found. 321 * 322 * @param uuid the uuid 323 * @param groupId the group ID 324 * @return the matching repository entry 325 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a matching repository entry could not be found 326 * @throws SystemException if a system exception occurred 327 */ 328 public static com.liferay.portal.model.RepositoryEntry findByUUID_G( 329 java.lang.String uuid, long groupId) 330 throws com.liferay.portal.NoSuchRepositoryEntryException, 331 com.liferay.portal.kernel.exception.SystemException { 332 return getPersistence().findByUUID_G(uuid, groupId); 333 } 334 335 /** 336 * Returns the repository entry where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 337 * 338 * @param uuid the uuid 339 * @param groupId the group ID 340 * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found 341 * @throws SystemException if a system exception occurred 342 */ 343 public static com.liferay.portal.model.RepositoryEntry fetchByUUID_G( 344 java.lang.String uuid, long groupId) 345 throws com.liferay.portal.kernel.exception.SystemException { 346 return getPersistence().fetchByUUID_G(uuid, groupId); 347 } 348 349 /** 350 * Returns the repository entry where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 351 * 352 * @param uuid the uuid 353 * @param groupId the group ID 354 * @param retrieveFromCache whether to use the finder cache 355 * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found 356 * @throws SystemException if a system exception occurred 357 */ 358 public static com.liferay.portal.model.RepositoryEntry fetchByUUID_G( 359 java.lang.String uuid, long groupId, boolean retrieveFromCache) 360 throws com.liferay.portal.kernel.exception.SystemException { 361 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 362 } 363 364 /** 365 * Returns all the repository entries where repositoryId = ?. 366 * 367 * @param repositoryId the repository ID 368 * @return the matching repository entries 369 * @throws SystemException if a system exception occurred 370 */ 371 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findByRepositoryId( 372 long repositoryId) 373 throws com.liferay.portal.kernel.exception.SystemException { 374 return getPersistence().findByRepositoryId(repositoryId); 375 } 376 377 /** 378 * Returns a range of all the repository entries where repositoryId = ?. 379 * 380 * <p> 381 * 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. 382 * </p> 383 * 384 * @param repositoryId the repository ID 385 * @param start the lower bound of the range of repository entries 386 * @param end the upper bound of the range of repository entries (not inclusive) 387 * @return the range of matching repository entries 388 * @throws SystemException if a system exception occurred 389 */ 390 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findByRepositoryId( 391 long repositoryId, int start, int end) 392 throws com.liferay.portal.kernel.exception.SystemException { 393 return getPersistence().findByRepositoryId(repositoryId, start, end); 394 } 395 396 /** 397 * Returns an ordered range of all the repository entries where repositoryId = ?. 398 * 399 * <p> 400 * 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. 401 * </p> 402 * 403 * @param repositoryId the repository ID 404 * @param start the lower bound of the range of repository entries 405 * @param end the upper bound of the range of repository entries (not inclusive) 406 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 407 * @return the ordered range of matching repository entries 408 * @throws SystemException if a system exception occurred 409 */ 410 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findByRepositoryId( 411 long repositoryId, int start, int end, 412 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 413 throws com.liferay.portal.kernel.exception.SystemException { 414 return getPersistence() 415 .findByRepositoryId(repositoryId, start, end, 416 orderByComparator); 417 } 418 419 /** 420 * Returns the first repository entry in the ordered set where repositoryId = ?. 421 * 422 * <p> 423 * 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. 424 * </p> 425 * 426 * @param repositoryId the repository ID 427 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 428 * @return the first matching repository entry 429 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a matching repository entry could not be found 430 * @throws SystemException if a system exception occurred 431 */ 432 public static com.liferay.portal.model.RepositoryEntry findByRepositoryId_First( 433 long repositoryId, 434 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 435 throws com.liferay.portal.NoSuchRepositoryEntryException, 436 com.liferay.portal.kernel.exception.SystemException { 437 return getPersistence() 438 .findByRepositoryId_First(repositoryId, orderByComparator); 439 } 440 441 /** 442 * Returns the last repository entry in the ordered set where repositoryId = ?. 443 * 444 * <p> 445 * 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. 446 * </p> 447 * 448 * @param repositoryId the repository ID 449 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 450 * @return the last matching repository entry 451 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a matching repository entry could not be found 452 * @throws SystemException if a system exception occurred 453 */ 454 public static com.liferay.portal.model.RepositoryEntry findByRepositoryId_Last( 455 long repositoryId, 456 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 457 throws com.liferay.portal.NoSuchRepositoryEntryException, 458 com.liferay.portal.kernel.exception.SystemException { 459 return getPersistence() 460 .findByRepositoryId_Last(repositoryId, orderByComparator); 461 } 462 463 /** 464 * Returns the repository entries before and after the current repository entry in the ordered set where repositoryId = ?. 465 * 466 * <p> 467 * 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. 468 * </p> 469 * 470 * @param repositoryEntryId the primary key of the current repository entry 471 * @param repositoryId the repository ID 472 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 473 * @return the previous, current, and next repository entry 474 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a repository entry with the primary key could not be found 475 * @throws SystemException if a system exception occurred 476 */ 477 public static com.liferay.portal.model.RepositoryEntry[] findByRepositoryId_PrevAndNext( 478 long repositoryEntryId, long repositoryId, 479 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 480 throws com.liferay.portal.NoSuchRepositoryEntryException, 481 com.liferay.portal.kernel.exception.SystemException { 482 return getPersistence() 483 .findByRepositoryId_PrevAndNext(repositoryEntryId, 484 repositoryId, orderByComparator); 485 } 486 487 /** 488 * Returns the repository entry where repositoryId = ? and mappedId = ? or throws a {@link com.liferay.portal.NoSuchRepositoryEntryException} if it could not be found. 489 * 490 * @param repositoryId the repository ID 491 * @param mappedId the mapped ID 492 * @return the matching repository entry 493 * @throws com.liferay.portal.NoSuchRepositoryEntryException if a matching repository entry could not be found 494 * @throws SystemException if a system exception occurred 495 */ 496 public static com.liferay.portal.model.RepositoryEntry findByR_M( 497 long repositoryId, java.lang.String mappedId) 498 throws com.liferay.portal.NoSuchRepositoryEntryException, 499 com.liferay.portal.kernel.exception.SystemException { 500 return getPersistence().findByR_M(repositoryId, mappedId); 501 } 502 503 /** 504 * Returns the repository entry where repositoryId = ? and mappedId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 505 * 506 * @param repositoryId the repository ID 507 * @param mappedId the mapped ID 508 * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found 509 * @throws SystemException if a system exception occurred 510 */ 511 public static com.liferay.portal.model.RepositoryEntry fetchByR_M( 512 long repositoryId, java.lang.String mappedId) 513 throws com.liferay.portal.kernel.exception.SystemException { 514 return getPersistence().fetchByR_M(repositoryId, mappedId); 515 } 516 517 /** 518 * Returns the repository entry where repositoryId = ? and mappedId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 519 * 520 * @param repositoryId the repository ID 521 * @param mappedId the mapped ID 522 * @param retrieveFromCache whether to use the finder cache 523 * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found 524 * @throws SystemException if a system exception occurred 525 */ 526 public static com.liferay.portal.model.RepositoryEntry fetchByR_M( 527 long repositoryId, java.lang.String mappedId, boolean retrieveFromCache) 528 throws com.liferay.portal.kernel.exception.SystemException { 529 return getPersistence() 530 .fetchByR_M(repositoryId, mappedId, retrieveFromCache); 531 } 532 533 /** 534 * Returns all the repository entries. 535 * 536 * @return the repository entries 537 * @throws SystemException if a system exception occurred 538 */ 539 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findAll() 540 throws com.liferay.portal.kernel.exception.SystemException { 541 return getPersistence().findAll(); 542 } 543 544 /** 545 * Returns a range of all the repository entries. 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 repository entries 552 * @param end the upper bound of the range of repository entries (not inclusive) 553 * @return the range of repository entries 554 * @throws SystemException if a system exception occurred 555 */ 556 public static java.util.List<com.liferay.portal.model.RepositoryEntry> findAll( 557 int start, int end) 558 throws com.liferay.portal.kernel.exception.SystemException { 559 return getPersistence().findAll(start, end); 560 } 561 562 /** 563 * Returns an ordered range of all the repository entries. 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 repository entries 570 * @param end the upper bound of the range of repository entries (not inclusive) 571 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 572 * @return the ordered range of repository entries 573 * @throws SystemException if a system exception occurred 574 */ 575 public static java.util.List<com.liferay.portal.model.RepositoryEntry> 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 repository entries where uuid = ? from the database. 584 * 585 * @param uuid the uuid 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 repository entry where uuid = ? and groupId = ? from the database. 595 * 596 * @param uuid the uuid 597 * @param groupId the group ID 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.NoSuchRepositoryEntryException, 602 com.liferay.portal.kernel.exception.SystemException { 603 getPersistence().removeByUUID_G(uuid, groupId); 604 } 605 606 /** 607 * Removes all the repository entries where repositoryId = ? from the database. 608 * 609 * @param repositoryId the repository ID 610 * @throws SystemException if a system exception occurred 611 */ 612 public static void removeByRepositoryId(long repositoryId) 613 throws com.liferay.portal.kernel.exception.SystemException { 614 getPersistence().removeByRepositoryId(repositoryId); 615 } 616 617 /** 618 * Removes the repository entry where repositoryId = ? and mappedId = ? from the database. 619 * 620 * @param repositoryId the repository ID 621 * @param mappedId the mapped ID 622 * @throws SystemException if a system exception occurred 623 */ 624 public static void removeByR_M(long repositoryId, java.lang.String mappedId) 625 throws com.liferay.portal.NoSuchRepositoryEntryException, 626 com.liferay.portal.kernel.exception.SystemException { 627 getPersistence().removeByR_M(repositoryId, mappedId); 628 } 629 630 /** 631 * Removes all the repository entries 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 * Returns the number of repository entries where uuid = ?. 642 * 643 * @param uuid the uuid 644 * @return the number of matching repository entries 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 * Returns the number of repository entries where uuid = ? and groupId = ?. 654 * 655 * @param uuid the uuid 656 * @param groupId the group ID 657 * @return the number of matching repository entries 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 * Returns the number of repository entries where repositoryId = ?. 667 * 668 * @param repositoryId the repository ID 669 * @return the number of matching repository entries 670 * @throws SystemException if a system exception occurred 671 */ 672 public static int countByRepositoryId(long repositoryId) 673 throws com.liferay.portal.kernel.exception.SystemException { 674 return getPersistence().countByRepositoryId(repositoryId); 675 } 676 677 /** 678 * Returns the number of repository entries where repositoryId = ? and mappedId = ?. 679 * 680 * @param repositoryId the repository ID 681 * @param mappedId the mapped ID 682 * @return the number of matching repository entries 683 * @throws SystemException if a system exception occurred 684 */ 685 public static int countByR_M(long repositoryId, java.lang.String mappedId) 686 throws com.liferay.portal.kernel.exception.SystemException { 687 return getPersistence().countByR_M(repositoryId, mappedId); 688 } 689 690 /** 691 * Returns the number of repository entries. 692 * 693 * @return the number of repository entries 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 RepositoryEntryPersistence getPersistence() { 702 if (_persistence == null) { 703 _persistence = (RepositoryEntryPersistence)PortalBeanLocatorUtil.locate(RepositoryEntryPersistence.class.getName()); 704 705 ReferenceRegistry.registerReference(RepositoryEntryUtil.class, 706 "_persistence"); 707 } 708 709 return _persistence; 710 } 711 712 public void setPersistence(RepositoryEntryPersistence persistence) { 713 _persistence = persistence; 714 715 ReferenceRegistry.registerReference(RepositoryEntryUtil.class, 716 "_persistence"); 717 } 718 719 private static RepositoryEntryPersistence _persistence; 720 }