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.portlet.dynamicdatalists.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 DDLRecordSet. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordSetLocalServiceImpl} 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 DDLRecordSetLocalService
032     * @see com.liferay.portlet.dynamicdatalists.service.base.DDLRecordSetLocalServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordSetLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDLRecordSetLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordSetLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the d d l record set to the database. Also notifies the appropriate model listeners.
046            *
047            * @param ddlRecordSet the d d l record set
048            * @return the d d l record set that was added
049            */
050            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet addDDLRecordSet(
051                    com.liferay.portlet.dynamicdatalists.model.DDLRecordSet ddlRecordSet) {
052                    return getService().addDDLRecordSet(ddlRecordSet);
053            }
054    
055            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet addRecordSet(
056                    long userId, long groupId, long ddmStructureId,
057                    java.lang.String recordSetKey,
058                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
059                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
060                    int minDisplayRows, int scope,
061                    com.liferay.portal.service.ServiceContext serviceContext)
062                    throws com.liferay.portal.kernel.exception.PortalException {
063                    return getService()
064                                       .addRecordSet(userId, groupId, ddmStructureId, recordSetKey,
065                            nameMap, descriptionMap, minDisplayRows, scope, serviceContext);
066            }
067    
068            public static void addRecordSetResources(
069                    com.liferay.portlet.dynamicdatalists.model.DDLRecordSet recordSet,
070                    boolean addGroupPermissions, boolean addGuestPermissions)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    getService()
073                            .addRecordSetResources(recordSet, addGroupPermissions,
074                            addGuestPermissions);
075            }
076    
077            public static void addRecordSetResources(
078                    com.liferay.portlet.dynamicdatalists.model.DDLRecordSet recordSet,
079                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    getService()
082                            .addRecordSetResources(recordSet, groupPermissions, guestPermissions);
083            }
084    
085            /**
086            * Creates a new d d l record set with the primary key. Does not add the d d l record set to the database.
087            *
088            * @param recordSetId the primary key for the new d d l record set
089            * @return the new d d l record set
090            */
091            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet createDDLRecordSet(
092                    long recordSetId) {
093                    return getService().createDDLRecordSet(recordSetId);
094            }
095    
096            /**
097            * Deletes the d d l record set from the database. Also notifies the appropriate model listeners.
098            *
099            * @param ddlRecordSet the d d l record set
100            * @return the d d l record set that was removed
101            */
102            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet deleteDDLRecordSet(
103                    com.liferay.portlet.dynamicdatalists.model.DDLRecordSet ddlRecordSet) {
104                    return getService().deleteDDLRecordSet(ddlRecordSet);
105            }
106    
107            /**
108            * Deletes the d d l record set with the primary key from the database. Also notifies the appropriate model listeners.
109            *
110            * @param recordSetId the primary key of the d d l record set
111            * @return the d d l record set that was removed
112            * @throws PortalException if a d d l record set with the primary key could not be found
113            */
114            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet deleteDDLRecordSet(
115                    long recordSetId)
116                    throws com.liferay.portal.kernel.exception.PortalException {
117                    return getService().deleteDDLRecordSet(recordSetId);
118            }
119    
120            /**
121            * @throws PortalException
122            */
123            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
124                    com.liferay.portal.model.PersistedModel persistedModel)
125                    throws com.liferay.portal.kernel.exception.PortalException {
126                    return getService().deletePersistedModel(persistedModel);
127            }
128    
129            public static void deleteRecordSet(long groupId,
130                    java.lang.String recordSetKey)
131                    throws com.liferay.portal.kernel.exception.PortalException {
132                    getService().deleteRecordSet(groupId, recordSetKey);
133            }
134    
135            public static void deleteRecordSet(
136                    com.liferay.portlet.dynamicdatalists.model.DDLRecordSet recordSet)
137                    throws com.liferay.portal.kernel.exception.PortalException {
138                    getService().deleteRecordSet(recordSet);
139            }
140    
141            public static void deleteRecordSet(long recordSetId)
142                    throws com.liferay.portal.kernel.exception.PortalException {
143                    getService().deleteRecordSet(recordSetId);
144            }
145    
146            public static void deleteRecordSets(long groupId)
147                    throws com.liferay.portal.kernel.exception.PortalException {
148                    getService().deleteRecordSets(groupId);
149            }
150    
151            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
152                    return getService().dynamicQuery();
153            }
154    
155            /**
156            * Performs a dynamic query on the database and returns the matching rows.
157            *
158            * @param dynamicQuery the dynamic query
159            * @return the matching rows
160            */
161            public static <T> java.util.List<T> dynamicQuery(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
163                    return getService().dynamicQuery(dynamicQuery);
164            }
165    
166            /**
167            * Performs a dynamic query on the database and returns a range of the matching rows.
168            *
169            * <p>
170            * 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.portlet.dynamicdatalists.model.impl.DDLRecordSetModelImpl}. 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.
171            * </p>
172            *
173            * @param dynamicQuery the dynamic query
174            * @param start the lower bound of the range of model instances
175            * @param end the upper bound of the range of model instances (not inclusive)
176            * @return the range of matching rows
177            */
178            public static <T> java.util.List<T> dynamicQuery(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
180                    int end) {
181                    return getService().dynamicQuery(dynamicQuery, start, end);
182            }
183    
184            /**
185            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
186            *
187            * <p>
188            * 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.portlet.dynamicdatalists.model.impl.DDLRecordSetModelImpl}. 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.
189            * </p>
190            *
191            * @param dynamicQuery the dynamic query
192            * @param start the lower bound of the range of model instances
193            * @param end the upper bound of the range of model instances (not inclusive)
194            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
195            * @return the ordered range of matching rows
196            */
197            public static <T> java.util.List<T> dynamicQuery(
198                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
199                    int end,
200                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
201                    return getService()
202                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
203            }
204    
205            /**
206            * Returns the number of rows matching the dynamic query.
207            *
208            * @param dynamicQuery the dynamic query
209            * @return the number of rows matching the dynamic query
210            */
211            public static long dynamicQueryCount(
212                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
213                    return getService().dynamicQueryCount(dynamicQuery);
214            }
215    
216            /**
217            * Returns the number of rows matching the dynamic query.
218            *
219            * @param dynamicQuery the dynamic query
220            * @param projection the projection to apply to the query
221            * @return the number of rows matching the dynamic query
222            */
223            public static long dynamicQueryCount(
224                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
225                    com.liferay.portal.kernel.dao.orm.Projection projection) {
226                    return getService().dynamicQueryCount(dynamicQuery, projection);
227            }
228    
229            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet fetchDDLRecordSet(
230                    long recordSetId) {
231                    return getService().fetchDDLRecordSet(recordSetId);
232            }
233    
234            /**
235            * Returns the d d l record set matching the UUID and group.
236            *
237            * @param uuid the d d l record set's UUID
238            * @param groupId the primary key of the group
239            * @return the matching d d l record set, or <code>null</code> if a matching d d l record set could not be found
240            */
241            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet fetchDDLRecordSetByUuidAndGroupId(
242                    java.lang.String uuid, long groupId) {
243                    return getService().fetchDDLRecordSetByUuidAndGroupId(uuid, groupId);
244            }
245    
246            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet fetchRecordSet(
247                    long groupId, java.lang.String recordSetKey) {
248                    return getService().fetchRecordSet(groupId, recordSetKey);
249            }
250    
251            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet fetchRecordSet(
252                    long recordSetId) {
253                    return getService().fetchRecordSet(recordSetId);
254            }
255    
256            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
257                    return getService().getActionableDynamicQuery();
258            }
259    
260            /**
261            * Returns the Spring bean ID for this bean.
262            *
263            * @return the Spring bean ID for this bean
264            */
265            public static java.lang.String getBeanIdentifier() {
266                    return getService().getBeanIdentifier();
267            }
268    
269            /**
270            * Returns the d d l record set with the primary key.
271            *
272            * @param recordSetId the primary key of the d d l record set
273            * @return the d d l record set
274            * @throws PortalException if a d d l record set with the primary key could not be found
275            */
276            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getDDLRecordSet(
277                    long recordSetId)
278                    throws com.liferay.portal.kernel.exception.PortalException {
279                    return getService().getDDLRecordSet(recordSetId);
280            }
281    
282            /**
283            * Returns the d d l record set matching the UUID and group.
284            *
285            * @param uuid the d d l record set's UUID
286            * @param groupId the primary key of the group
287            * @return the matching d d l record set
288            * @throws PortalException if a matching d d l record set could not be found
289            */
290            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getDDLRecordSetByUuidAndGroupId(
291                    java.lang.String uuid, long groupId)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    return getService().getDDLRecordSetByUuidAndGroupId(uuid, groupId);
294            }
295    
296            /**
297            * Returns a range of all the d d l record sets.
298            *
299            * <p>
300            * 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.portlet.dynamicdatalists.model.impl.DDLRecordSetModelImpl}. 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.
301            * </p>
302            *
303            * @param start the lower bound of the range of d d l record sets
304            * @param end the upper bound of the range of d d l record sets (not inclusive)
305            * @return the range of d d l record sets
306            */
307            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> getDDLRecordSets(
308                    int start, int end) {
309                    return getService().getDDLRecordSets(start, end);
310            }
311    
312            /**
313            * Returns all the d d l record sets matching the UUID and company.
314            *
315            * @param uuid the UUID of the d d l record sets
316            * @param companyId the primary key of the company
317            * @return the matching d d l record sets, or an empty list if no matches were found
318            */
319            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> getDDLRecordSetsByUuidAndCompanyId(
320                    java.lang.String uuid, long companyId) {
321                    return getService().getDDLRecordSetsByUuidAndCompanyId(uuid, companyId);
322            }
323    
324            /**
325            * Returns a range of d d l record sets matching the UUID and company.
326            *
327            * @param uuid the UUID of the d d l record sets
328            * @param companyId the primary key of the company
329            * @param start the lower bound of the range of d d l record sets
330            * @param end the upper bound of the range of d d l record sets (not inclusive)
331            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
332            * @return the range of matching d d l record sets, or an empty list if no matches were found
333            */
334            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> getDDLRecordSetsByUuidAndCompanyId(
335                    java.lang.String uuid, long companyId, int start, int end,
336                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> orderByComparator) {
337                    return getService()
338                                       .getDDLRecordSetsByUuidAndCompanyId(uuid, companyId, start,
339                            end, orderByComparator);
340            }
341    
342            /**
343            * Returns the number of d d l record sets.
344            *
345            * @return the number of d d l record sets
346            */
347            public static int getDDLRecordSetsCount() {
348                    return getService().getDDLRecordSetsCount();
349            }
350    
351            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
352                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
353                    return getService().getExportActionableDynamicQuery(portletDataContext);
354            }
355    
356            public static com.liferay.portal.model.PersistedModel getPersistedModel(
357                    java.io.Serializable primaryKeyObj)
358                    throws com.liferay.portal.kernel.exception.PortalException {
359                    return getService().getPersistedModel(primaryKeyObj);
360            }
361    
362            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getRecordSet(
363                    long groupId, java.lang.String recordSetKey)
364                    throws com.liferay.portal.kernel.exception.PortalException {
365                    return getService().getRecordSet(groupId, recordSetKey);
366            }
367    
368            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getRecordSet(
369                    long recordSetId)
370                    throws com.liferay.portal.kernel.exception.PortalException {
371                    return getService().getRecordSet(recordSetId);
372            }
373    
374            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> getRecordSets(
375                    long groupId) {
376                    return getService().getRecordSets(groupId);
377            }
378    
379            public static int getRecordSetsCount(long groupId) {
380                    return getService().getRecordSetsCount(groupId);
381            }
382    
383            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> search(
384                    long companyId, long groupId, java.lang.String keywords, int scope,
385                    int start, int end,
386                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> orderByComparator) {
387                    return getService()
388                                       .search(companyId, groupId, keywords, scope, start, end,
389                            orderByComparator);
390            }
391    
392            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> search(
393                    long companyId, long groupId, java.lang.String name,
394                    java.lang.String description, int scope, boolean andOperator,
395                    int start, int end,
396                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> orderByComparator) {
397                    return getService()
398                                       .search(companyId, groupId, name, description, scope,
399                            andOperator, start, end, orderByComparator);
400            }
401    
402            public static int searchCount(long companyId, long groupId,
403                    java.lang.String keywords, int scope) {
404                    return getService().searchCount(companyId, groupId, keywords, scope);
405            }
406    
407            public static int searchCount(long companyId, long groupId,
408                    java.lang.String name, java.lang.String description, int scope,
409                    boolean andOperator) {
410                    return getService()
411                                       .searchCount(companyId, groupId, name, description, scope,
412                            andOperator);
413            }
414    
415            /**
416            * Sets the Spring bean ID for this bean.
417            *
418            * @param beanIdentifier the Spring bean ID for this bean
419            */
420            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
421                    getService().setBeanIdentifier(beanIdentifier);
422            }
423    
424            /**
425            * Updates the d d l record set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
426            *
427            * @param ddlRecordSet the d d l record set
428            * @return the d d l record set that was updated
429            */
430            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateDDLRecordSet(
431                    com.liferay.portlet.dynamicdatalists.model.DDLRecordSet ddlRecordSet) {
432                    return getService().updateDDLRecordSet(ddlRecordSet);
433            }
434    
435            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateMinDisplayRows(
436                    long recordSetId, int minDisplayRows,
437                    com.liferay.portal.service.ServiceContext serviceContext)
438                    throws com.liferay.portal.kernel.exception.PortalException {
439                    return getService()
440                                       .updateMinDisplayRows(recordSetId, minDisplayRows,
441                            serviceContext);
442            }
443    
444            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateRecordSet(
445                    long groupId, long ddmStructureId, java.lang.String recordSetKey,
446                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
447                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
448                    int minDisplayRows,
449                    com.liferay.portal.service.ServiceContext serviceContext)
450                    throws com.liferay.portal.kernel.exception.PortalException {
451                    return getService()
452                                       .updateRecordSet(groupId, ddmStructureId, recordSetKey,
453                            nameMap, descriptionMap, minDisplayRows, serviceContext);
454            }
455    
456            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateRecordSet(
457                    long recordSetId, long ddmStructureId,
458                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
459                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
460                    int minDisplayRows,
461                    com.liferay.portal.service.ServiceContext serviceContext)
462                    throws com.liferay.portal.kernel.exception.PortalException {
463                    return getService()
464                                       .updateRecordSet(recordSetId, ddmStructureId, nameMap,
465                            descriptionMap, minDisplayRows, serviceContext);
466            }
467    
468            public static DDLRecordSetLocalService getService() {
469                    if (_service == null) {
470                            _service = (DDLRecordSetLocalService)PortalBeanLocatorUtil.locate(DDLRecordSetLocalService.class.getName());
471    
472                            ReferenceRegistry.registerReference(DDLRecordSetLocalServiceUtil.class,
473                                    "_service");
474                    }
475    
476                    return _service;
477            }
478    
479            /**
480             * @deprecated As of 6.2.0
481             */
482            @Deprecated
483            public void setService(DDLRecordSetLocalService service) {
484            }
485    
486            private static DDLRecordSetLocalService _service;
487    }