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