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