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.dynamicdatamapping.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 DDMContent. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMContentLocalServiceImpl} 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 DDMContentLocalService
032     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMContentLocalServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMContentLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDMContentLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMContentLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent addContent(
044                    long userId, long groupId, java.lang.String name,
045                    java.lang.String description, java.lang.String data,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    return getService()
049                                       .addContent(userId, groupId, name, description, data,
050                            serviceContext);
051            }
052    
053            /**
054            * Adds the d d m content to the database. Also notifies the appropriate model listeners.
055            *
056            * @param ddmContent the d d m content
057            * @return the d d m content that was added
058            */
059            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent addDDMContent(
060                    com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent) {
061                    return getService().addDDMContent(ddmContent);
062            }
063    
064            /**
065            * Creates a new d d m content with the primary key. Does not add the d d m content to the database.
066            *
067            * @param contentId the primary key for the new d d m content
068            * @return the new d d m content
069            */
070            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent createDDMContent(
071                    long contentId) {
072                    return getService().createDDMContent(contentId);
073            }
074    
075            public static void deleteContent(
076                    com.liferay.portlet.dynamicdatamapping.model.DDMContent content) {
077                    getService().deleteContent(content);
078            }
079    
080            public static void deleteContents(long groupId) {
081                    getService().deleteContents(groupId);
082            }
083    
084            /**
085            * Deletes the d d m content with the primary key from the database. Also notifies the appropriate model listeners.
086            *
087            * @param contentId the primary key of the d d m content
088            * @return the d d m content that was removed
089            * @throws PortalException if a d d m content with the primary key could not be found
090            */
091            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent deleteDDMContent(
092                    long contentId)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    return getService().deleteDDMContent(contentId);
095            }
096    
097            /**
098            * Deletes the d d m content from the database. Also notifies the appropriate model listeners.
099            *
100            * @param ddmContent the d d m content
101            * @return the d d m content that was removed
102            */
103            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent deleteDDMContent(
104                    com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent) {
105                    return getService().deleteDDMContent(ddmContent);
106            }
107    
108            /**
109            * @throws PortalException
110            */
111            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
112                    com.liferay.portal.model.PersistedModel persistedModel)
113                    throws com.liferay.portal.kernel.exception.PortalException {
114                    return getService().deletePersistedModel(persistedModel);
115            }
116    
117            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
118                    return getService().dynamicQuery();
119            }
120    
121            /**
122            * Performs a dynamic query on the database and returns the matching rows.
123            *
124            * @param dynamicQuery the dynamic query
125            * @return the matching rows
126            */
127            public static <T> java.util.List<T> dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
129                    return getService().dynamicQuery(dynamicQuery);
130            }
131    
132            /**
133            * Performs a dynamic query on the database and returns a range of the matching rows.
134            *
135            * <p>
136            * 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.dynamicdatamapping.model.impl.DDMContentModelImpl}. 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.
137            * </p>
138            *
139            * @param dynamicQuery the dynamic query
140            * @param start the lower bound of the range of model instances
141            * @param end the upper bound of the range of model instances (not inclusive)
142            * @return the range of matching rows
143            */
144            public static <T> java.util.List<T> dynamicQuery(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
146                    int end) {
147                    return getService().dynamicQuery(dynamicQuery, start, end);
148            }
149    
150            /**
151            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
152            *
153            * <p>
154            * 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.dynamicdatamapping.model.impl.DDMContentModelImpl}. 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.
155            * </p>
156            *
157            * @param dynamicQuery the dynamic query
158            * @param start the lower bound of the range of model instances
159            * @param end the upper bound of the range of model instances (not inclusive)
160            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
161            * @return the ordered range of matching rows
162            */
163            public static <T> java.util.List<T> dynamicQuery(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
165                    int end,
166                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
167                    return getService()
168                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
169            }
170    
171            /**
172            * Returns the number of rows that match the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @return the number of rows that match the dynamic query
176            */
177            public static long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
179                    return getService().dynamicQueryCount(dynamicQuery);
180            }
181    
182            /**
183            * Returns the number of rows that match the dynamic query.
184            *
185            * @param dynamicQuery the dynamic query
186            * @param projection the projection to apply to the query
187            * @return the number of rows that match the dynamic query
188            */
189            public static long dynamicQueryCount(
190                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
191                    com.liferay.portal.kernel.dao.orm.Projection projection) {
192                    return getService().dynamicQueryCount(dynamicQuery, projection);
193            }
194    
195            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent fetchDDMContent(
196                    long contentId) {
197                    return getService().fetchDDMContent(contentId);
198            }
199    
200            /**
201            * Returns the d d m content matching the UUID and group.
202            *
203            * @param uuid the d d m content's UUID
204            * @param groupId the primary key of the group
205            * @return the matching d d m content, or <code>null</code> if a matching d d m content could not be found
206            */
207            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent fetchDDMContentByUuidAndGroupId(
208                    java.lang.String uuid, long groupId) {
209                    return getService().fetchDDMContentByUuidAndGroupId(uuid, groupId);
210            }
211    
212            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
213                    return getService().getActionableDynamicQuery();
214            }
215    
216            /**
217            * Returns the Spring bean ID for this bean.
218            *
219            * @return the Spring bean ID for this bean
220            */
221            public static java.lang.String getBeanIdentifier() {
222                    return getService().getBeanIdentifier();
223            }
224    
225            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent getContent(
226                    long contentId)
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return getService().getContent(contentId);
229            }
230    
231            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getContents() {
232                    return getService().getContents();
233            }
234    
235            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getContents(
236                    long groupId) {
237                    return getService().getContents(groupId);
238            }
239    
240            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getContents(
241                    long groupId, int start, int end) {
242                    return getService().getContents(groupId, start, end);
243            }
244    
245            public static int getContentsCount(long groupId) {
246                    return getService().getContentsCount(groupId);
247            }
248    
249            /**
250            * Returns the d d m content with the primary key.
251            *
252            * @param contentId the primary key of the d d m content
253            * @return the d d m content
254            * @throws PortalException if a d d m content with the primary key could not be found
255            */
256            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent getDDMContent(
257                    long contentId)
258                    throws com.liferay.portal.kernel.exception.PortalException {
259                    return getService().getDDMContent(contentId);
260            }
261    
262            /**
263            * Returns the d d m content matching the UUID and group.
264            *
265            * @param uuid the d d m content's UUID
266            * @param groupId the primary key of the group
267            * @return the matching d d m content
268            * @throws PortalException if a matching d d m content could not be found
269            */
270            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent getDDMContentByUuidAndGroupId(
271                    java.lang.String uuid, long groupId)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    return getService().getDDMContentByUuidAndGroupId(uuid, groupId);
274            }
275    
276            /**
277            * Returns a range of all the d d m contents.
278            *
279            * <p>
280            * 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.dynamicdatamapping.model.impl.DDMContentModelImpl}. 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.
281            * </p>
282            *
283            * @param start the lower bound of the range of d d m contents
284            * @param end the upper bound of the range of d d m contents (not inclusive)
285            * @return the range of d d m contents
286            */
287            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContents(
288                    int start, int end) {
289                    return getService().getDDMContents(start, end);
290            }
291    
292            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContentsByUuidAndCompanyId(
293                    java.lang.String uuid, long companyId) {
294                    return getService().getDDMContentsByUuidAndCompanyId(uuid, companyId);
295            }
296    
297            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContentsByUuidAndCompanyId(
298                    java.lang.String uuid, long companyId, int start, int end,
299                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMContent> orderByComparator) {
300                    return getService()
301                                       .getDDMContentsByUuidAndCompanyId(uuid, companyId, start,
302                            end, orderByComparator);
303            }
304    
305            /**
306            * Returns the number of d d m contents.
307            *
308            * @return the number of d d m contents
309            */
310            public static int getDDMContentsCount() {
311                    return getService().getDDMContentsCount();
312            }
313    
314            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
315                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
316                    return getService().getExportActionableDynamicQuery(portletDataContext);
317            }
318    
319            public static com.liferay.portal.model.PersistedModel getPersistedModel(
320                    java.io.Serializable primaryKeyObj)
321                    throws com.liferay.portal.kernel.exception.PortalException {
322                    return getService().getPersistedModel(primaryKeyObj);
323            }
324    
325            /**
326            * Sets the Spring bean ID for this bean.
327            *
328            * @param beanIdentifier the Spring bean ID for this bean
329            */
330            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
331                    getService().setBeanIdentifier(beanIdentifier);
332            }
333    
334            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent updateContent(
335                    long contentId, java.lang.String name, java.lang.String description,
336                    java.lang.String data,
337                    com.liferay.portal.service.ServiceContext serviceContext)
338                    throws com.liferay.portal.kernel.exception.PortalException {
339                    return getService()
340                                       .updateContent(contentId, name, description, data,
341                            serviceContext);
342            }
343    
344            /**
345            * Updates the d d m content in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
346            *
347            * @param ddmContent the d d m content
348            * @return the d d m content that was updated
349            */
350            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent updateDDMContent(
351                    com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent) {
352                    return getService().updateDDMContent(ddmContent);
353            }
354    
355            public static DDMContentLocalService getService() {
356                    if (_service == null) {
357                            _service = (DDMContentLocalService)PortalBeanLocatorUtil.locate(DDMContentLocalService.class.getName());
358    
359                            ReferenceRegistry.registerReference(DDMContentLocalServiceUtil.class,
360                                    "_service");
361                    }
362    
363                    return _service;
364            }
365    
366            /**
367             * @deprecated As of 6.2.0
368             */
369            @Deprecated
370            public void setService(DDMContentLocalService service) {
371            }
372    
373            private static DDMContentLocalService _service;
374    }