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