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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
246                    return getService().getIndexableActionableDynamicQuery();
247            }
248    
249            /**
250            * Returns the layout set prototype with the primary key.
251            *
252            * @param layoutSetPrototypeId the primary key of the layout set prototype
253            * @return the layout set prototype
254            * @throws PortalException if a layout set prototype with the primary key could not be found
255            */
256            public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
257                    long layoutSetPrototypeId)
258                    throws com.liferay.portal.kernel.exception.PortalException {
259                    return getService().getLayoutSetPrototype(layoutSetPrototypeId);
260            }
261    
262            /**
263            * @deprecated As of 6.2.0, replaced by {@link
264            #getLayoutSetPrototypeByUuidAndCompanyId(String, long)}
265            */
266            @Deprecated
267            public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuid(
268                    java.lang.String uuid)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    return getService().getLayoutSetPrototypeByUuid(uuid);
271            }
272    
273            /**
274            * Returns the layout set prototype with the matching UUID and company.
275            *
276            * @param uuid the layout set prototype's UUID
277            * @param companyId the primary key of the company
278            * @return the matching layout set prototype
279            * @throws PortalException if a matching layout set prototype could not be found
280            */
281            public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuidAndCompanyId(
282                    java.lang.String uuid, long companyId)
283                    throws com.liferay.portal.kernel.exception.PortalException {
284                    return getService()
285                                       .getLayoutSetPrototypeByUuidAndCompanyId(uuid, companyId);
286            }
287    
288            public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes(
289                    long companyId) {
290                    return getService().getLayoutSetPrototypes(companyId);
291            }
292    
293            /**
294            * Returns a range of all the layout set prototypes.
295            *
296            * <p>
297            * 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.
298            * </p>
299            *
300            * @param start the lower bound of the range of layout set prototypes
301            * @param end the upper bound of the range of layout set prototypes (not inclusive)
302            * @return the range of layout set prototypes
303            */
304            public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes(
305                    int start, int end) {
306                    return getService().getLayoutSetPrototypes(start, end);
307            }
308    
309            /**
310            * Returns the number of layout set prototypes.
311            *
312            * @return the number of layout set prototypes
313            */
314            public static int getLayoutSetPrototypesCount() {
315                    return getService().getLayoutSetPrototypesCount();
316            }
317    
318            /**
319            * Returns the OSGi service identifier.
320            *
321            * @return the OSGi service identifier
322            */
323            public static java.lang.String getOSGiServiceIdentifier() {
324                    return getService().getOSGiServiceIdentifier();
325            }
326    
327            public static com.liferay.portal.model.PersistedModel getPersistedModel(
328                    java.io.Serializable primaryKeyObj)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return getService().getPersistedModel(primaryKeyObj);
331            }
332    
333            public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> search(
334                    long companyId, java.lang.Boolean active, int start, int end,
335                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutSetPrototype> obc) {
336                    return getService().search(companyId, active, start, end, obc);
337            }
338    
339            public static int searchCount(long companyId, java.lang.Boolean active) {
340                    return getService().searchCount(companyId, active);
341            }
342    
343            /**
344            * Updates the layout set prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
345            *
346            * @param layoutSetPrototype the layout set prototype
347            * @return the layout set prototype that was updated
348            */
349            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
350                    com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) {
351                    return getService().updateLayoutSetPrototype(layoutSetPrototype);
352            }
353    
354            /**
355            * @deprecated As of 7.0.0, replaced by {@link
356            #updateLayoutSetPrototype(long, Map, Map, boolean, boolean,
357            ServiceContext)}
358            */
359            @Deprecated
360            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
361                    long layoutSetPrototypeId,
362                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
363                    java.lang.String description, boolean active,
364                    boolean layoutsUpdateable,
365                    com.liferay.portal.service.ServiceContext serviceContext)
366                    throws com.liferay.portal.kernel.exception.PortalException {
367                    return getService()
368                                       .updateLayoutSetPrototype(layoutSetPrototypeId, nameMap,
369                            description, active, layoutsUpdateable, serviceContext);
370            }
371    
372            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
373                    long layoutSetPrototypeId,
374                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
375                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
376                    boolean active, boolean layoutsUpdateable,
377                    com.liferay.portal.service.ServiceContext serviceContext)
378                    throws com.liferay.portal.kernel.exception.PortalException {
379                    return getService()
380                                       .updateLayoutSetPrototype(layoutSetPrototypeId, nameMap,
381                            descriptionMap, active, layoutsUpdateable, serviceContext);
382            }
383    
384            public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
385                    long layoutSetPrototypeId, java.lang.String settings)
386                    throws com.liferay.portal.kernel.exception.PortalException {
387                    return getService()
388                                       .updateLayoutSetPrototype(layoutSetPrototypeId, settings);
389            }
390    
391            public static LayoutSetPrototypeLocalService getService() {
392                    if (_service == null) {
393                            _service = (LayoutSetPrototypeLocalService)PortalBeanLocatorUtil.locate(LayoutSetPrototypeLocalService.class.getName());
394    
395                            ReferenceRegistry.registerReference(LayoutSetPrototypeLocalServiceUtil.class,
396                                    "_service");
397                    }
398    
399                    return _service;
400            }
401    
402            private static LayoutSetPrototypeLocalService _service;
403    }