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