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 static 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) 098 */ 099 public static Repository update(Repository repository) 100 throws SystemException { 101 return getPersistence().update(repository); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static Repository update(Repository repository, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(repository, serviceContext); 110 } 111 112 /** 113 * Returns all the repositories where uuid = ?. 114 * 115 * @param uuid the uuid 116 * @return the matching repositories 117 * @throws SystemException if a system exception occurred 118 */ 119 public static java.util.List<com.liferay.portal.model.Repository> findByUuid( 120 java.lang.String uuid) 121 throws com.liferay.portal.kernel.exception.SystemException { 122 return getPersistence().findByUuid(uuid); 123 } 124 125 /** 126 * Returns a range of all the repositories where uuid = ?. 127 * 128 * <p> 129 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 130 * </p> 131 * 132 * @param uuid the uuid 133 * @param start the lower bound of the range of repositories 134 * @param end the upper bound of the range of repositories (not inclusive) 135 * @return the range of matching repositories 136 * @throws SystemException if a system exception occurred 137 */ 138 public static java.util.List<com.liferay.portal.model.Repository> findByUuid( 139 java.lang.String uuid, int start, int end) 140 throws com.liferay.portal.kernel.exception.SystemException { 141 return getPersistence().findByUuid(uuid, start, end); 142 } 143 144 /** 145 * Returns an ordered range of all the repositories where uuid = ?. 146 * 147 * <p> 148 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 149 * </p> 150 * 151 * @param uuid the uuid 152 * @param start the lower bound of the range of repositories 153 * @param end the upper bound of the range of repositories (not inclusive) 154 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 155 * @return the ordered range of matching repositories 156 * @throws SystemException if a system exception occurred 157 */ 158 public static java.util.List<com.liferay.portal.model.Repository> findByUuid( 159 java.lang.String uuid, int start, int end, 160 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 163 } 164 165 /** 166 * Returns the first repository in the ordered set where uuid = ?. 167 * 168 * @param uuid the uuid 169 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 170 * @return the first matching repository 171 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portal.model.Repository findByUuid_First( 175 java.lang.String uuid, 176 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 177 throws com.liferay.portal.NoSuchRepositoryException, 178 com.liferay.portal.kernel.exception.SystemException { 179 return getPersistence().findByUuid_First(uuid, orderByComparator); 180 } 181 182 /** 183 * Returns the first repository in the ordered set where uuid = ?. 184 * 185 * @param uuid the uuid 186 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 187 * @return the first matching repository, or <code>null</code> if a matching repository could not be found 188 * @throws SystemException if a system exception occurred 189 */ 190 public static com.liferay.portal.model.Repository fetchByUuid_First( 191 java.lang.String uuid, 192 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 193 throws com.liferay.portal.kernel.exception.SystemException { 194 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 195 } 196 197 /** 198 * Returns the last repository in the ordered set where uuid = ?. 199 * 200 * @param uuid the uuid 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the last matching repository 203 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 204 * @throws SystemException if a system exception occurred 205 */ 206 public static com.liferay.portal.model.Repository findByUuid_Last( 207 java.lang.String uuid, 208 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 209 throws com.liferay.portal.NoSuchRepositoryException, 210 com.liferay.portal.kernel.exception.SystemException { 211 return getPersistence().findByUuid_Last(uuid, orderByComparator); 212 } 213 214 /** 215 * Returns the last repository in the ordered set where uuid = ?. 216 * 217 * @param uuid the uuid 218 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 219 * @return the last matching repository, or <code>null</code> if a matching repository could not be found 220 * @throws SystemException if a system exception occurred 221 */ 222 public static com.liferay.portal.model.Repository fetchByUuid_Last( 223 java.lang.String uuid, 224 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 225 throws com.liferay.portal.kernel.exception.SystemException { 226 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 227 } 228 229 /** 230 * Returns the repositories before and after the current repository in the ordered set where uuid = ?. 231 * 232 * @param repositoryId the primary key of the current repository 233 * @param uuid the uuid 234 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 235 * @return the previous, current, and next repository 236 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 237 * @throws SystemException if a system exception occurred 238 */ 239 public static com.liferay.portal.model.Repository[] findByUuid_PrevAndNext( 240 long repositoryId, java.lang.String uuid, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.NoSuchRepositoryException, 243 com.liferay.portal.kernel.exception.SystemException { 244 return getPersistence() 245 .findByUuid_PrevAndNext(repositoryId, uuid, orderByComparator); 246 } 247 248 /** 249 * Removes all the repositories where uuid = ? from the database. 250 * 251 * @param uuid the uuid 252 * @throws SystemException if a system exception occurred 253 */ 254 public static void removeByUuid(java.lang.String uuid) 255 throws com.liferay.portal.kernel.exception.SystemException { 256 getPersistence().removeByUuid(uuid); 257 } 258 259 /** 260 * Returns the number of repositories where uuid = ?. 261 * 262 * @param uuid the uuid 263 * @return the number of matching repositories 264 * @throws SystemException if a system exception occurred 265 */ 266 public static int countByUuid(java.lang.String uuid) 267 throws com.liferay.portal.kernel.exception.SystemException { 268 return getPersistence().countByUuid(uuid); 269 } 270 271 /** 272 * Returns the repository where uuid = ? and groupId = ? or throws a {@link com.liferay.portal.NoSuchRepositoryException} if it could not be found. 273 * 274 * @param uuid the uuid 275 * @param groupId the group ID 276 * @return the matching repository 277 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public static com.liferay.portal.model.Repository findByUUID_G( 281 java.lang.String uuid, long groupId) 282 throws com.liferay.portal.NoSuchRepositoryException, 283 com.liferay.portal.kernel.exception.SystemException { 284 return getPersistence().findByUUID_G(uuid, groupId); 285 } 286 287 /** 288 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 289 * 290 * @param uuid the uuid 291 * @param groupId the group ID 292 * @return the matching repository, or <code>null</code> if a matching repository could not be found 293 * @throws SystemException if a system exception occurred 294 */ 295 public static com.liferay.portal.model.Repository fetchByUUID_G( 296 java.lang.String uuid, long groupId) 297 throws com.liferay.portal.kernel.exception.SystemException { 298 return getPersistence().fetchByUUID_G(uuid, groupId); 299 } 300 301 /** 302 * Returns the repository where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 303 * 304 * @param uuid the uuid 305 * @param groupId the group ID 306 * @param retrieveFromCache whether to use the finder cache 307 * @return the matching repository, or <code>null</code> if a matching repository could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portal.model.Repository fetchByUUID_G( 311 java.lang.String uuid, long groupId, boolean retrieveFromCache) 312 throws com.liferay.portal.kernel.exception.SystemException { 313 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 314 } 315 316 /** 317 * Removes the repository where uuid = ? and groupId = ? from the database. 318 * 319 * @param uuid the uuid 320 * @param groupId the group ID 321 * @return the repository that was removed 322 * @throws SystemException if a system exception occurred 323 */ 324 public static com.liferay.portal.model.Repository removeByUUID_G( 325 java.lang.String uuid, long groupId) 326 throws com.liferay.portal.NoSuchRepositoryException, 327 com.liferay.portal.kernel.exception.SystemException { 328 return getPersistence().removeByUUID_G(uuid, groupId); 329 } 330 331 /** 332 * Returns the number of repositories where uuid = ? and groupId = ?. 333 * 334 * @param uuid the uuid 335 * @param groupId the group ID 336 * @return the number of matching repositories 337 * @throws SystemException if a system exception occurred 338 */ 339 public static int countByUUID_G(java.lang.String uuid, long groupId) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().countByUUID_G(uuid, groupId); 342 } 343 344 /** 345 * Returns all the repositories where uuid = ? and companyId = ?. 346 * 347 * @param uuid the uuid 348 * @param companyId the company ID 349 * @return the matching repositories 350 * @throws SystemException if a system exception occurred 351 */ 352 public static java.util.List<com.liferay.portal.model.Repository> findByUuid_C( 353 java.lang.String uuid, long companyId) 354 throws com.liferay.portal.kernel.exception.SystemException { 355 return getPersistence().findByUuid_C(uuid, companyId); 356 } 357 358 /** 359 * Returns a range of all the repositories where uuid = ? and companyId = ?. 360 * 361 * <p> 362 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 363 * </p> 364 * 365 * @param uuid the uuid 366 * @param companyId the company ID 367 * @param start the lower bound of the range of repositories 368 * @param end the upper bound of the range of repositories (not inclusive) 369 * @return the range of matching repositories 370 * @throws SystemException if a system exception occurred 371 */ 372 public static java.util.List<com.liferay.portal.model.Repository> findByUuid_C( 373 java.lang.String uuid, long companyId, int start, int end) 374 throws com.liferay.portal.kernel.exception.SystemException { 375 return getPersistence().findByUuid_C(uuid, companyId, start, end); 376 } 377 378 /** 379 * Returns an ordered range of all the repositories where uuid = ? and companyId = ?. 380 * 381 * <p> 382 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 383 * </p> 384 * 385 * @param uuid the uuid 386 * @param companyId the company ID 387 * @param start the lower bound of the range of repositories 388 * @param end the upper bound of the range of repositories (not inclusive) 389 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 390 * @return the ordered range of matching repositories 391 * @throws SystemException if a system exception occurred 392 */ 393 public static java.util.List<com.liferay.portal.model.Repository> findByUuid_C( 394 java.lang.String uuid, long companyId, int start, int end, 395 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 396 throws com.liferay.portal.kernel.exception.SystemException { 397 return getPersistence() 398 .findByUuid_C(uuid, companyId, start, end, orderByComparator); 399 } 400 401 /** 402 * Returns the first repository in the ordered set where uuid = ? and companyId = ?. 403 * 404 * @param uuid the uuid 405 * @param companyId the company ID 406 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 407 * @return the first matching repository 408 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 409 * @throws SystemException if a system exception occurred 410 */ 411 public static com.liferay.portal.model.Repository findByUuid_C_First( 412 java.lang.String uuid, long companyId, 413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 414 throws com.liferay.portal.NoSuchRepositoryException, 415 com.liferay.portal.kernel.exception.SystemException { 416 return getPersistence() 417 .findByUuid_C_First(uuid, companyId, orderByComparator); 418 } 419 420 /** 421 * Returns the first repository in the ordered set where uuid = ? and companyId = ?. 422 * 423 * @param uuid the uuid 424 * @param companyId the company ID 425 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 426 * @return the first matching repository, or <code>null</code> if a matching repository could not be found 427 * @throws SystemException if a system exception occurred 428 */ 429 public static com.liferay.portal.model.Repository fetchByUuid_C_First( 430 java.lang.String uuid, long companyId, 431 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 432 throws com.liferay.portal.kernel.exception.SystemException { 433 return getPersistence() 434 .fetchByUuid_C_First(uuid, companyId, orderByComparator); 435 } 436 437 /** 438 * Returns the last repository in the ordered set where uuid = ? and companyId = ?. 439 * 440 * @param uuid the uuid 441 * @param companyId the company ID 442 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 443 * @return the last matching repository 444 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 445 * @throws SystemException if a system exception occurred 446 */ 447 public static com.liferay.portal.model.Repository findByUuid_C_Last( 448 java.lang.String uuid, long companyId, 449 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 450 throws com.liferay.portal.NoSuchRepositoryException, 451 com.liferay.portal.kernel.exception.SystemException { 452 return getPersistence() 453 .findByUuid_C_Last(uuid, companyId, orderByComparator); 454 } 455 456 /** 457 * Returns the last repository in the ordered set where uuid = ? and companyId = ?. 458 * 459 * @param uuid the uuid 460 * @param companyId the company ID 461 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 462 * @return the last matching repository, or <code>null</code> if a matching repository could not be found 463 * @throws SystemException if a system exception occurred 464 */ 465 public static com.liferay.portal.model.Repository fetchByUuid_C_Last( 466 java.lang.String uuid, long companyId, 467 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 468 throws com.liferay.portal.kernel.exception.SystemException { 469 return getPersistence() 470 .fetchByUuid_C_Last(uuid, companyId, orderByComparator); 471 } 472 473 /** 474 * Returns the repositories before and after the current repository in the ordered set where uuid = ? and companyId = ?. 475 * 476 * @param repositoryId the primary key of the current repository 477 * @param uuid the uuid 478 * @param companyId the company ID 479 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 480 * @return the previous, current, and next repository 481 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 482 * @throws SystemException if a system exception occurred 483 */ 484 public static com.liferay.portal.model.Repository[] findByUuid_C_PrevAndNext( 485 long repositoryId, java.lang.String uuid, long companyId, 486 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 487 throws com.liferay.portal.NoSuchRepositoryException, 488 com.liferay.portal.kernel.exception.SystemException { 489 return getPersistence() 490 .findByUuid_C_PrevAndNext(repositoryId, uuid, companyId, 491 orderByComparator); 492 } 493 494 /** 495 * Removes all the repositories where uuid = ? and companyId = ? from the database. 496 * 497 * @param uuid the uuid 498 * @param companyId the company ID 499 * @throws SystemException if a system exception occurred 500 */ 501 public static void removeByUuid_C(java.lang.String uuid, long companyId) 502 throws com.liferay.portal.kernel.exception.SystemException { 503 getPersistence().removeByUuid_C(uuid, companyId); 504 } 505 506 /** 507 * Returns the number of repositories where uuid = ? and companyId = ?. 508 * 509 * @param uuid the uuid 510 * @param companyId the company ID 511 * @return the number of matching repositories 512 * @throws SystemException if a system exception occurred 513 */ 514 public static int countByUuid_C(java.lang.String uuid, long companyId) 515 throws com.liferay.portal.kernel.exception.SystemException { 516 return getPersistence().countByUuid_C(uuid, companyId); 517 } 518 519 /** 520 * Returns all the repositories where groupId = ?. 521 * 522 * @param groupId the group ID 523 * @return the matching repositories 524 * @throws SystemException if a system exception occurred 525 */ 526 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 527 long groupId) 528 throws com.liferay.portal.kernel.exception.SystemException { 529 return getPersistence().findByGroupId(groupId); 530 } 531 532 /** 533 * Returns a range of all the repositories where groupId = ?. 534 * 535 * <p> 536 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 537 * </p> 538 * 539 * @param groupId the group ID 540 * @param start the lower bound of the range of repositories 541 * @param end the upper bound of the range of repositories (not inclusive) 542 * @return the range of matching repositories 543 * @throws SystemException if a system exception occurred 544 */ 545 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 546 long groupId, int start, int end) 547 throws com.liferay.portal.kernel.exception.SystemException { 548 return getPersistence().findByGroupId(groupId, start, end); 549 } 550 551 /** 552 * Returns an ordered range of all the repositories where groupId = ?. 553 * 554 * <p> 555 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 556 * </p> 557 * 558 * @param groupId the group ID 559 * @param start the lower bound of the range of repositories 560 * @param end the upper bound of the range of repositories (not inclusive) 561 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 562 * @return the ordered range of matching repositories 563 * @throws SystemException if a system exception occurred 564 */ 565 public static java.util.List<com.liferay.portal.model.Repository> findByGroupId( 566 long groupId, int start, int end, 567 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 568 throws com.liferay.portal.kernel.exception.SystemException { 569 return getPersistence() 570 .findByGroupId(groupId, start, end, orderByComparator); 571 } 572 573 /** 574 * Returns the first repository in the ordered set where groupId = ?. 575 * 576 * @param groupId the group ID 577 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 578 * @return the first matching repository 579 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 580 * @throws SystemException if a system exception occurred 581 */ 582 public static com.liferay.portal.model.Repository findByGroupId_First( 583 long groupId, 584 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 585 throws com.liferay.portal.NoSuchRepositoryException, 586 com.liferay.portal.kernel.exception.SystemException { 587 return getPersistence().findByGroupId_First(groupId, orderByComparator); 588 } 589 590 /** 591 * Returns the first repository in the ordered set where groupId = ?. 592 * 593 * @param groupId the group ID 594 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 595 * @return the first matching repository, or <code>null</code> if a matching repository could not be found 596 * @throws SystemException if a system exception occurred 597 */ 598 public static com.liferay.portal.model.Repository fetchByGroupId_First( 599 long groupId, 600 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 601 throws com.liferay.portal.kernel.exception.SystemException { 602 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 603 } 604 605 /** 606 * Returns the last repository in the ordered set where groupId = ?. 607 * 608 * @param groupId the group ID 609 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 610 * @return the last matching repository 611 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 612 * @throws SystemException if a system exception occurred 613 */ 614 public static com.liferay.portal.model.Repository findByGroupId_Last( 615 long groupId, 616 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 617 throws com.liferay.portal.NoSuchRepositoryException, 618 com.liferay.portal.kernel.exception.SystemException { 619 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 620 } 621 622 /** 623 * Returns the last repository in the ordered set where groupId = ?. 624 * 625 * @param groupId the group ID 626 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 627 * @return the last matching repository, or <code>null</code> if a matching repository could not be found 628 * @throws SystemException if a system exception occurred 629 */ 630 public static com.liferay.portal.model.Repository fetchByGroupId_Last( 631 long groupId, 632 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 633 throws com.liferay.portal.kernel.exception.SystemException { 634 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 635 } 636 637 /** 638 * Returns the repositories before and after the current repository in the ordered set where groupId = ?. 639 * 640 * @param repositoryId the primary key of the current repository 641 * @param groupId the group ID 642 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 643 * @return the previous, current, and next repository 644 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 645 * @throws SystemException if a system exception occurred 646 */ 647 public static com.liferay.portal.model.Repository[] findByGroupId_PrevAndNext( 648 long repositoryId, long groupId, 649 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 650 throws com.liferay.portal.NoSuchRepositoryException, 651 com.liferay.portal.kernel.exception.SystemException { 652 return getPersistence() 653 .findByGroupId_PrevAndNext(repositoryId, groupId, 654 orderByComparator); 655 } 656 657 /** 658 * Removes all the repositories where groupId = ? from the database. 659 * 660 * @param groupId the group ID 661 * @throws SystemException if a system exception occurred 662 */ 663 public static void removeByGroupId(long groupId) 664 throws com.liferay.portal.kernel.exception.SystemException { 665 getPersistence().removeByGroupId(groupId); 666 } 667 668 /** 669 * Returns the number of repositories where groupId = ?. 670 * 671 * @param groupId the group ID 672 * @return the number of matching repositories 673 * @throws SystemException if a system exception occurred 674 */ 675 public static int countByGroupId(long groupId) 676 throws com.liferay.portal.kernel.exception.SystemException { 677 return getPersistence().countByGroupId(groupId); 678 } 679 680 /** 681 * Returns the repository where groupId = ? and name = ? and portletId = ? or throws a {@link com.liferay.portal.NoSuchRepositoryException} if it could not be found. 682 * 683 * @param groupId the group ID 684 * @param name the name 685 * @param portletId the portlet ID 686 * @return the matching repository 687 * @throws com.liferay.portal.NoSuchRepositoryException if a matching repository could not be found 688 * @throws SystemException if a system exception occurred 689 */ 690 public static com.liferay.portal.model.Repository findByG_N_P( 691 long groupId, java.lang.String name, java.lang.String portletId) 692 throws com.liferay.portal.NoSuchRepositoryException, 693 com.liferay.portal.kernel.exception.SystemException { 694 return getPersistence().findByG_N_P(groupId, name, portletId); 695 } 696 697 /** 698 * Returns the repository where groupId = ? and name = ? and portletId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 699 * 700 * @param groupId the group ID 701 * @param name the name 702 * @param portletId the portlet ID 703 * @return the matching repository, or <code>null</code> if a matching repository could not be found 704 * @throws SystemException if a system exception occurred 705 */ 706 public static com.liferay.portal.model.Repository fetchByG_N_P( 707 long groupId, java.lang.String name, java.lang.String portletId) 708 throws com.liferay.portal.kernel.exception.SystemException { 709 return getPersistence().fetchByG_N_P(groupId, name, portletId); 710 } 711 712 /** 713 * Returns the repository where groupId = ? and name = ? and portletId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 714 * 715 * @param groupId the group ID 716 * @param name the name 717 * @param portletId the portlet ID 718 * @param retrieveFromCache whether to use the finder cache 719 * @return the matching repository, or <code>null</code> if a matching repository could not be found 720 * @throws SystemException if a system exception occurred 721 */ 722 public static com.liferay.portal.model.Repository fetchByG_N_P( 723 long groupId, java.lang.String name, java.lang.String portletId, 724 boolean retrieveFromCache) 725 throws com.liferay.portal.kernel.exception.SystemException { 726 return getPersistence() 727 .fetchByG_N_P(groupId, name, portletId, retrieveFromCache); 728 } 729 730 /** 731 * Removes the repository where groupId = ? and name = ? and portletId = ? from the database. 732 * 733 * @param groupId the group ID 734 * @param name the name 735 * @param portletId the portlet ID 736 * @return the repository that was removed 737 * @throws SystemException if a system exception occurred 738 */ 739 public static com.liferay.portal.model.Repository removeByG_N_P( 740 long groupId, java.lang.String name, java.lang.String portletId) 741 throws com.liferay.portal.NoSuchRepositoryException, 742 com.liferay.portal.kernel.exception.SystemException { 743 return getPersistence().removeByG_N_P(groupId, name, portletId); 744 } 745 746 /** 747 * Returns the number of repositories where groupId = ? and name = ? and portletId = ?. 748 * 749 * @param groupId the group ID 750 * @param name the name 751 * @param portletId the portlet ID 752 * @return the number of matching repositories 753 * @throws SystemException if a system exception occurred 754 */ 755 public static int countByG_N_P(long groupId, java.lang.String name, 756 java.lang.String portletId) 757 throws com.liferay.portal.kernel.exception.SystemException { 758 return getPersistence().countByG_N_P(groupId, name, portletId); 759 } 760 761 /** 762 * Caches the repository in the entity cache if it is enabled. 763 * 764 * @param repository the repository 765 */ 766 public static void cacheResult( 767 com.liferay.portal.model.Repository repository) { 768 getPersistence().cacheResult(repository); 769 } 770 771 /** 772 * Caches the repositories in the entity cache if it is enabled. 773 * 774 * @param repositories the repositories 775 */ 776 public static void cacheResult( 777 java.util.List<com.liferay.portal.model.Repository> repositories) { 778 getPersistence().cacheResult(repositories); 779 } 780 781 /** 782 * Creates a new repository with the primary key. Does not add the repository to the database. 783 * 784 * @param repositoryId the primary key for the new repository 785 * @return the new repository 786 */ 787 public static com.liferay.portal.model.Repository create(long repositoryId) { 788 return getPersistence().create(repositoryId); 789 } 790 791 /** 792 * Removes the repository with the primary key from the database. Also notifies the appropriate model listeners. 793 * 794 * @param repositoryId the primary key of the repository 795 * @return the repository that was removed 796 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 797 * @throws SystemException if a system exception occurred 798 */ 799 public static com.liferay.portal.model.Repository remove(long repositoryId) 800 throws com.liferay.portal.NoSuchRepositoryException, 801 com.liferay.portal.kernel.exception.SystemException { 802 return getPersistence().remove(repositoryId); 803 } 804 805 public static com.liferay.portal.model.Repository updateImpl( 806 com.liferay.portal.model.Repository repository) 807 throws com.liferay.portal.kernel.exception.SystemException { 808 return getPersistence().updateImpl(repository); 809 } 810 811 /** 812 * Returns the repository with the primary key or throws a {@link com.liferay.portal.NoSuchRepositoryException} if it could not be found. 813 * 814 * @param repositoryId the primary key of the repository 815 * @return the repository 816 * @throws com.liferay.portal.NoSuchRepositoryException if a repository with the primary key could not be found 817 * @throws SystemException if a system exception occurred 818 */ 819 public static com.liferay.portal.model.Repository findByPrimaryKey( 820 long repositoryId) 821 throws com.liferay.portal.NoSuchRepositoryException, 822 com.liferay.portal.kernel.exception.SystemException { 823 return getPersistence().findByPrimaryKey(repositoryId); 824 } 825 826 /** 827 * Returns the repository with the primary key or returns <code>null</code> if it could not be found. 828 * 829 * @param repositoryId the primary key of the repository 830 * @return the repository, or <code>null</code> if a repository with the primary key could not be found 831 * @throws SystemException if a system exception occurred 832 */ 833 public static com.liferay.portal.model.Repository fetchByPrimaryKey( 834 long repositoryId) 835 throws com.liferay.portal.kernel.exception.SystemException { 836 return getPersistence().fetchByPrimaryKey(repositoryId); 837 } 838 839 /** 840 * Returns all the repositories. 841 * 842 * @return the repositories 843 * @throws SystemException if a system exception occurred 844 */ 845 public static java.util.List<com.liferay.portal.model.Repository> findAll() 846 throws com.liferay.portal.kernel.exception.SystemException { 847 return getPersistence().findAll(); 848 } 849 850 /** 851 * Returns a range of all the repositories. 852 * 853 * <p> 854 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 855 * </p> 856 * 857 * @param start the lower bound of the range of repositories 858 * @param end the upper bound of the range of repositories (not inclusive) 859 * @return the range of repositories 860 * @throws SystemException if a system exception occurred 861 */ 862 public static java.util.List<com.liferay.portal.model.Repository> findAll( 863 int start, int end) 864 throws com.liferay.portal.kernel.exception.SystemException { 865 return getPersistence().findAll(start, end); 866 } 867 868 /** 869 * Returns an ordered range of all the repositories. 870 * 871 * <p> 872 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 873 * </p> 874 * 875 * @param start the lower bound of the range of repositories 876 * @param end the upper bound of the range of repositories (not inclusive) 877 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 878 * @return the ordered range of repositories 879 * @throws SystemException if a system exception occurred 880 */ 881 public static java.util.List<com.liferay.portal.model.Repository> findAll( 882 int start, int end, 883 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 884 throws com.liferay.portal.kernel.exception.SystemException { 885 return getPersistence().findAll(start, end, orderByComparator); 886 } 887 888 /** 889 * Removes all the repositories from the database. 890 * 891 * @throws SystemException if a system exception occurred 892 */ 893 public static void removeAll() 894 throws com.liferay.portal.kernel.exception.SystemException { 895 getPersistence().removeAll(); 896 } 897 898 /** 899 * Returns the number of repositories. 900 * 901 * @return the number of repositories 902 * @throws SystemException if a system exception occurred 903 */ 904 public static int countAll() 905 throws com.liferay.portal.kernel.exception.SystemException { 906 return getPersistence().countAll(); 907 } 908 909 public static RepositoryPersistence getPersistence() { 910 if (_persistence == null) { 911 _persistence = (RepositoryPersistence)PortalBeanLocatorUtil.locate(RepositoryPersistence.class.getName()); 912 913 ReferenceRegistry.registerReference(RepositoryUtil.class, 914 "_persistence"); 915 } 916 917 return _persistence; 918 } 919 920 /** 921 * @deprecated As of 6.2.0 922 */ 923 public void setPersistence(RepositoryPersistence persistence) { 924 } 925 926 private static RepositoryPersistence _persistence; 927 }