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 that match the dynamic query.
207            *
208            * @param dynamicQuery the dynamic query
209            * @return the number of rows that match 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 that match 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 that match 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            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> getDDLRecordSetsByUuidAndCompanyId(
313                    java.lang.String uuid, long companyId) {
314                    return getService().getDDLRecordSetsByUuidAndCompanyId(uuid, companyId);
315            }
316    
317            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> getDDLRecordSetsByUuidAndCompanyId(
318                    java.lang.String uuid, long companyId, int start, int end,
319                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> orderByComparator) {
320                    return getService()
321                                       .getDDLRecordSetsByUuidAndCompanyId(uuid, companyId, start,
322                            end, orderByComparator);
323            }
324    
325            /**
326            * Returns the number of d d l record sets.
327            *
328            * @return the number of d d l record sets
329            */
330            public static int getDDLRecordSetsCount() {
331                    return getService().getDDLRecordSetsCount();
332            }
333    
334            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
335                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
336                    return getService().getExportActionableDynamicQuery(portletDataContext);
337            }
338    
339            public static com.liferay.portal.model.PersistedModel getPersistedModel(
340                    java.io.Serializable primaryKeyObj)
341                    throws com.liferay.portal.kernel.exception.PortalException {
342                    return getService().getPersistedModel(primaryKeyObj);
343            }
344    
345            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getRecordSet(
346                    long groupId, java.lang.String recordSetKey)
347                    throws com.liferay.portal.kernel.exception.PortalException {
348                    return getService().getRecordSet(groupId, recordSetKey);
349            }
350    
351            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet getRecordSet(
352                    long recordSetId)
353                    throws com.liferay.portal.kernel.exception.PortalException {
354                    return getService().getRecordSet(recordSetId);
355            }
356    
357            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> getRecordSets(
358                    long groupId) {
359                    return getService().getRecordSets(groupId);
360            }
361    
362            public static int getRecordSetsCount(long groupId) {
363                    return getService().getRecordSetsCount(groupId);
364            }
365    
366            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> search(
367                    long companyId, long groupId, java.lang.String keywords, int scope,
368                    int start, int end,
369                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> orderByComparator) {
370                    return getService()
371                                       .search(companyId, groupId, keywords, scope, start, end,
372                            orderByComparator);
373            }
374    
375            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> search(
376                    long companyId, long groupId, java.lang.String name,
377                    java.lang.String description, int scope, boolean andOperator,
378                    int start, int end,
379                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> orderByComparator) {
380                    return getService()
381                                       .search(companyId, groupId, name, description, scope,
382                            andOperator, start, end, orderByComparator);
383            }
384    
385            public static int searchCount(long companyId, long groupId,
386                    java.lang.String keywords, int scope) {
387                    return getService().searchCount(companyId, groupId, keywords, scope);
388            }
389    
390            public static int searchCount(long companyId, long groupId,
391                    java.lang.String name, java.lang.String description, int scope,
392                    boolean andOperator) {
393                    return getService()
394                                       .searchCount(companyId, groupId, name, description, scope,
395                            andOperator);
396            }
397    
398            /**
399            * Sets the Spring bean ID for this bean.
400            *
401            * @param beanIdentifier the Spring bean ID for this bean
402            */
403            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
404                    getService().setBeanIdentifier(beanIdentifier);
405            }
406    
407            /**
408            * 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.
409            *
410            * @param ddlRecordSet the d d l record set
411            * @return the d d l record set that was updated
412            */
413            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateDDLRecordSet(
414                    com.liferay.portlet.dynamicdatalists.model.DDLRecordSet ddlRecordSet) {
415                    return getService().updateDDLRecordSet(ddlRecordSet);
416            }
417    
418            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateMinDisplayRows(
419                    long recordSetId, int minDisplayRows,
420                    com.liferay.portal.service.ServiceContext serviceContext)
421                    throws com.liferay.portal.kernel.exception.PortalException {
422                    return getService()
423                                       .updateMinDisplayRows(recordSetId, minDisplayRows,
424                            serviceContext);
425            }
426    
427            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateRecordSet(
428                    long groupId, long ddmStructureId, java.lang.String recordSetKey,
429                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
430                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
431                    int minDisplayRows,
432                    com.liferay.portal.service.ServiceContext serviceContext)
433                    throws com.liferay.portal.kernel.exception.PortalException {
434                    return getService()
435                                       .updateRecordSet(groupId, ddmStructureId, recordSetKey,
436                            nameMap, descriptionMap, minDisplayRows, serviceContext);
437            }
438    
439            public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSet updateRecordSet(
440                    long recordSetId, long ddmStructureId,
441                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
442                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
443                    int minDisplayRows,
444                    com.liferay.portal.service.ServiceContext serviceContext)
445                    throws com.liferay.portal.kernel.exception.PortalException {
446                    return getService()
447                                       .updateRecordSet(recordSetId, ddmStructureId, nameMap,
448                            descriptionMap, minDisplayRows, serviceContext);
449            }
450    
451            public static DDLRecordSetLocalService getService() {
452                    if (_service == null) {
453                            _service = (DDLRecordSetLocalService)PortalBeanLocatorUtil.locate(DDLRecordSetLocalService.class.getName());
454    
455                            ReferenceRegistry.registerReference(DDLRecordSetLocalServiceUtil.class,
456                                    "_service");
457                    }
458    
459                    return _service;
460            }
461    
462            /**
463             * @deprecated As of 6.2.0
464             */
465            @Deprecated
466            public void setService(DDLRecordSetLocalService service) {
467            }
468    
469            private static DDLRecordSetLocalService _service;
470    }