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