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