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            /**
213            * Returns the layout branch with the primary key.
214            *
215            * @param layoutBranchId the primary key of the layout branch
216            * @return the layout branch
217            * @throws PortalException if a layout branch with the primary key could not be found
218            */
219            public static com.liferay.portal.model.LayoutBranch getLayoutBranch(
220                    long layoutBranchId)
221                    throws com.liferay.portal.kernel.exception.PortalException {
222                    return getService().getLayoutBranch(layoutBranchId);
223            }
224    
225            public static java.util.List<com.liferay.portal.model.LayoutBranch> getLayoutBranches(
226                    long layoutSetBranchId, long plid, int start, int end,
227                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutBranch> orderByComparator) {
228                    return getService()
229                                       .getLayoutBranches(layoutSetBranchId, plid, start, end,
230                            orderByComparator);
231            }
232    
233            /**
234            * Returns a range of all the layout branchs.
235            *
236            * <p>
237            * 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.
238            * </p>
239            *
240            * @param start the lower bound of the range of layout branchs
241            * @param end the upper bound of the range of layout branchs (not inclusive)
242            * @return the range of layout branchs
243            */
244            public static java.util.List<com.liferay.portal.model.LayoutBranch> getLayoutBranchs(
245                    int start, int end) {
246                    return getService().getLayoutBranchs(start, end);
247            }
248    
249            /**
250            * Returns the number of layout branchs.
251            *
252            * @return the number of layout branchs
253            */
254            public static int getLayoutBranchsCount() {
255                    return getService().getLayoutBranchsCount();
256            }
257    
258            public static java.util.List<com.liferay.portal.model.LayoutBranch> getLayoutSetBranchLayoutBranches(
259                    long layoutSetBranchId) {
260                    return getService().getLayoutSetBranchLayoutBranches(layoutSetBranchId);
261            }
262    
263            public static com.liferay.portal.model.LayoutBranch getMasterLayoutBranch(
264                    long layoutSetBranchId, long plid)
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    return getService().getMasterLayoutBranch(layoutSetBranchId, plid);
267            }
268    
269            public static com.liferay.portal.model.LayoutBranch getMasterLayoutBranch(
270                    long layoutSetBranchId, long plid,
271                    com.liferay.portal.service.ServiceContext serviceContext)
272                    throws com.liferay.portal.kernel.exception.PortalException {
273                    return getService()
274                                       .getMasterLayoutBranch(layoutSetBranchId, plid,
275                            serviceContext);
276            }
277    
278            /**
279            * Returns the OSGi service identifier.
280            *
281            * @return the OSGi service identifier
282            */
283            public static java.lang.String getOSGiServiceIdentifier() {
284                    return getService().getOSGiServiceIdentifier();
285            }
286    
287            public static com.liferay.portal.model.PersistedModel getPersistedModel(
288                    java.io.Serializable primaryKeyObj)
289                    throws com.liferay.portal.kernel.exception.PortalException {
290                    return getService().getPersistedModel(primaryKeyObj);
291            }
292    
293            /**
294            * Updates the layout branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
295            *
296            * @param layoutBranch the layout branch
297            * @return the layout branch that was updated
298            */
299            public static com.liferay.portal.model.LayoutBranch updateLayoutBranch(
300                    com.liferay.portal.model.LayoutBranch layoutBranch) {
301                    return getService().updateLayoutBranch(layoutBranch);
302            }
303    
304            public static com.liferay.portal.model.LayoutBranch updateLayoutBranch(
305                    long layoutBranchId, java.lang.String name,
306                    java.lang.String description,
307                    com.liferay.portal.service.ServiceContext serviceContext)
308                    throws com.liferay.portal.kernel.exception.PortalException {
309                    return getService()
310                                       .updateLayoutBranch(layoutBranchId, name, description,
311                            serviceContext);
312            }
313    
314            public static LayoutBranchLocalService getService() {
315                    if (_service == null) {
316                            _service = (LayoutBranchLocalService)PortalBeanLocatorUtil.locate(LayoutBranchLocalService.class.getName());
317    
318                            ReferenceRegistry.registerReference(LayoutBranchLocalServiceUtil.class,
319                                    "_service");
320                    }
321    
322                    return _service;
323            }
324    
325            /**
326             * @deprecated As of 6.2.0
327             */
328            @Deprecated
329            public void setService(LayoutBranchLocalService service) {
330            }
331    
332            private static LayoutBranchLocalService _service;
333    }