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