001 /** 002 * Copyright (c) 2000-2011 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.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.LayoutBranch; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the layout branch service. This utility wraps {@link LayoutBranchPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see LayoutBranchPersistence 036 * @see LayoutBranchPersistenceImpl 037 * @generated 038 */ 039 public class LayoutBranchUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(LayoutBranch layoutBranch) { 057 getPersistence().clearCache(layoutBranch); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<LayoutBranch> findWithDynamicQuery( 072 DynamicQuery dynamicQuery) throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<LayoutBranch> findWithDynamicQuery( 080 DynamicQuery dynamicQuery, int start, int end) 081 throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<LayoutBranch> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 098 */ 099 public static LayoutBranch remove(LayoutBranch layoutBranch) 100 throws SystemException { 101 return getPersistence().remove(layoutBranch); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 106 */ 107 public static LayoutBranch update(LayoutBranch layoutBranch, boolean merge) 108 throws SystemException { 109 return getPersistence().update(layoutBranch, merge); 110 } 111 112 /** 113 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 114 */ 115 public static LayoutBranch update(LayoutBranch layoutBranch, boolean merge, 116 ServiceContext serviceContext) throws SystemException { 117 return getPersistence().update(layoutBranch, merge, serviceContext); 118 } 119 120 /** 121 * Caches the layout branch in the entity cache if it is enabled. 122 * 123 * @param layoutBranch the layout branch 124 */ 125 public static void cacheResult( 126 com.liferay.portal.model.LayoutBranch layoutBranch) { 127 getPersistence().cacheResult(layoutBranch); 128 } 129 130 /** 131 * Caches the layout branchs in the entity cache if it is enabled. 132 * 133 * @param layoutBranchs the layout branchs 134 */ 135 public static void cacheResult( 136 java.util.List<com.liferay.portal.model.LayoutBranch> layoutBranchs) { 137 getPersistence().cacheResult(layoutBranchs); 138 } 139 140 /** 141 * Creates a new layout branch with the primary key. Does not add the layout branch to the database. 142 * 143 * @param LayoutBranchId the primary key for the new layout branch 144 * @return the new layout branch 145 */ 146 public static com.liferay.portal.model.LayoutBranch create( 147 long LayoutBranchId) { 148 return getPersistence().create(LayoutBranchId); 149 } 150 151 /** 152 * Removes the layout branch with the primary key from the database. Also notifies the appropriate model listeners. 153 * 154 * @param LayoutBranchId the primary key of the layout branch 155 * @return the layout branch that was removed 156 * @throws com.liferay.portal.NoSuchLayoutBranchException if a layout branch with the primary key could not be found 157 * @throws SystemException if a system exception occurred 158 */ 159 public static com.liferay.portal.model.LayoutBranch remove( 160 long LayoutBranchId) 161 throws com.liferay.portal.NoSuchLayoutBranchException, 162 com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().remove(LayoutBranchId); 164 } 165 166 public static com.liferay.portal.model.LayoutBranch updateImpl( 167 com.liferay.portal.model.LayoutBranch layoutBranch, boolean merge) 168 throws com.liferay.portal.kernel.exception.SystemException { 169 return getPersistence().updateImpl(layoutBranch, merge); 170 } 171 172 /** 173 * Returns the layout branch with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutBranchException} if it could not be found. 174 * 175 * @param LayoutBranchId the primary key of the layout branch 176 * @return the layout branch 177 * @throws com.liferay.portal.NoSuchLayoutBranchException if a layout branch with the primary key could not be found 178 * @throws SystemException if a system exception occurred 179 */ 180 public static com.liferay.portal.model.LayoutBranch findByPrimaryKey( 181 long LayoutBranchId) 182 throws com.liferay.portal.NoSuchLayoutBranchException, 183 com.liferay.portal.kernel.exception.SystemException { 184 return getPersistence().findByPrimaryKey(LayoutBranchId); 185 } 186 187 /** 188 * Returns the layout branch with the primary key or returns <code>null</code> if it could not be found. 189 * 190 * @param LayoutBranchId the primary key of the layout branch 191 * @return the layout branch, or <code>null</code> if a layout branch with the primary key could not be found 192 * @throws SystemException if a system exception occurred 193 */ 194 public static com.liferay.portal.model.LayoutBranch fetchByPrimaryKey( 195 long LayoutBranchId) 196 throws com.liferay.portal.kernel.exception.SystemException { 197 return getPersistence().fetchByPrimaryKey(LayoutBranchId); 198 } 199 200 /** 201 * Returns all the layout branchs where layoutSetBranchId = ?. 202 * 203 * @param layoutSetBranchId the layout set branch ID 204 * @return the matching layout branchs 205 * @throws SystemException if a system exception occurred 206 */ 207 public static java.util.List<com.liferay.portal.model.LayoutBranch> findByLayoutSetBranchId( 208 long layoutSetBranchId) 209 throws com.liferay.portal.kernel.exception.SystemException { 210 return getPersistence().findByLayoutSetBranchId(layoutSetBranchId); 211 } 212 213 /** 214 * Returns a range of all the layout branchs where layoutSetBranchId = ?. 215 * 216 * <p> 217 * 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. 218 * </p> 219 * 220 * @param layoutSetBranchId the layout set branch ID 221 * @param start the lower bound of the range of layout branchs 222 * @param end the upper bound of the range of layout branchs (not inclusive) 223 * @return the range of matching layout branchs 224 * @throws SystemException if a system exception occurred 225 */ 226 public static java.util.List<com.liferay.portal.model.LayoutBranch> findByLayoutSetBranchId( 227 long layoutSetBranchId, int start, int end) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return getPersistence() 230 .findByLayoutSetBranchId(layoutSetBranchId, start, end); 231 } 232 233 /** 234 * Returns an ordered range of all the layout branchs where layoutSetBranchId = ?. 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. 238 * </p> 239 * 240 * @param layoutSetBranchId the layout set branch ID 241 * @param start the lower bound of the range of layout branchs 242 * @param end the upper bound of the range of layout branchs (not inclusive) 243 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 244 * @return the ordered range of matching layout branchs 245 * @throws SystemException if a system exception occurred 246 */ 247 public static java.util.List<com.liferay.portal.model.LayoutBranch> findByLayoutSetBranchId( 248 long layoutSetBranchId, int start, int end, 249 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 250 throws com.liferay.portal.kernel.exception.SystemException { 251 return getPersistence() 252 .findByLayoutSetBranchId(layoutSetBranchId, start, end, 253 orderByComparator); 254 } 255 256 /** 257 * Returns the first layout branch in the ordered set where layoutSetBranchId = ?. 258 * 259 * <p> 260 * 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. 261 * </p> 262 * 263 * @param layoutSetBranchId the layout set branch ID 264 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 265 * @return the first matching layout branch 266 * @throws com.liferay.portal.NoSuchLayoutBranchException if a matching layout branch could not be found 267 * @throws SystemException if a system exception occurred 268 */ 269 public static com.liferay.portal.model.LayoutBranch findByLayoutSetBranchId_First( 270 long layoutSetBranchId, 271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 272 throws com.liferay.portal.NoSuchLayoutBranchException, 273 com.liferay.portal.kernel.exception.SystemException { 274 return getPersistence() 275 .findByLayoutSetBranchId_First(layoutSetBranchId, 276 orderByComparator); 277 } 278 279 /** 280 * Returns the last layout branch in the ordered set where layoutSetBranchId = ?. 281 * 282 * <p> 283 * 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. 284 * </p> 285 * 286 * @param layoutSetBranchId the layout set branch ID 287 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 288 * @return the last matching layout branch 289 * @throws com.liferay.portal.NoSuchLayoutBranchException if a matching layout branch could not be found 290 * @throws SystemException if a system exception occurred 291 */ 292 public static com.liferay.portal.model.LayoutBranch findByLayoutSetBranchId_Last( 293 long layoutSetBranchId, 294 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 295 throws com.liferay.portal.NoSuchLayoutBranchException, 296 com.liferay.portal.kernel.exception.SystemException { 297 return getPersistence() 298 .findByLayoutSetBranchId_Last(layoutSetBranchId, 299 orderByComparator); 300 } 301 302 /** 303 * Returns the layout branchs before and after the current layout branch in the ordered set where layoutSetBranchId = ?. 304 * 305 * <p> 306 * 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. 307 * </p> 308 * 309 * @param LayoutBranchId the primary key of the current layout branch 310 * @param layoutSetBranchId the layout set branch ID 311 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 312 * @return the previous, current, and next layout branch 313 * @throws com.liferay.portal.NoSuchLayoutBranchException if a layout branch with the primary key could not be found 314 * @throws SystemException if a system exception occurred 315 */ 316 public static com.liferay.portal.model.LayoutBranch[] findByLayoutSetBranchId_PrevAndNext( 317 long LayoutBranchId, long layoutSetBranchId, 318 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 319 throws com.liferay.portal.NoSuchLayoutBranchException, 320 com.liferay.portal.kernel.exception.SystemException { 321 return getPersistence() 322 .findByLayoutSetBranchId_PrevAndNext(LayoutBranchId, 323 layoutSetBranchId, orderByComparator); 324 } 325 326 /** 327 * Returns all the layout branchs where layoutSetBranchId = ? and plid = ?. 328 * 329 * @param layoutSetBranchId the layout set branch ID 330 * @param plid the plid 331 * @return the matching layout branchs 332 * @throws SystemException if a system exception occurred 333 */ 334 public static java.util.List<com.liferay.portal.model.LayoutBranch> findByL_P( 335 long layoutSetBranchId, long plid) 336 throws com.liferay.portal.kernel.exception.SystemException { 337 return getPersistence().findByL_P(layoutSetBranchId, plid); 338 } 339 340 /** 341 * Returns a range of all the layout branchs where layoutSetBranchId = ? and plid = ?. 342 * 343 * <p> 344 * 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. 345 * </p> 346 * 347 * @param layoutSetBranchId the layout set branch ID 348 * @param plid the plid 349 * @param start the lower bound of the range of layout branchs 350 * @param end the upper bound of the range of layout branchs (not inclusive) 351 * @return the range of matching layout branchs 352 * @throws SystemException if a system exception occurred 353 */ 354 public static java.util.List<com.liferay.portal.model.LayoutBranch> findByL_P( 355 long layoutSetBranchId, long plid, int start, int end) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 return getPersistence().findByL_P(layoutSetBranchId, plid, start, end); 358 } 359 360 /** 361 * Returns an ordered range of all the layout branchs where layoutSetBranchId = ? and plid = ?. 362 * 363 * <p> 364 * 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. 365 * </p> 366 * 367 * @param layoutSetBranchId the layout set branch ID 368 * @param plid the plid 369 * @param start the lower bound of the range of layout branchs 370 * @param end the upper bound of the range of layout branchs (not inclusive) 371 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 372 * @return the ordered range of matching layout branchs 373 * @throws SystemException if a system exception occurred 374 */ 375 public static java.util.List<com.liferay.portal.model.LayoutBranch> findByL_P( 376 long layoutSetBranchId, long plid, int start, int end, 377 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 378 throws com.liferay.portal.kernel.exception.SystemException { 379 return getPersistence() 380 .findByL_P(layoutSetBranchId, plid, start, end, 381 orderByComparator); 382 } 383 384 /** 385 * Returns the first layout branch in the ordered set where layoutSetBranchId = ? and plid = ?. 386 * 387 * <p> 388 * 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. 389 * </p> 390 * 391 * @param layoutSetBranchId the layout set branch ID 392 * @param plid the plid 393 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 394 * @return the first matching layout branch 395 * @throws com.liferay.portal.NoSuchLayoutBranchException if a matching layout branch could not be found 396 * @throws SystemException if a system exception occurred 397 */ 398 public static com.liferay.portal.model.LayoutBranch findByL_P_First( 399 long layoutSetBranchId, long plid, 400 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 401 throws com.liferay.portal.NoSuchLayoutBranchException, 402 com.liferay.portal.kernel.exception.SystemException { 403 return getPersistence() 404 .findByL_P_First(layoutSetBranchId, plid, orderByComparator); 405 } 406 407 /** 408 * Returns the last layout branch in the ordered set where layoutSetBranchId = ? and plid = ?. 409 * 410 * <p> 411 * 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. 412 * </p> 413 * 414 * @param layoutSetBranchId the layout set branch ID 415 * @param plid the plid 416 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 417 * @return the last matching layout branch 418 * @throws com.liferay.portal.NoSuchLayoutBranchException if a matching layout branch could not be found 419 * @throws SystemException if a system exception occurred 420 */ 421 public static com.liferay.portal.model.LayoutBranch findByL_P_Last( 422 long layoutSetBranchId, long plid, 423 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 424 throws com.liferay.portal.NoSuchLayoutBranchException, 425 com.liferay.portal.kernel.exception.SystemException { 426 return getPersistence() 427 .findByL_P_Last(layoutSetBranchId, plid, orderByComparator); 428 } 429 430 /** 431 * Returns the layout branchs before and after the current layout branch in the ordered set where layoutSetBranchId = ? and plid = ?. 432 * 433 * <p> 434 * 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. 435 * </p> 436 * 437 * @param LayoutBranchId the primary key of the current layout branch 438 * @param layoutSetBranchId the layout set branch ID 439 * @param plid the plid 440 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 441 * @return the previous, current, and next layout branch 442 * @throws com.liferay.portal.NoSuchLayoutBranchException if a layout branch with the primary key could not be found 443 * @throws SystemException if a system exception occurred 444 */ 445 public static com.liferay.portal.model.LayoutBranch[] findByL_P_PrevAndNext( 446 long LayoutBranchId, long layoutSetBranchId, long plid, 447 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 448 throws com.liferay.portal.NoSuchLayoutBranchException, 449 com.liferay.portal.kernel.exception.SystemException { 450 return getPersistence() 451 .findByL_P_PrevAndNext(LayoutBranchId, layoutSetBranchId, 452 plid, orderByComparator); 453 } 454 455 /** 456 * Returns the layout branch where layoutSetBranchId = ? and plid = ? and name = ? or throws a {@link com.liferay.portal.NoSuchLayoutBranchException} if it could not be found. 457 * 458 * @param layoutSetBranchId the layout set branch ID 459 * @param plid the plid 460 * @param name the name 461 * @return the matching layout branch 462 * @throws com.liferay.portal.NoSuchLayoutBranchException if a matching layout branch could not be found 463 * @throws SystemException if a system exception occurred 464 */ 465 public static com.liferay.portal.model.LayoutBranch findByL_P_N( 466 long layoutSetBranchId, long plid, java.lang.String name) 467 throws com.liferay.portal.NoSuchLayoutBranchException, 468 com.liferay.portal.kernel.exception.SystemException { 469 return getPersistence().findByL_P_N(layoutSetBranchId, plid, name); 470 } 471 472 /** 473 * Returns the layout branch where layoutSetBranchId = ? and plid = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 474 * 475 * @param layoutSetBranchId the layout set branch ID 476 * @param plid the plid 477 * @param name the name 478 * @return the matching layout branch, or <code>null</code> if a matching layout branch could not be found 479 * @throws SystemException if a system exception occurred 480 */ 481 public static com.liferay.portal.model.LayoutBranch fetchByL_P_N( 482 long layoutSetBranchId, long plid, java.lang.String name) 483 throws com.liferay.portal.kernel.exception.SystemException { 484 return getPersistence().fetchByL_P_N(layoutSetBranchId, plid, name); 485 } 486 487 /** 488 * Returns the layout branch where layoutSetBranchId = ? and plid = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 489 * 490 * @param layoutSetBranchId the layout set branch ID 491 * @param plid the plid 492 * @param name the name 493 * @param retrieveFromCache whether to use the finder cache 494 * @return the matching layout branch, or <code>null</code> if a matching layout branch could not be found 495 * @throws SystemException if a system exception occurred 496 */ 497 public static com.liferay.portal.model.LayoutBranch fetchByL_P_N( 498 long layoutSetBranchId, long plid, java.lang.String name, 499 boolean retrieveFromCache) 500 throws com.liferay.portal.kernel.exception.SystemException { 501 return getPersistence() 502 .fetchByL_P_N(layoutSetBranchId, plid, name, 503 retrieveFromCache); 504 } 505 506 /** 507 * Returns the layout branch where layoutSetBranchId = ? and plid = ? and master = ? or throws a {@link com.liferay.portal.NoSuchLayoutBranchException} if it could not be found. 508 * 509 * @param layoutSetBranchId the layout set branch ID 510 * @param plid the plid 511 * @param master the master 512 * @return the matching layout branch 513 * @throws com.liferay.portal.NoSuchLayoutBranchException if a matching layout branch could not be found 514 * @throws SystemException if a system exception occurred 515 */ 516 public static com.liferay.portal.model.LayoutBranch findByL_P_M( 517 long layoutSetBranchId, long plid, boolean master) 518 throws com.liferay.portal.NoSuchLayoutBranchException, 519 com.liferay.portal.kernel.exception.SystemException { 520 return getPersistence().findByL_P_M(layoutSetBranchId, plid, master); 521 } 522 523 /** 524 * Returns the layout branch where layoutSetBranchId = ? and plid = ? and master = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 525 * 526 * @param layoutSetBranchId the layout set branch ID 527 * @param plid the plid 528 * @param master the master 529 * @return the matching layout branch, or <code>null</code> if a matching layout branch could not be found 530 * @throws SystemException if a system exception occurred 531 */ 532 public static com.liferay.portal.model.LayoutBranch fetchByL_P_M( 533 long layoutSetBranchId, long plid, boolean master) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence().fetchByL_P_M(layoutSetBranchId, plid, master); 536 } 537 538 /** 539 * Returns the layout branch where layoutSetBranchId = ? and plid = ? and master = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 540 * 541 * @param layoutSetBranchId the layout set branch ID 542 * @param plid the plid 543 * @param master the master 544 * @param retrieveFromCache whether to use the finder cache 545 * @return the matching layout branch, or <code>null</code> if a matching layout branch could not be found 546 * @throws SystemException if a system exception occurred 547 */ 548 public static com.liferay.portal.model.LayoutBranch fetchByL_P_M( 549 long layoutSetBranchId, long plid, boolean master, 550 boolean retrieveFromCache) 551 throws com.liferay.portal.kernel.exception.SystemException { 552 return getPersistence() 553 .fetchByL_P_M(layoutSetBranchId, plid, master, 554 retrieveFromCache); 555 } 556 557 /** 558 * Returns all the layout branchs. 559 * 560 * @return the layout branchs 561 * @throws SystemException if a system exception occurred 562 */ 563 public static java.util.List<com.liferay.portal.model.LayoutBranch> findAll() 564 throws com.liferay.portal.kernel.exception.SystemException { 565 return getPersistence().findAll(); 566 } 567 568 /** 569 * Returns a range of all the layout branchs. 570 * 571 * <p> 572 * 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. 573 * </p> 574 * 575 * @param start the lower bound of the range of layout branchs 576 * @param end the upper bound of the range of layout branchs (not inclusive) 577 * @return the range of layout branchs 578 * @throws SystemException if a system exception occurred 579 */ 580 public static java.util.List<com.liferay.portal.model.LayoutBranch> findAll( 581 int start, int end) 582 throws com.liferay.portal.kernel.exception.SystemException { 583 return getPersistence().findAll(start, end); 584 } 585 586 /** 587 * Returns an ordered range of all the layout branchs. 588 * 589 * <p> 590 * 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. 591 * </p> 592 * 593 * @param start the lower bound of the range of layout branchs 594 * @param end the upper bound of the range of layout branchs (not inclusive) 595 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 596 * @return the ordered range of layout branchs 597 * @throws SystemException if a system exception occurred 598 */ 599 public static java.util.List<com.liferay.portal.model.LayoutBranch> findAll( 600 int start, int end, 601 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 602 throws com.liferay.portal.kernel.exception.SystemException { 603 return getPersistence().findAll(start, end, orderByComparator); 604 } 605 606 /** 607 * Removes all the layout branchs where layoutSetBranchId = ? from the database. 608 * 609 * @param layoutSetBranchId the layout set branch ID 610 * @throws SystemException if a system exception occurred 611 */ 612 public static void removeByLayoutSetBranchId(long layoutSetBranchId) 613 throws com.liferay.portal.kernel.exception.SystemException { 614 getPersistence().removeByLayoutSetBranchId(layoutSetBranchId); 615 } 616 617 /** 618 * Removes all the layout branchs where layoutSetBranchId = ? and plid = ? from the database. 619 * 620 * @param layoutSetBranchId the layout set branch ID 621 * @param plid the plid 622 * @throws SystemException if a system exception occurred 623 */ 624 public static void removeByL_P(long layoutSetBranchId, long plid) 625 throws com.liferay.portal.kernel.exception.SystemException { 626 getPersistence().removeByL_P(layoutSetBranchId, plid); 627 } 628 629 /** 630 * Removes the layout branch where layoutSetBranchId = ? and plid = ? and name = ? from the database. 631 * 632 * @param layoutSetBranchId the layout set branch ID 633 * @param plid the plid 634 * @param name the name 635 * @throws SystemException if a system exception occurred 636 */ 637 public static void removeByL_P_N(long layoutSetBranchId, long plid, 638 java.lang.String name) 639 throws com.liferay.portal.NoSuchLayoutBranchException, 640 com.liferay.portal.kernel.exception.SystemException { 641 getPersistence().removeByL_P_N(layoutSetBranchId, plid, name); 642 } 643 644 /** 645 * Removes the layout branch where layoutSetBranchId = ? and plid = ? and master = ? from the database. 646 * 647 * @param layoutSetBranchId the layout set branch ID 648 * @param plid the plid 649 * @param master the master 650 * @throws SystemException if a system exception occurred 651 */ 652 public static void removeByL_P_M(long layoutSetBranchId, long plid, 653 boolean master) 654 throws com.liferay.portal.NoSuchLayoutBranchException, 655 com.liferay.portal.kernel.exception.SystemException { 656 getPersistence().removeByL_P_M(layoutSetBranchId, plid, master); 657 } 658 659 /** 660 * Removes all the layout branchs from the database. 661 * 662 * @throws SystemException if a system exception occurred 663 */ 664 public static void removeAll() 665 throws com.liferay.portal.kernel.exception.SystemException { 666 getPersistence().removeAll(); 667 } 668 669 /** 670 * Returns the number of layout branchs where layoutSetBranchId = ?. 671 * 672 * @param layoutSetBranchId the layout set branch ID 673 * @return the number of matching layout branchs 674 * @throws SystemException if a system exception occurred 675 */ 676 public static int countByLayoutSetBranchId(long layoutSetBranchId) 677 throws com.liferay.portal.kernel.exception.SystemException { 678 return getPersistence().countByLayoutSetBranchId(layoutSetBranchId); 679 } 680 681 /** 682 * Returns the number of layout branchs where layoutSetBranchId = ? and plid = ?. 683 * 684 * @param layoutSetBranchId the layout set branch ID 685 * @param plid the plid 686 * @return the number of matching layout branchs 687 * @throws SystemException if a system exception occurred 688 */ 689 public static int countByL_P(long layoutSetBranchId, long plid) 690 throws com.liferay.portal.kernel.exception.SystemException { 691 return getPersistence().countByL_P(layoutSetBranchId, plid); 692 } 693 694 /** 695 * Returns the number of layout branchs where layoutSetBranchId = ? and plid = ? and name = ?. 696 * 697 * @param layoutSetBranchId the layout set branch ID 698 * @param plid the plid 699 * @param name the name 700 * @return the number of matching layout branchs 701 * @throws SystemException if a system exception occurred 702 */ 703 public static int countByL_P_N(long layoutSetBranchId, long plid, 704 java.lang.String name) 705 throws com.liferay.portal.kernel.exception.SystemException { 706 return getPersistence().countByL_P_N(layoutSetBranchId, plid, name); 707 } 708 709 /** 710 * Returns the number of layout branchs where layoutSetBranchId = ? and plid = ? and master = ?. 711 * 712 * @param layoutSetBranchId the layout set branch ID 713 * @param plid the plid 714 * @param master the master 715 * @return the number of matching layout branchs 716 * @throws SystemException if a system exception occurred 717 */ 718 public static int countByL_P_M(long layoutSetBranchId, long plid, 719 boolean master) 720 throws com.liferay.portal.kernel.exception.SystemException { 721 return getPersistence().countByL_P_M(layoutSetBranchId, plid, master); 722 } 723 724 /** 725 * Returns the number of layout branchs. 726 * 727 * @return the number of layout branchs 728 * @throws SystemException if a system exception occurred 729 */ 730 public static int countAll() 731 throws com.liferay.portal.kernel.exception.SystemException { 732 return getPersistence().countAll(); 733 } 734 735 public static LayoutBranchPersistence getPersistence() { 736 if (_persistence == null) { 737 _persistence = (LayoutBranchPersistence)PortalBeanLocatorUtil.locate(LayoutBranchPersistence.class.getName()); 738 739 ReferenceRegistry.registerReference(LayoutBranchUtil.class, 740 "_persistence"); 741 } 742 743 return _persistence; 744 } 745 746 public void setPersistence(LayoutBranchPersistence persistence) { 747 _persistence = persistence; 748 749 ReferenceRegistry.registerReference(LayoutBranchUtil.class, 750 "_persistence"); 751 } 752 753 private static LayoutBranchPersistence _persistence; 754 }