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