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