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.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
225                    return getService().getIndexableActionableDynamicQuery();
226            }
227    
228            public static com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch(
229                    long groupId, boolean privateLayout, java.lang.String name)
230                    throws com.liferay.portal.kernel.exception.PortalException {
231                    return getService().getLayoutSetBranch(groupId, privateLayout, name);
232            }
233    
234            /**
235            * Returns the layout set branch with the primary key.
236            *
237            * @param layoutSetBranchId the primary key of the layout set branch
238            * @return the layout set branch
239            * @throws PortalException if a layout set branch with the primary key could not be found
240            */
241            public static com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch(
242                    long layoutSetBranchId)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    return getService().getLayoutSetBranch(layoutSetBranchId);
245            }
246    
247            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranches(
248                    long groupId, boolean privateLayout) {
249                    return getService().getLayoutSetBranches(groupId, privateLayout);
250            }
251    
252            /**
253            * Returns a range of all the layout set branchs.
254            *
255            * <p>
256            * 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.
257            * </p>
258            *
259            * @param start the lower bound of the range of layout set branchs
260            * @param end the upper bound of the range of layout set branchs (not inclusive)
261            * @return the range of layout set branchs
262            */
263            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranchs(
264                    int start, int end) {
265                    return getService().getLayoutSetBranchs(start, end);
266            }
267    
268            /**
269            * Returns the number of layout set branchs.
270            *
271            * @return the number of layout set branchs
272            */
273            public static int getLayoutSetBranchsCount() {
274                    return getService().getLayoutSetBranchsCount();
275            }
276    
277            public static com.liferay.portal.model.LayoutSetBranch getMasterLayoutSetBranch(
278                    long groupId, boolean privateLayout)
279                    throws com.liferay.portal.kernel.exception.PortalException {
280                    return getService().getMasterLayoutSetBranch(groupId, privateLayout);
281            }
282    
283            /**
284            * Returns the OSGi service identifier.
285            *
286            * @return the OSGi service identifier
287            */
288            public static java.lang.String getOSGiServiceIdentifier() {
289                    return getService().getOSGiServiceIdentifier();
290            }
291    
292            public static com.liferay.portal.model.PersistedModel getPersistedModel(
293                    java.io.Serializable primaryKeyObj)
294                    throws com.liferay.portal.kernel.exception.PortalException {
295                    return getService().getPersistedModel(primaryKeyObj);
296            }
297    
298            /**
299            * @deprecated As of 6.2.0, replaced by {@link #getUserLayoutSetBranch(long,
300            long, boolean, long, long)}
301            */
302            @Deprecated
303            public static com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch(
304                    long userId, long groupId, boolean privateLayout, long layoutSetBranchId)
305                    throws com.liferay.portal.kernel.exception.PortalException {
306                    return getService()
307                                       .getUserLayoutSetBranch(userId, groupId, privateLayout,
308                            layoutSetBranchId);
309            }
310    
311            public static com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch(
312                    long userId, long groupId, boolean privateLayout, long layoutSetId,
313                    long layoutSetBranchId)
314                    throws com.liferay.portal.kernel.exception.PortalException {
315                    return getService()
316                                       .getUserLayoutSetBranch(userId, groupId, privateLayout,
317                            layoutSetId, layoutSetBranchId);
318            }
319    
320            public static com.liferay.portal.model.LayoutSetBranch mergeLayoutSetBranch(
321                    long layoutSetBranchId, long mergeLayoutSetBranchId,
322                    com.liferay.portal.service.ServiceContext serviceContext)
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    return getService()
325                                       .mergeLayoutSetBranch(layoutSetBranchId,
326                            mergeLayoutSetBranchId, serviceContext);
327            }
328    
329            /**
330            * Updates the layout set branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
331            *
332            * @param layoutSetBranch the layout set branch
333            * @return the layout set branch that was updated
334            */
335            public static com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch(
336                    com.liferay.portal.model.LayoutSetBranch layoutSetBranch) {
337                    return getService().updateLayoutSetBranch(layoutSetBranch);
338            }
339    
340            public static com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch(
341                    long layoutSetBranchId, java.lang.String name,
342                    java.lang.String description,
343                    com.liferay.portal.service.ServiceContext serviceContext)
344                    throws com.liferay.portal.kernel.exception.PortalException {
345                    return getService()
346                                       .updateLayoutSetBranch(layoutSetBranchId, name, description,
347                            serviceContext);
348            }
349    
350            public static LayoutSetBranchLocalService getService() {
351                    if (_service == null) {
352                            _service = (LayoutSetBranchLocalService)PortalBeanLocatorUtil.locate(LayoutSetBranchLocalService.class.getName());
353    
354                            ReferenceRegistry.registerReference(LayoutSetBranchLocalServiceUtil.class,
355                                    "_service");
356                    }
357    
358                    return _service;
359            }
360    
361            private static LayoutSetBranchLocalService _service;
362    }