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