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