001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.Repository; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the repository service. This utility wraps {@link RepositoryPersistenceImpl} 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 RepositoryPersistence 036 * @see RepositoryPersistenceImpl 037 * @generated 038 */ 039 public class RepositoryUtil { 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(Repository repository) { 057 getPersistence().clearCache(repository); 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<Repository> 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<Repository> 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<Repository> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 098 */ 099 public static Repository update(Repository repository, boolean merge) 100 throws SystemException { 101 return getPersistence().update(repository, merge); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 106 */ 107 public static Repository update(Repository repository, boolean merge, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(repository, merge, serviceContext); 110 } 111 112 /** 113 * Caches the repository in the entity cache if it is enabled. 114 * 115 * @param repository the repository 116 */ 117 public static void cacheResult( 118 com.liferay.portal.model.Repository repository) { 119 getPersistence().cacheResult(repository); 120 } 121 122 /** 123 * Caches the repositories in the entity cache if it is enabled. 124 * 125 * @param repositories the repositories 126 */ 127 public static void cacheResult( 128 java.util.List<com.liferay.portal.model.Repository> repositories) { 129 getPersistence().cacheResult(repositories); 130 } 131 132 /** 133 * Creates a new repository with the primary key. Does not add the repository to the database. 134 * 135 * @param repositoryId the primary key for the new repository 136 * @return the new repository 137 */ 138 public static com.liferay.portal.model.Repository create(long repositoryId) { 139 return getPersistence().create(repositoryId); 140 } 141 142 /** 143 * Removes the repository with the primary key from the database. Also notifies the appropriate model listeners. 144 * 145 * @param repositoryId the primary key of the repository 146 * @return the repository that was removed 147 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 148 * @throws SystemException if a system exception occurred 149 */ 150 public static com.liferay.portal.model.Repository remove(long repositoryId) 151 throws com.liferay.portal.NoSuchRepositoryException, 152 com.liferay.portal.kernel.exception.SystemException { 153 return getPersistence().remove(repositoryId); 154 } 155 156 public static com.liferay.portal.model.Repository updateImpl( 157 com.liferay.portal.model.Repository repository, boolean merge) 158 throws com.liferay.portal.kernel.exception.SystemException { 159 return getPersistence().updateImpl(repository, merge); 160 } 161 162 /** 163 * Returns the repository with the primary key or throws a {@link com.liferay.portal.NoSuchRepositoryException} if it could not be found. 164 * 165 * @param repositoryId the primary key of the repository 166 * @return the repository 167 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 168 * @throws SystemException if a system exception occurred 169 */ 170 public static com.liferay.portal.model.Repository findByPrimaryKey( 171 long repositoryId) 172 throws com.liferay.portal.NoSuchRepositoryException, 173 com.liferay.portal.kernel.exception.SystemException { 174 return getPersistence().findByPrimaryKey(repositoryId); 175 } 176 177 /** 178 * Returns the repository with the primary key or returns <code>null</code> if it could not be found. 179 * 180 * @param repositoryId the primary key of the repository 181 * @return the repository, or <code>null</code> if a repository with the primary key could not be found 182 * @throws SystemException if a system exception occurred 183 */ 184 public static com.liferay.portal.model.Repository fetchByPrimaryKey( 185 long repositoryId) 186 throws com.liferay.portal.kernel.exception.SystemException { 187 return getPersistence().fetchByPrimaryKey(repositoryId); 188 } 189 190 /** 191 * Returns all the repositories where uuid = ?. 192 * 193 * @param uuid the uuid 194 * @return the matching repositories 195 * @throws SystemException if a system exception occurred 196 */ 197 public static java.util.List<com.liferay.portal.model.Repository> findByUuid( 198 java.lang.String uuid) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return getPersistence().findByUuid(uuid); 201 } 202 203 /** 204 * Returns a range of all the repositories where uuid = ?. 205 * 206 * <p> 207 * 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. 208 * </p> 209 * 210 * @param uuid the uuid 211 * @param start the lower bound of the range of repositories 212 * @param end the upper bound of the range of repositories (not inclusive) 213 * @return the range of matching repositories 214 * @throws SystemException if a system exception occurred 215 */ 216 public static java.util.List<com.liferay.portal.model.Repository> findByUuid( 217 java.lang.String uuid, int start, int end) 218 throws com.liferay.portal.kernel.exception.SystemException { 219 return getPersistence().findByUuid(uuid, start, end); 220 } 221 222 /** 223 * Returns an ordered range of all the repositories where uuid = ?. 224 * 225 * <p> 226 * 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. 227 * </p> 228 * 229 * @param uuid the uuid 230 * @param start the lower bound of the range of repositories 231 * @param end the upper bound of the range of repositories (not inclusive) 232 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 233 * @return the ordered range of matching repositories 234 * @throws SystemException if a system exception occurred 235 */ 236 public static java.util.List<com.liferay.portal.model.Repository> findByUuid( 237 java.lang.String uuid, int start, int end, 238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 239 throws com.liferay.portal.kernel.exception.SystemException { 240 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 241 } 242 243 /** 244 * Returns the first repository in the ordered set where uuid = ?. 245 * 246 * @param uuid the uuid 247 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 248 * @return the first matching repository 249 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 250 * @throws SystemException if a system exception occurred 251 */ 252 public static com.liferay.portal.model.Repository findByUuid_First( 253 java.lang.String uuid, 254 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 255 throws com.liferay.portal.NoSuchRepositoryException, 256 com.liferay.portal.kernel.exception.SystemException { 257 return getPersistence().findByUuid_First(uuid, orderByComparator); 258 } 259 260 /** 261 * Returns the first repository in the ordered set where uuid = ?. 262 * 263 * @param uuid the uuid 264 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 265 * @return the first matching repository, or <code>null</code> if a matching repository could not be found 266 * @throws SystemException if a system exception occurred 267 */ 268 public static com.liferay.portal.model.Repository fetchByUuid_First( 269 java.lang.String uuid, 270 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 271 throws com.liferay.portal.kernel.exception.SystemException { 272 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 273 } 274 275 /** 276 * Returns the last repository in the ordered set where uuid = ?. 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 repository 281 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 282 * @throws SystemException if a system exception occurred 283 */ 284 public static com.liferay.portal.model.Repository findByUuid_Last( 285 java.lang.String uuid, 286 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 287 throws com.liferay.portal.NoSuchRepositoryException, 288 com.liferay.portal.kernel.exception.SystemException { 289 return getPersistence().findByUuid_Last(uuid, orderByComparator); 290 } 291 292 /** 293 * Returns the last repository in the ordered set where uuid = ?. 294 * 295 * @param uuid the uuid 296 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 297 * @return the last matching repository, or <code>null</code> if a matching repository could not be found 298 * @throws SystemException if a system exception occurred 299 */ 300 public static com.liferay.portal.model.Repository fetchByUuid_Last( 301 java.lang.String uuid, 302 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 303 throws com.liferay.portal.kernel.exception.SystemException { 304 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 305 } 306 307 /** 308 * Returns the repositories before and after the current repository in the ordered set where uuid = ?. 309 * 310 * @param repositoryId the primary key of the current repository 311 * @param uuid the uuid 312 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 313 * @return the previous, current, and next repository 314 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 315 * @throws SystemException if a system exception occurred 316 */ 317 public static com.liferay.portal.model.Repository[] findByUuid_PrevAndNext( 318 long repositoryId, java.lang.String uuid, 319 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 320 throws com.liferay.portal.NoSuchRepositoryException, 321 com.liferay.portal.kernel.exception.SystemException { 322 return getPersistence() 323 .findByUuid_PrevAndNext(repositoryId, uuid, orderByComparator); 324 } 325 326 /** 327 * Returns the repository where uuid = ? and groupId = ? or throws a {@link com.liferay.portal.NoSuchRepositoryException} if it could not be found. 328 * 329 * @param uuid the uuid 330 * @param groupId the group ID 331 * @return the matching repository 332 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 333 * @throws SystemException if a system exception occurred 334 */ 335 public static com.liferay.portal.model.Repository findByUUID_G( 336 java.lang.String uuid, long groupId) 337 throws com.liferay.portal.NoSuchRepositoryException, 338 com.liferay.portal.kernel.exception.SystemException { 339 return getPersistence().findByUUID_G(uuid, groupId); 340 } 341 342 /** 343 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 344 * 345 * @param uuid the uuid 346 * @param groupId the group ID 347 * @return the matching repository, or <code>null</code> if a matching repository could not be found 348 * @throws SystemException if a system exception occurred 349 */ 350 public static com.liferay.portal.model.Repository fetchByUUID_G( 351 java.lang.String uuid, long groupId) 352 throws com.liferay.portal.kernel.exception.SystemException { 353 return getPersistence().fetchByUUID_G(uuid, groupId); 354 } 355 356 /** 357 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 358 * 359 * @param uuid the uuid 360 * @param groupId the group ID 361 * @param retrieveFromCache whether to use the finder cache 362 * @return the matching repository, or <code>null</code> if a matching repository could not be found 363 * @throws SystemException if a system exception occurred 364 */ 365 public static com.liferay.portal.model.Repository fetchByUUID_G( 366 java.lang.String uuid, long groupId, boolean retrieveFromCache) 367 throws com.liferay.portal.kernel.exception.SystemException { 368 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 369 } 370 371 /** 372 * Returns all the repositories where groupId = ?. 373 * 374 * @param groupId the group ID 375 * @return the matching repositories 376 * @throws SystemException if a system exception occurred 377 */ 378 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 379 long groupId) 380 throws com.liferay.portal.kernel.exception.SystemException { 381 return getPersistence().findByGroupId(groupId); 382 } 383 384 /** 385 * Returns a range of all the repositories where groupId = ?. 386 * 387 * <p> 388 * 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. 389 * </p> 390 * 391 * @param groupId the group ID 392 * @param start the lower bound of the range of repositories 393 * @param end the upper bound of the range of repositories (not inclusive) 394 * @return the range of matching repositories 395 * @throws SystemException if a system exception occurred 396 */ 397 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 398 long groupId, int start, int end) 399 throws com.liferay.portal.kernel.exception.SystemException { 400 return getPersistence().findByGroupId(groupId, start, end); 401 } 402 403 /** 404 * Returns an ordered range of all the repositories where groupId = ?. 405 * 406 * <p> 407 * 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. 408 * </p> 409 * 410 * @param groupId the group ID 411 * @param start the lower bound of the range of repositories 412 * @param end the upper bound of the range of repositories (not inclusive) 413 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 414 * @return the ordered range of matching repositories 415 * @throws SystemException if a system exception occurred 416 */ 417 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 418 long groupId, int start, int end, 419 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 420 throws com.liferay.portal.kernel.exception.SystemException { 421 return getPersistence() 422 .findByGroupId(groupId, start, end, orderByComparator); 423 } 424 425 /** 426 * Returns the first repository in the ordered set where groupId = ?. 427 * 428 * @param groupId the group ID 429 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 430 * @return the first matching repository 431 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 432 * @throws SystemException if a system exception occurred 433 */ 434 public static com.liferay.portal.model.Repository findByGroupId_First( 435 long groupId, 436 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 437 throws com.liferay.portal.NoSuchRepositoryException, 438 com.liferay.portal.kernel.exception.SystemException { 439 return getPersistence().findByGroupId_First(groupId, orderByComparator); 440 } 441 442 /** 443 * Returns the first repository in the ordered set where groupId = ?. 444 * 445 * @param groupId the group ID 446 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 447 * @return the first matching repository, or <code>null</code> if a matching repository could not be found 448 * @throws SystemException if a system exception occurred 449 */ 450 public static com.liferay.portal.model.Repository fetchByGroupId_First( 451 long groupId, 452 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 453 throws com.liferay.portal.kernel.exception.SystemException { 454 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 455 } 456 457 /** 458 * Returns the last repository in the ordered set where groupId = ?. 459 * 460 * @param groupId the group ID 461 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 462 * @return the last matching repository 463 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 464 * @throws SystemException if a system exception occurred 465 */ 466 public static com.liferay.portal.model.Repository findByGroupId_Last( 467 long groupId, 468 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 469 throws com.liferay.portal.NoSuchRepositoryException, 470 com.liferay.portal.kernel.exception.SystemException { 471 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 472 } 473 474 /** 475 * Returns the last repository in the ordered set where groupId = ?. 476 * 477 * @param groupId the group ID 478 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 479 * @return the last matching repository, or <code>null</code> if a matching repository could not be found 480 * @throws SystemException if a system exception occurred 481 */ 482 public static com.liferay.portal.model.Repository fetchByGroupId_Last( 483 long groupId, 484 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 485 throws com.liferay.portal.kernel.exception.SystemException { 486 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 487 } 488 489 /** 490 * Returns the repositories before and after the current repository in the ordered set where groupId = ?. 491 * 492 * @param repositoryId the primary key of the current repository 493 * @param groupId the group ID 494 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 495 * @return the previous, current, and next repository 496 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 497 * @throws SystemException if a system exception occurred 498 */ 499 public static com.liferay.portal.model.Repository[] findByGroupId_PrevAndNext( 500 long repositoryId, long groupId, 501 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 502 throws com.liferay.portal.NoSuchRepositoryException, 503 com.liferay.portal.kernel.exception.SystemException { 504 return getPersistence() 505 .findByGroupId_PrevAndNext(repositoryId, groupId, 506 orderByComparator); 507 } 508 509 /** 510 * Returns all the repositories. 511 * 512 * @return the repositories 513 * @throws SystemException if a system exception occurred 514 */ 515 public static java.util.List<com.liferay.portal.model.Repository> findAll() 516 throws com.liferay.portal.kernel.exception.SystemException { 517 return getPersistence().findAll(); 518 } 519 520 /** 521 * Returns a range of all the repositories. 522 * 523 * <p> 524 * 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. 525 * </p> 526 * 527 * @param start the lower bound of the range of repositories 528 * @param end the upper bound of the range of repositories (not inclusive) 529 * @return the range of repositories 530 * @throws SystemException if a system exception occurred 531 */ 532 public static java.util.List<com.liferay.portal.model.Repository> findAll( 533 int start, int end) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence().findAll(start, end); 536 } 537 538 /** 539 * Returns an ordered range of all the repositories. 540 * 541 * <p> 542 * 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. 543 * </p> 544 * 545 * @param start the lower bound of the range of repositories 546 * @param end the upper bound of the range of repositories (not inclusive) 547 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 548 * @return the ordered range of repositories 549 * @throws SystemException if a system exception occurred 550 */ 551 public static java.util.List<com.liferay.portal.model.Repository> findAll( 552 int start, int end, 553 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 554 throws com.liferay.portal.kernel.exception.SystemException { 555 return getPersistence().findAll(start, end, orderByComparator); 556 } 557 558 /** 559 * Removes all the repositories where uuid = ? from the database. 560 * 561 * @param uuid the uuid 562 * @throws SystemException if a system exception occurred 563 */ 564 public static void removeByUuid(java.lang.String uuid) 565 throws com.liferay.portal.kernel.exception.SystemException { 566 getPersistence().removeByUuid(uuid); 567 } 568 569 /** 570 * Removes the repository where uuid = ? and groupId = ? from the database. 571 * 572 * @param uuid the uuid 573 * @param groupId the group ID 574 * @return the repository that was removed 575 * @throws SystemException if a system exception occurred 576 */ 577 public static com.liferay.portal.model.Repository removeByUUID_G( 578 java.lang.String uuid, long groupId) 579 throws com.liferay.portal.NoSuchRepositoryException, 580 com.liferay.portal.kernel.exception.SystemException { 581 return getPersistence().removeByUUID_G(uuid, groupId); 582 } 583 584 /** 585 * Removes all the repositories where groupId = ? from the database. 586 * 587 * @param groupId the group ID 588 * @throws SystemException if a system exception occurred 589 */ 590 public static void removeByGroupId(long groupId) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 getPersistence().removeByGroupId(groupId); 593 } 594 595 /** 596 * Removes all the repositories from the database. 597 * 598 * @throws SystemException if a system exception occurred 599 */ 600 public static void removeAll() 601 throws com.liferay.portal.kernel.exception.SystemException { 602 getPersistence().removeAll(); 603 } 604 605 /** 606 * Returns the number of repositories where uuid = ?. 607 * 608 * @param uuid the uuid 609 * @return the number of matching repositories 610 * @throws SystemException if a system exception occurred 611 */ 612 public static int countByUuid(java.lang.String uuid) 613 throws com.liferay.portal.kernel.exception.SystemException { 614 return getPersistence().countByUuid(uuid); 615 } 616 617 /** 618 * Returns the number of repositories where uuid = ? and groupId = ?. 619 * 620 * @param uuid the uuid 621 * @param groupId the group ID 622 * @return the number of matching repositories 623 * @throws SystemException if a system exception occurred 624 */ 625 public static int countByUUID_G(java.lang.String uuid, long groupId) 626 throws com.liferay.portal.kernel.exception.SystemException { 627 return getPersistence().countByUUID_G(uuid, groupId); 628 } 629 630 /** 631 * Returns the number of repositories where groupId = ?. 632 * 633 * @param groupId the group ID 634 * @return the number of matching repositories 635 * @throws SystemException if a system exception occurred 636 */ 637 public static int countByGroupId(long groupId) 638 throws com.liferay.portal.kernel.exception.SystemException { 639 return getPersistence().countByGroupId(groupId); 640 } 641 642 /** 643 * Returns the number of repositories. 644 * 645 * @return the number of repositories 646 * @throws SystemException if a system exception occurred 647 */ 648 public static int countAll() 649 throws com.liferay.portal.kernel.exception.SystemException { 650 return getPersistence().countAll(); 651 } 652 653 public static RepositoryPersistence getPersistence() { 654 if (_persistence == null) { 655 _persistence = (RepositoryPersistence)PortalBeanLocatorUtil.locate(RepositoryPersistence.class.getName()); 656 657 ReferenceRegistry.registerReference(RepositoryUtil.class, 658 "_persistence"); 659 } 660 661 return _persistence; 662 } 663 664 /** 665 * @deprecated 666 */ 667 public void setPersistence(RepositoryPersistence persistence) { 668 } 669 670 private static RepositoryPersistence _persistence; 671 }