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