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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for RepositoryEntry. This utility wraps
024     * {@link com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see RepositoryEntryLocalService
032     * @see com.liferay.portal.service.base.RepositoryEntryLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class RepositoryEntryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the repository entry to the database. Also notifies the appropriate model listeners.
046            *
047            * @param repositoryEntry the repository entry
048            * @return the repository entry that was added
049            */
050            public static com.liferay.portal.model.RepositoryEntry addRepositoryEntry(
051                    com.liferay.portal.model.RepositoryEntry repositoryEntry) {
052                    return getService().addRepositoryEntry(repositoryEntry);
053            }
054    
055            public static com.liferay.portal.model.RepositoryEntry addRepositoryEntry(
056                    long userId, long groupId, long repositoryId,
057                    java.lang.String mappedId,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    return getService()
061                                       .addRepositoryEntry(userId, groupId, repositoryId, mappedId,
062                            serviceContext);
063            }
064    
065            /**
066            * Creates a new repository entry with the primary key. Does not add the repository entry to the database.
067            *
068            * @param repositoryEntryId the primary key for the new repository entry
069            * @return the new repository entry
070            */
071            public static com.liferay.portal.model.RepositoryEntry createRepositoryEntry(
072                    long repositoryEntryId) {
073                    return getService().createRepositoryEntry(repositoryEntryId);
074            }
075    
076            /**
077            * @throws PortalException
078            */
079            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
080                    com.liferay.portal.model.PersistedModel persistedModel)
081                    throws com.liferay.portal.kernel.exception.PortalException {
082                    return getService().deletePersistedModel(persistedModel);
083            }
084    
085            /**
086            * Deletes the repository entry from the database. Also notifies the appropriate model listeners.
087            *
088            * @param repositoryEntry the repository entry
089            * @return the repository entry that was removed
090            */
091            public static com.liferay.portal.model.RepositoryEntry deleteRepositoryEntry(
092                    com.liferay.portal.model.RepositoryEntry repositoryEntry) {
093                    return getService().deleteRepositoryEntry(repositoryEntry);
094            }
095    
096            /**
097            * Deletes the repository entry with the primary key from the database. Also notifies the appropriate model listeners.
098            *
099            * @param repositoryEntryId the primary key of the repository entry
100            * @return the repository entry that was removed
101            * @throws PortalException if a repository entry with the primary key could not be found
102            */
103            public static com.liferay.portal.model.RepositoryEntry deleteRepositoryEntry(
104                    long repositoryEntryId)
105                    throws com.liferay.portal.kernel.exception.PortalException {
106                    return getService().deleteRepositoryEntry(repositoryEntryId);
107            }
108    
109            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
110                    return getService().dynamicQuery();
111            }
112    
113            /**
114            * Performs a dynamic query on the database and returns the matching rows.
115            *
116            * @param dynamicQuery the dynamic query
117            * @return the matching rows
118            */
119            public static <T> java.util.List<T> dynamicQuery(
120                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
121                    return getService().dynamicQuery(dynamicQuery);
122            }
123    
124            /**
125            * Performs a dynamic query on the database and returns a range of the matching rows.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryEntryModelImpl}. 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.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @return the range of matching rows
135            */
136            public static <T> java.util.List<T> dynamicQuery(
137                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
138                    int end) {
139                    return getService().dynamicQuery(dynamicQuery, start, end);
140            }
141    
142            /**
143            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
144            *
145            * <p>
146            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryEntryModelImpl}. 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.
147            * </p>
148            *
149            * @param dynamicQuery the dynamic query
150            * @param start the lower bound of the range of model instances
151            * @param end the upper bound of the range of model instances (not inclusive)
152            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
153            * @return the ordered range of matching rows
154            */
155            public static <T> java.util.List<T> dynamicQuery(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
157                    int end,
158                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
159                    return getService()
160                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
161            }
162    
163            /**
164            * Returns the number of rows matching the dynamic query.
165            *
166            * @param dynamicQuery the dynamic query
167            * @return the number of rows matching the dynamic query
168            */
169            public static long dynamicQueryCount(
170                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
171                    return getService().dynamicQueryCount(dynamicQuery);
172            }
173    
174            /**
175            * Returns the number of rows matching the dynamic query.
176            *
177            * @param dynamicQuery the dynamic query
178            * @param projection the projection to apply to the query
179            * @return the number of rows matching the dynamic query
180            */
181            public static long dynamicQueryCount(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
183                    com.liferay.portal.kernel.dao.orm.Projection projection) {
184                    return getService().dynamicQueryCount(dynamicQuery, projection);
185            }
186    
187            public static com.liferay.portal.model.RepositoryEntry fetchRepositoryEntry(
188                    long repositoryEntryId) {
189                    return getService().fetchRepositoryEntry(repositoryEntryId);
190            }
191    
192            /**
193            * Returns the repository entry matching the UUID and group.
194            *
195            * @param uuid the repository entry's UUID
196            * @param groupId the primary key of the group
197            * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found
198            */
199            public static com.liferay.portal.model.RepositoryEntry fetchRepositoryEntryByUuidAndGroupId(
200                    java.lang.String uuid, long groupId) {
201                    return getService().fetchRepositoryEntryByUuidAndGroupId(uuid, groupId);
202            }
203    
204            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
205                    return getService().getActionableDynamicQuery();
206            }
207    
208            /**
209            * Returns the Spring bean ID for this bean.
210            *
211            * @return the Spring bean ID for this bean
212            */
213            public static java.lang.String getBeanIdentifier() {
214                    return getService().getBeanIdentifier();
215            }
216    
217            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
218                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
219                    return getService().getExportActionableDynamicQuery(portletDataContext);
220            }
221    
222            public static com.liferay.portal.model.PersistedModel getPersistedModel(
223                    java.io.Serializable primaryKeyObj)
224                    throws com.liferay.portal.kernel.exception.PortalException {
225                    return getService().getPersistedModel(primaryKeyObj);
226            }
227    
228            public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries(
229                    long repositoryId) {
230                    return getService().getRepositoryEntries(repositoryId);
231            }
232    
233            /**
234            * Returns a range of all the repository entries.
235            *
236            * <p>
237            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryEntryModelImpl}. 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.
238            * </p>
239            *
240            * @param start the lower bound of the range of repository entries
241            * @param end the upper bound of the range of repository entries (not inclusive)
242            * @return the range of repository entries
243            */
244            public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntries(
245                    int start, int end) {
246                    return getService().getRepositoryEntries(start, end);
247            }
248    
249            /**
250            * Returns all the repository entries matching the UUID and company.
251            *
252            * @param uuid the UUID of the repository entries
253            * @param companyId the primary key of the company
254            * @return the matching repository entries, or an empty list if no matches were found
255            */
256            public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId(
257                    java.lang.String uuid, long companyId) {
258                    return getService()
259                                       .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId);
260            }
261    
262            /**
263            * Returns a range of repository entries matching the UUID and company.
264            *
265            * @param uuid the UUID of the repository entries
266            * @param companyId the primary key of the company
267            * @param start the lower bound of the range of repository entries
268            * @param end the upper bound of the range of repository entries (not inclusive)
269            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
270            * @return the range of matching repository entries, or an empty list if no matches were found
271            */
272            public static java.util.List<com.liferay.portal.model.RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId(
273                    java.lang.String uuid, long companyId, int start, int end,
274                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.RepositoryEntry> orderByComparator) {
275                    return getService()
276                                       .getRepositoryEntriesByUuidAndCompanyId(uuid, companyId,
277                            start, end, orderByComparator);
278            }
279    
280            /**
281            * Returns the number of repository entries.
282            *
283            * @return the number of repository entries
284            */
285            public static int getRepositoryEntriesCount() {
286                    return getService().getRepositoryEntriesCount();
287            }
288    
289            /**
290            * Returns the repository entry with the primary key.
291            *
292            * @param repositoryEntryId the primary key of the repository entry
293            * @return the repository entry
294            * @throws PortalException if a repository entry with the primary key could not be found
295            */
296            public static com.liferay.portal.model.RepositoryEntry getRepositoryEntry(
297                    long repositoryEntryId)
298                    throws com.liferay.portal.kernel.exception.PortalException {
299                    return getService().getRepositoryEntry(repositoryEntryId);
300            }
301    
302            /**
303            * Returns the repository entry matching the UUID and group.
304            *
305            * @param uuid the repository entry's UUID
306            * @param groupId the primary key of the group
307            * @return the matching repository entry
308            * @throws PortalException if a matching repository entry could not be found
309            */
310            public static com.liferay.portal.model.RepositoryEntry getRepositoryEntryByUuidAndGroupId(
311                    java.lang.String uuid, long groupId)
312                    throws com.liferay.portal.kernel.exception.PortalException {
313                    return getService().getRepositoryEntryByUuidAndGroupId(uuid, groupId);
314            }
315    
316            /**
317            * Sets the Spring bean ID for this bean.
318            *
319            * @param beanIdentifier the Spring bean ID for this bean
320            */
321            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
322                    getService().setBeanIdentifier(beanIdentifier);
323            }
324    
325            /**
326            * Updates the repository entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
327            *
328            * @param repositoryEntry the repository entry
329            * @return the repository entry that was updated
330            */
331            public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry(
332                    com.liferay.portal.model.RepositoryEntry repositoryEntry) {
333                    return getService().updateRepositoryEntry(repositoryEntry);
334            }
335    
336            public static com.liferay.portal.model.RepositoryEntry updateRepositoryEntry(
337                    long repositoryEntryId, java.lang.String mappedId)
338                    throws com.liferay.portal.kernel.exception.PortalException {
339                    return getService().updateRepositoryEntry(repositoryEntryId, mappedId);
340            }
341    
342            public static RepositoryEntryLocalService getService() {
343                    if (_service == null) {
344                            _service = (RepositoryEntryLocalService)PortalBeanLocatorUtil.locate(RepositoryEntryLocalService.class.getName());
345    
346                            ReferenceRegistry.registerReference(RepositoryEntryLocalServiceUtil.class,
347                                    "_service");
348                    }
349    
350                    return _service;
351            }
352    
353            /**
354             * @deprecated As of 6.2.0
355             */
356            @Deprecated
357            public void setService(RepositoryEntryLocalService service) {
358            }
359    
360            private static RepositoryEntryLocalService _service;
361    }