001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.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 * <p> 247 * 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. 248 * </p> 249 * 250 * @param uuid the uuid 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the first matching repository 253 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 254 * @throws SystemException if a system exception occurred 255 */ 256 public static com.liferay.portal.model.Repository findByUuid_First( 257 java.lang.String uuid, 258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 259 throws com.liferay.portal.NoSuchRepositoryException, 260 com.liferay.portal.kernel.exception.SystemException { 261 return getPersistence().findByUuid_First(uuid, orderByComparator); 262 } 263 264 /** 265 * Returns the last repository in the ordered set where uuid = ?. 266 * 267 * <p> 268 * 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. 269 * </p> 270 * 271 * @param uuid the uuid 272 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 273 * @return the last matching repository 274 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 275 * @throws SystemException if a system exception occurred 276 */ 277 public static com.liferay.portal.model.Repository findByUuid_Last( 278 java.lang.String uuid, 279 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 280 throws com.liferay.portal.NoSuchRepositoryException, 281 com.liferay.portal.kernel.exception.SystemException { 282 return getPersistence().findByUuid_Last(uuid, orderByComparator); 283 } 284 285 /** 286 * Returns the repositories before and after the current repository in the ordered set where uuid = ?. 287 * 288 * <p> 289 * 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. 290 * </p> 291 * 292 * @param repositoryId the primary key of the current repository 293 * @param uuid the uuid 294 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 295 * @return the previous, current, and next repository 296 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 297 * @throws SystemException if a system exception occurred 298 */ 299 public static com.liferay.portal.model.Repository[] findByUuid_PrevAndNext( 300 long repositoryId, java.lang.String uuid, 301 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 302 throws com.liferay.portal.NoSuchRepositoryException, 303 com.liferay.portal.kernel.exception.SystemException { 304 return getPersistence() 305 .findByUuid_PrevAndNext(repositoryId, uuid, orderByComparator); 306 } 307 308 /** 309 * Returns the repository where uuid = ? and groupId = ? or throws a {@link com.liferay.portal.NoSuchRepositoryException} if it could not be found. 310 * 311 * @param uuid the uuid 312 * @param groupId the group ID 313 * @return the matching repository 314 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 315 * @throws SystemException if a system exception occurred 316 */ 317 public static com.liferay.portal.model.Repository findByUUID_G( 318 java.lang.String uuid, long groupId) 319 throws com.liferay.portal.NoSuchRepositoryException, 320 com.liferay.portal.kernel.exception.SystemException { 321 return getPersistence().findByUUID_G(uuid, groupId); 322 } 323 324 /** 325 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 326 * 327 * @param uuid the uuid 328 * @param groupId the group ID 329 * @return the matching repository, or <code>null</code> if a matching repository could not be found 330 * @throws SystemException if a system exception occurred 331 */ 332 public static com.liferay.portal.model.Repository fetchByUUID_G( 333 java.lang.String uuid, long groupId) 334 throws com.liferay.portal.kernel.exception.SystemException { 335 return getPersistence().fetchByUUID_G(uuid, groupId); 336 } 337 338 /** 339 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 340 * 341 * @param uuid the uuid 342 * @param groupId the group ID 343 * @param retrieveFromCache whether to use the finder cache 344 * @return the matching repository, or <code>null</code> if a matching repository could not be found 345 * @throws SystemException if a system exception occurred 346 */ 347 public static com.liferay.portal.model.Repository fetchByUUID_G( 348 java.lang.String uuid, long groupId, boolean retrieveFromCache) 349 throws com.liferay.portal.kernel.exception.SystemException { 350 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 351 } 352 353 /** 354 * Returns all the repositories where groupId = ?. 355 * 356 * @param groupId the group ID 357 * @return the matching repositories 358 * @throws SystemException if a system exception occurred 359 */ 360 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 361 long groupId) 362 throws com.liferay.portal.kernel.exception.SystemException { 363 return getPersistence().findByGroupId(groupId); 364 } 365 366 /** 367 * Returns a range of all the repositories where groupId = ?. 368 * 369 * <p> 370 * 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. 371 * </p> 372 * 373 * @param groupId the group ID 374 * @param start the lower bound of the range of repositories 375 * @param end the upper bound of the range of repositories (not inclusive) 376 * @return the range of matching repositories 377 * @throws SystemException if a system exception occurred 378 */ 379 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 380 long groupId, int start, int end) 381 throws com.liferay.portal.kernel.exception.SystemException { 382 return getPersistence().findByGroupId(groupId, start, end); 383 } 384 385 /** 386 * Returns an ordered range of all the repositories where groupId = ?. 387 * 388 * <p> 389 * 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. 390 * </p> 391 * 392 * @param groupId the group ID 393 * @param start the lower bound of the range of repositories 394 * @param end the upper bound of the range of repositories (not inclusive) 395 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 396 * @return the ordered range of matching repositories 397 * @throws SystemException if a system exception occurred 398 */ 399 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 400 long groupId, int start, int end, 401 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 402 throws com.liferay.portal.kernel.exception.SystemException { 403 return getPersistence() 404 .findByGroupId(groupId, start, end, orderByComparator); 405 } 406 407 /** 408 * Returns the first repository in the ordered set where groupId = ?. 409 * 410 * <p> 411 * 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. 412 * </p> 413 * 414 * @param groupId the group ID 415 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 416 * @return the first matching repository 417 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 418 * @throws SystemException if a system exception occurred 419 */ 420 public static com.liferay.portal.model.Repository findByGroupId_First( 421 long groupId, 422 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 423 throws com.liferay.portal.NoSuchRepositoryException, 424 com.liferay.portal.kernel.exception.SystemException { 425 return getPersistence().findByGroupId_First(groupId, orderByComparator); 426 } 427 428 /** 429 * Returns the last repository in the ordered set where groupId = ?. 430 * 431 * <p> 432 * 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. 433 * </p> 434 * 435 * @param groupId the group ID 436 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 437 * @return the last matching repository 438 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portal.model.Repository findByGroupId_Last( 442 long groupId, 443 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 444 throws com.liferay.portal.NoSuchRepositoryException, 445 com.liferay.portal.kernel.exception.SystemException { 446 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 447 } 448 449 /** 450 * Returns the repositories before and after the current repository in the ordered set where groupId = ?. 451 * 452 * <p> 453 * 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. 454 * </p> 455 * 456 * @param repositoryId the primary key of the current repository 457 * @param groupId the group ID 458 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 459 * @return the previous, current, and next repository 460 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 461 * @throws SystemException if a system exception occurred 462 */ 463 public static com.liferay.portal.model.Repository[] findByGroupId_PrevAndNext( 464 long repositoryId, long groupId, 465 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 466 throws com.liferay.portal.NoSuchRepositoryException, 467 com.liferay.portal.kernel.exception.SystemException { 468 return getPersistence() 469 .findByGroupId_PrevAndNext(repositoryId, groupId, 470 orderByComparator); 471 } 472 473 /** 474 * Returns all the repositories. 475 * 476 * @return the repositories 477 * @throws SystemException if a system exception occurred 478 */ 479 public static java.util.List<com.liferay.portal.model.Repository> findAll() 480 throws com.liferay.portal.kernel.exception.SystemException { 481 return getPersistence().findAll(); 482 } 483 484 /** 485 * Returns a range of all the repositories. 486 * 487 * <p> 488 * 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. 489 * </p> 490 * 491 * @param start the lower bound of the range of repositories 492 * @param end the upper bound of the range of repositories (not inclusive) 493 * @return the range of repositories 494 * @throws SystemException if a system exception occurred 495 */ 496 public static java.util.List<com.liferay.portal.model.Repository> findAll( 497 int start, int end) 498 throws com.liferay.portal.kernel.exception.SystemException { 499 return getPersistence().findAll(start, end); 500 } 501 502 /** 503 * Returns an ordered range of all the repositories. 504 * 505 * <p> 506 * 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. 507 * </p> 508 * 509 * @param start the lower bound of the range of repositories 510 * @param end the upper bound of the range of repositories (not inclusive) 511 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 512 * @return the ordered range of repositories 513 * @throws SystemException if a system exception occurred 514 */ 515 public static java.util.List<com.liferay.portal.model.Repository> findAll( 516 int start, int end, 517 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 518 throws com.liferay.portal.kernel.exception.SystemException { 519 return getPersistence().findAll(start, end, orderByComparator); 520 } 521 522 /** 523 * Removes all the repositories where uuid = ? from the database. 524 * 525 * @param uuid the uuid 526 * @throws SystemException if a system exception occurred 527 */ 528 public static void removeByUuid(java.lang.String uuid) 529 throws com.liferay.portal.kernel.exception.SystemException { 530 getPersistence().removeByUuid(uuid); 531 } 532 533 /** 534 * Removes the repository where uuid = ? and groupId = ? from the database. 535 * 536 * @param uuid the uuid 537 * @param groupId the group ID 538 * @throws SystemException if a system exception occurred 539 */ 540 public static void removeByUUID_G(java.lang.String uuid, long groupId) 541 throws com.liferay.portal.NoSuchRepositoryException, 542 com.liferay.portal.kernel.exception.SystemException { 543 getPersistence().removeByUUID_G(uuid, groupId); 544 } 545 546 /** 547 * Removes all the repositories where groupId = ? from the database. 548 * 549 * @param groupId the group ID 550 * @throws SystemException if a system exception occurred 551 */ 552 public static void removeByGroupId(long groupId) 553 throws com.liferay.portal.kernel.exception.SystemException { 554 getPersistence().removeByGroupId(groupId); 555 } 556 557 /** 558 * Removes all the repositories from the database. 559 * 560 * @throws SystemException if a system exception occurred 561 */ 562 public static void removeAll() 563 throws com.liferay.portal.kernel.exception.SystemException { 564 getPersistence().removeAll(); 565 } 566 567 /** 568 * Returns the number of repositories where uuid = ?. 569 * 570 * @param uuid the uuid 571 * @return the number of matching repositories 572 * @throws SystemException if a system exception occurred 573 */ 574 public static int countByUuid(java.lang.String uuid) 575 throws com.liferay.portal.kernel.exception.SystemException { 576 return getPersistence().countByUuid(uuid); 577 } 578 579 /** 580 * Returns the number of repositories where uuid = ? and groupId = ?. 581 * 582 * @param uuid the uuid 583 * @param groupId the group ID 584 * @return the number of matching repositories 585 * @throws SystemException if a system exception occurred 586 */ 587 public static int countByUUID_G(java.lang.String uuid, long groupId) 588 throws com.liferay.portal.kernel.exception.SystemException { 589 return getPersistence().countByUUID_G(uuid, groupId); 590 } 591 592 /** 593 * Returns the number of repositories where groupId = ?. 594 * 595 * @param groupId the group ID 596 * @return the number of matching repositories 597 * @throws SystemException if a system exception occurred 598 */ 599 public static int countByGroupId(long groupId) 600 throws com.liferay.portal.kernel.exception.SystemException { 601 return getPersistence().countByGroupId(groupId); 602 } 603 604 /** 605 * Returns the number of repositories. 606 * 607 * @return the number of repositories 608 * @throws SystemException if a system exception occurred 609 */ 610 public static int countAll() 611 throws com.liferay.portal.kernel.exception.SystemException { 612 return getPersistence().countAll(); 613 } 614 615 public static RepositoryPersistence getPersistence() { 616 if (_persistence == null) { 617 _persistence = (RepositoryPersistence)PortalBeanLocatorUtil.locate(RepositoryPersistence.class.getName()); 618 619 ReferenceRegistry.registerReference(RepositoryUtil.class, 620 "_persistence"); 621 } 622 623 return _persistence; 624 } 625 626 public void setPersistence(RepositoryPersistence persistence) { 627 _persistence = persistence; 628 629 ReferenceRegistry.registerReference(RepositoryUtil.class, "_persistence"); 630 } 631 632 private static RepositoryPersistence _persistence; 633 }