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