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 matching the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @return the number of rows matching 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 matching 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 matching 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            /**
293            * Returns all the d d m contents matching the UUID and company.
294            *
295            * @param uuid the UUID of the d d m contents
296            * @param companyId the primary key of the company
297            * @return the matching d d m contents, or an empty list if no matches were found
298            */
299            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContentsByUuidAndCompanyId(
300                    java.lang.String uuid, long companyId) {
301                    return getService().getDDMContentsByUuidAndCompanyId(uuid, companyId);
302            }
303    
304            /**
305            * Returns a range of d d m contents matching the UUID and company.
306            *
307            * @param uuid the UUID of the d d m contents
308            * @param companyId the primary key of the company
309            * @param start the lower bound of the range of d d m contents
310            * @param end the upper bound of the range of d d m contents (not inclusive)
311            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
312            * @return the range of matching d d m contents, or an empty list if no matches were found
313            */
314            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMContent> getDDMContentsByUuidAndCompanyId(
315                    java.lang.String uuid, long companyId, int start, int end,
316                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMContent> orderByComparator) {
317                    return getService()
318                                       .getDDMContentsByUuidAndCompanyId(uuid, companyId, start,
319                            end, orderByComparator);
320            }
321    
322            /**
323            * Returns the number of d d m contents.
324            *
325            * @return the number of d d m contents
326            */
327            public static int getDDMContentsCount() {
328                    return getService().getDDMContentsCount();
329            }
330    
331            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
332                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
333                    return getService().getExportActionableDynamicQuery(portletDataContext);
334            }
335    
336            public static com.liferay.portal.model.PersistedModel getPersistedModel(
337                    java.io.Serializable primaryKeyObj)
338                    throws com.liferay.portal.kernel.exception.PortalException {
339                    return getService().getPersistedModel(primaryKeyObj);
340            }
341    
342            /**
343            * Sets the Spring bean ID for this bean.
344            *
345            * @param beanIdentifier the Spring bean ID for this bean
346            */
347            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
348                    getService().setBeanIdentifier(beanIdentifier);
349            }
350    
351            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent updateContent(
352                    long contentId, java.lang.String name, java.lang.String description,
353                    java.lang.String data,
354                    com.liferay.portal.service.ServiceContext serviceContext)
355                    throws com.liferay.portal.kernel.exception.PortalException {
356                    return getService()
357                                       .updateContent(contentId, name, description, data,
358                            serviceContext);
359            }
360    
361            /**
362            * Updates the d d m content in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
363            *
364            * @param ddmContent the d d m content
365            * @return the d d m content that was updated
366            */
367            public static com.liferay.portlet.dynamicdatamapping.model.DDMContent updateDDMContent(
368                    com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent) {
369                    return getService().updateDDMContent(ddmContent);
370            }
371    
372            public static DDMContentLocalService getService() {
373                    if (_service == null) {
374                            _service = (DDMContentLocalService)PortalBeanLocatorUtil.locate(DDMContentLocalService.class.getName());
375    
376                            ReferenceRegistry.registerReference(DDMContentLocalServiceUtil.class,
377                                    "_service");
378                    }
379    
380                    return _service;
381            }
382    
383            /**
384             * @deprecated As of 6.2.0
385             */
386            @Deprecated
387            public void setService(DDMContentLocalService service) {
388            }
389    
390            private static DDMContentLocalService _service;
391    }