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