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