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