001 /** 002 * Copyright (c) 2000-2013 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.LayoutSet; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the layout set service. This utility wraps {@link LayoutSetPersistenceImpl} 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 LayoutSetPersistence 036 * @see LayoutSetPersistenceImpl 037 * @generated 038 */ 039 public class LayoutSetUtil { 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(LayoutSet layoutSet) { 057 getPersistence().clearCache(layoutSet); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public static 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<LayoutSet> 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<LayoutSet> 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<LayoutSet> 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#update(com.liferay.portal.model.BaseModel) 098 */ 099 public static LayoutSet update(LayoutSet layoutSet) 100 throws SystemException { 101 return getPersistence().update(layoutSet); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static LayoutSet update(LayoutSet layoutSet, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(layoutSet, serviceContext); 110 } 111 112 /** 113 * Returns all the layout sets where groupId = ?. 114 * 115 * @param groupId the group ID 116 * @return the matching layout sets 117 * @throws SystemException if a system exception occurred 118 */ 119 public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId( 120 long groupId) 121 throws com.liferay.portal.kernel.exception.SystemException { 122 return getPersistence().findByGroupId(groupId); 123 } 124 125 /** 126 * Returns a range of all the layout sets where groupId = ?. 127 * 128 * <p> 129 * 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.LayoutSetModelImpl}. 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. 130 * </p> 131 * 132 * @param groupId the group ID 133 * @param start the lower bound of the range of layout sets 134 * @param end the upper bound of the range of layout sets (not inclusive) 135 * @return the range of matching layout sets 136 * @throws SystemException if a system exception occurred 137 */ 138 public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId( 139 long groupId, int start, int end) 140 throws com.liferay.portal.kernel.exception.SystemException { 141 return getPersistence().findByGroupId(groupId, start, end); 142 } 143 144 /** 145 * Returns an ordered range of all the layout sets where groupId = ?. 146 * 147 * <p> 148 * 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.LayoutSetModelImpl}. 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. 149 * </p> 150 * 151 * @param groupId the group ID 152 * @param start the lower bound of the range of layout sets 153 * @param end the upper bound of the range of layout sets (not inclusive) 154 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 155 * @return the ordered range of matching layout sets 156 * @throws SystemException if a system exception occurred 157 */ 158 public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId( 159 long groupId, int start, int end, 160 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence() 163 .findByGroupId(groupId, start, end, orderByComparator); 164 } 165 166 /** 167 * Returns the first layout set in the ordered set where groupId = ?. 168 * 169 * @param groupId the group ID 170 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 171 * @return the first matching layout set 172 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portal.model.LayoutSet findByGroupId_First( 176 long groupId, 177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 178 throws com.liferay.portal.NoSuchLayoutSetException, 179 com.liferay.portal.kernel.exception.SystemException { 180 return getPersistence().findByGroupId_First(groupId, orderByComparator); 181 } 182 183 /** 184 * Returns the first layout set in the ordered set where groupId = ?. 185 * 186 * @param groupId the group ID 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the first matching layout set, or <code>null</code> if a matching layout set could not be found 189 * @throws SystemException if a system exception occurred 190 */ 191 public static com.liferay.portal.model.LayoutSet fetchByGroupId_First( 192 long groupId, 193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 194 throws com.liferay.portal.kernel.exception.SystemException { 195 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 196 } 197 198 /** 199 * Returns the last layout set in the ordered set where groupId = ?. 200 * 201 * @param groupId the group ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the last matching layout set 204 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public static com.liferay.portal.model.LayoutSet findByGroupId_Last( 208 long groupId, 209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 210 throws com.liferay.portal.NoSuchLayoutSetException, 211 com.liferay.portal.kernel.exception.SystemException { 212 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 213 } 214 215 /** 216 * Returns the last layout set in the ordered set where groupId = ?. 217 * 218 * @param groupId the group ID 219 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 220 * @return the last matching layout set, or <code>null</code> if a matching layout set could not be found 221 * @throws SystemException if a system exception occurred 222 */ 223 public static com.liferay.portal.model.LayoutSet fetchByGroupId_Last( 224 long groupId, 225 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 226 throws com.liferay.portal.kernel.exception.SystemException { 227 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 228 } 229 230 /** 231 * Returns the layout sets before and after the current layout set in the ordered set where groupId = ?. 232 * 233 * @param layoutSetId the primary key of the current layout set 234 * @param groupId the group ID 235 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 236 * @return the previous, current, and next layout set 237 * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found 238 * @throws SystemException if a system exception occurred 239 */ 240 public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext( 241 long layoutSetId, long groupId, 242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 243 throws com.liferay.portal.NoSuchLayoutSetException, 244 com.liferay.portal.kernel.exception.SystemException { 245 return getPersistence() 246 .findByGroupId_PrevAndNext(layoutSetId, groupId, 247 orderByComparator); 248 } 249 250 /** 251 * Removes all the layout sets where groupId = ? from the database. 252 * 253 * @param groupId the group ID 254 * @throws SystemException if a system exception occurred 255 */ 256 public static void removeByGroupId(long groupId) 257 throws com.liferay.portal.kernel.exception.SystemException { 258 getPersistence().removeByGroupId(groupId); 259 } 260 261 /** 262 * Returns the number of layout sets where groupId = ?. 263 * 264 * @param groupId the group ID 265 * @return the number of matching layout sets 266 * @throws SystemException if a system exception occurred 267 */ 268 public static int countByGroupId(long groupId) 269 throws com.liferay.portal.kernel.exception.SystemException { 270 return getPersistence().countByGroupId(groupId); 271 } 272 273 /** 274 * Returns all the layout sets where layoutSetPrototypeUuid = ?. 275 * 276 * @param layoutSetPrototypeUuid the layout set prototype uuid 277 * @return the matching layout sets 278 * @throws SystemException if a system exception occurred 279 */ 280 public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid( 281 java.lang.String layoutSetPrototypeUuid) 282 throws com.liferay.portal.kernel.exception.SystemException { 283 return getPersistence() 284 .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid); 285 } 286 287 /** 288 * Returns a range of all the layout sets where layoutSetPrototypeUuid = ?. 289 * 290 * <p> 291 * 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.LayoutSetModelImpl}. 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. 292 * </p> 293 * 294 * @param layoutSetPrototypeUuid the layout set prototype uuid 295 * @param start the lower bound of the range of layout sets 296 * @param end the upper bound of the range of layout sets (not inclusive) 297 * @return the range of matching layout sets 298 * @throws SystemException if a system exception occurred 299 */ 300 public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid( 301 java.lang.String layoutSetPrototypeUuid, int start, int end) 302 throws com.liferay.portal.kernel.exception.SystemException { 303 return getPersistence() 304 .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start, 305 end); 306 } 307 308 /** 309 * Returns an ordered range of all the layout sets where layoutSetPrototypeUuid = ?. 310 * 311 * <p> 312 * 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.LayoutSetModelImpl}. 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. 313 * </p> 314 * 315 * @param layoutSetPrototypeUuid the layout set prototype uuid 316 * @param start the lower bound of the range of layout sets 317 * @param end the upper bound of the range of layout sets (not inclusive) 318 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 319 * @return the ordered range of matching layout sets 320 * @throws SystemException if a system exception occurred 321 */ 322 public static java.util.List<com.liferay.portal.model.LayoutSet> findByLayoutSetPrototypeUuid( 323 java.lang.String layoutSetPrototypeUuid, int start, int end, 324 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 325 throws com.liferay.portal.kernel.exception.SystemException { 326 return getPersistence() 327 .findByLayoutSetPrototypeUuid(layoutSetPrototypeUuid, start, 328 end, orderByComparator); 329 } 330 331 /** 332 * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = ?. 333 * 334 * @param layoutSetPrototypeUuid the layout set prototype uuid 335 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 336 * @return the first matching layout set 337 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 338 * @throws SystemException if a system exception occurred 339 */ 340 public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_First( 341 java.lang.String layoutSetPrototypeUuid, 342 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 343 throws com.liferay.portal.NoSuchLayoutSetException, 344 com.liferay.portal.kernel.exception.SystemException { 345 return getPersistence() 346 .findByLayoutSetPrototypeUuid_First(layoutSetPrototypeUuid, 347 orderByComparator); 348 } 349 350 /** 351 * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = ?. 352 * 353 * @param layoutSetPrototypeUuid the layout set prototype uuid 354 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 355 * @return the first matching layout set, or <code>null</code> if a matching layout set could not be found 356 * @throws SystemException if a system exception occurred 357 */ 358 public static com.liferay.portal.model.LayoutSet fetchByLayoutSetPrototypeUuid_First( 359 java.lang.String layoutSetPrototypeUuid, 360 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 361 throws com.liferay.portal.kernel.exception.SystemException { 362 return getPersistence() 363 .fetchByLayoutSetPrototypeUuid_First(layoutSetPrototypeUuid, 364 orderByComparator); 365 } 366 367 /** 368 * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = ?. 369 * 370 * @param layoutSetPrototypeUuid the layout set prototype uuid 371 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 372 * @return the last matching layout set 373 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 374 * @throws SystemException if a system exception occurred 375 */ 376 public static com.liferay.portal.model.LayoutSet findByLayoutSetPrototypeUuid_Last( 377 java.lang.String layoutSetPrototypeUuid, 378 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 379 throws com.liferay.portal.NoSuchLayoutSetException, 380 com.liferay.portal.kernel.exception.SystemException { 381 return getPersistence() 382 .findByLayoutSetPrototypeUuid_Last(layoutSetPrototypeUuid, 383 orderByComparator); 384 } 385 386 /** 387 * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = ?. 388 * 389 * @param layoutSetPrototypeUuid the layout set prototype uuid 390 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 391 * @return the last matching layout set, or <code>null</code> if a matching layout set could not be found 392 * @throws SystemException if a system exception occurred 393 */ 394 public static com.liferay.portal.model.LayoutSet fetchByLayoutSetPrototypeUuid_Last( 395 java.lang.String layoutSetPrototypeUuid, 396 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 397 throws com.liferay.portal.kernel.exception.SystemException { 398 return getPersistence() 399 .fetchByLayoutSetPrototypeUuid_Last(layoutSetPrototypeUuid, 400 orderByComparator); 401 } 402 403 /** 404 * Returns the layout sets before and after the current layout set in the ordered set where layoutSetPrototypeUuid = ?. 405 * 406 * @param layoutSetId the primary key of the current layout set 407 * @param layoutSetPrototypeUuid the layout set prototype uuid 408 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 409 * @return the previous, current, and next layout set 410 * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found 411 * @throws SystemException if a system exception occurred 412 */ 413 public static com.liferay.portal.model.LayoutSet[] findByLayoutSetPrototypeUuid_PrevAndNext( 414 long layoutSetId, java.lang.String layoutSetPrototypeUuid, 415 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 416 throws com.liferay.portal.NoSuchLayoutSetException, 417 com.liferay.portal.kernel.exception.SystemException { 418 return getPersistence() 419 .findByLayoutSetPrototypeUuid_PrevAndNext(layoutSetId, 420 layoutSetPrototypeUuid, orderByComparator); 421 } 422 423 /** 424 * Removes all the layout sets where layoutSetPrototypeUuid = ? from the database. 425 * 426 * @param layoutSetPrototypeUuid the layout set prototype uuid 427 * @throws SystemException if a system exception occurred 428 */ 429 public static void removeByLayoutSetPrototypeUuid( 430 java.lang.String layoutSetPrototypeUuid) 431 throws com.liferay.portal.kernel.exception.SystemException { 432 getPersistence().removeByLayoutSetPrototypeUuid(layoutSetPrototypeUuid); 433 } 434 435 /** 436 * Returns the number of layout sets where layoutSetPrototypeUuid = ?. 437 * 438 * @param layoutSetPrototypeUuid the layout set prototype uuid 439 * @return the number of matching layout sets 440 * @throws SystemException if a system exception occurred 441 */ 442 public static int countByLayoutSetPrototypeUuid( 443 java.lang.String layoutSetPrototypeUuid) 444 throws com.liferay.portal.kernel.exception.SystemException { 445 return getPersistence() 446 .countByLayoutSetPrototypeUuid(layoutSetPrototypeUuid); 447 } 448 449 /** 450 * Returns the layout set where groupId = ? and privateLayout = ? or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found. 451 * 452 * @param groupId the group ID 453 * @param privateLayout the private layout 454 * @return the matching layout set 455 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 456 * @throws SystemException if a system exception occurred 457 */ 458 public static com.liferay.portal.model.LayoutSet findByG_P(long groupId, 459 boolean privateLayout) 460 throws com.liferay.portal.NoSuchLayoutSetException, 461 com.liferay.portal.kernel.exception.SystemException { 462 return getPersistence().findByG_P(groupId, privateLayout); 463 } 464 465 /** 466 * Returns the layout set where groupId = ? and privateLayout = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 467 * 468 * @param groupId the group ID 469 * @param privateLayout the private layout 470 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 471 * @throws SystemException if a system exception occurred 472 */ 473 public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId, 474 boolean privateLayout) 475 throws com.liferay.portal.kernel.exception.SystemException { 476 return getPersistence().fetchByG_P(groupId, privateLayout); 477 } 478 479 /** 480 * Returns the layout set where groupId = ? and privateLayout = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 481 * 482 * @param groupId the group ID 483 * @param privateLayout the private layout 484 * @param retrieveFromCache whether to use the finder cache 485 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 486 * @throws SystemException if a system exception occurred 487 */ 488 public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId, 489 boolean privateLayout, boolean retrieveFromCache) 490 throws com.liferay.portal.kernel.exception.SystemException { 491 return getPersistence() 492 .fetchByG_P(groupId, privateLayout, retrieveFromCache); 493 } 494 495 /** 496 * Removes the layout set where groupId = ? and privateLayout = ? from the database. 497 * 498 * @param groupId the group ID 499 * @param privateLayout the private layout 500 * @return the layout set that was removed 501 * @throws SystemException if a system exception occurred 502 */ 503 public static com.liferay.portal.model.LayoutSet removeByG_P(long groupId, 504 boolean privateLayout) 505 throws com.liferay.portal.NoSuchLayoutSetException, 506 com.liferay.portal.kernel.exception.SystemException { 507 return getPersistence().removeByG_P(groupId, privateLayout); 508 } 509 510 /** 511 * Returns the number of layout sets where groupId = ? and privateLayout = ?. 512 * 513 * @param groupId the group ID 514 * @param privateLayout the private layout 515 * @return the number of matching layout sets 516 * @throws SystemException if a system exception occurred 517 */ 518 public static int countByG_P(long groupId, boolean privateLayout) 519 throws com.liferay.portal.kernel.exception.SystemException { 520 return getPersistence().countByG_P(groupId, privateLayout); 521 } 522 523 /** 524 * Caches the layout set in the entity cache if it is enabled. 525 * 526 * @param layoutSet the layout set 527 */ 528 public static void cacheResult(com.liferay.portal.model.LayoutSet layoutSet) { 529 getPersistence().cacheResult(layoutSet); 530 } 531 532 /** 533 * Caches the layout sets in the entity cache if it is enabled. 534 * 535 * @param layoutSets the layout sets 536 */ 537 public static void cacheResult( 538 java.util.List<com.liferay.portal.model.LayoutSet> layoutSets) { 539 getPersistence().cacheResult(layoutSets); 540 } 541 542 /** 543 * Creates a new layout set with the primary key. Does not add the layout set to the database. 544 * 545 * @param layoutSetId the primary key for the new layout set 546 * @return the new layout set 547 */ 548 public static com.liferay.portal.model.LayoutSet create(long layoutSetId) { 549 return getPersistence().create(layoutSetId); 550 } 551 552 /** 553 * Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners. 554 * 555 * @param layoutSetId the primary key of the layout set 556 * @return the layout set that was removed 557 * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found 558 * @throws SystemException if a system exception occurred 559 */ 560 public static com.liferay.portal.model.LayoutSet remove(long layoutSetId) 561 throws com.liferay.portal.NoSuchLayoutSetException, 562 com.liferay.portal.kernel.exception.SystemException { 563 return getPersistence().remove(layoutSetId); 564 } 565 566 public static com.liferay.portal.model.LayoutSet updateImpl( 567 com.liferay.portal.model.LayoutSet layoutSet) 568 throws com.liferay.portal.kernel.exception.SystemException { 569 return getPersistence().updateImpl(layoutSet); 570 } 571 572 /** 573 * Returns the layout set with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found. 574 * 575 * @param layoutSetId the primary key of the layout set 576 * @return the layout set 577 * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found 578 * @throws SystemException if a system exception occurred 579 */ 580 public static com.liferay.portal.model.LayoutSet findByPrimaryKey( 581 long layoutSetId) 582 throws com.liferay.portal.NoSuchLayoutSetException, 583 com.liferay.portal.kernel.exception.SystemException { 584 return getPersistence().findByPrimaryKey(layoutSetId); 585 } 586 587 /** 588 * Returns the layout set with the primary key or returns <code>null</code> if it could not be found. 589 * 590 * @param layoutSetId the primary key of the layout set 591 * @return the layout set, or <code>null</code> if a layout set with the primary key could not be found 592 * @throws SystemException if a system exception occurred 593 */ 594 public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey( 595 long layoutSetId) 596 throws com.liferay.portal.kernel.exception.SystemException { 597 return getPersistence().fetchByPrimaryKey(layoutSetId); 598 } 599 600 /** 601 * Returns all the layout sets. 602 * 603 * @return the layout sets 604 * @throws SystemException if a system exception occurred 605 */ 606 public static java.util.List<com.liferay.portal.model.LayoutSet> findAll() 607 throws com.liferay.portal.kernel.exception.SystemException { 608 return getPersistence().findAll(); 609 } 610 611 /** 612 * Returns a range of all the layout sets. 613 * 614 * <p> 615 * 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.LayoutSetModelImpl}. 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. 616 * </p> 617 * 618 * @param start the lower bound of the range of layout sets 619 * @param end the upper bound of the range of layout sets (not inclusive) 620 * @return the range of layout sets 621 * @throws SystemException if a system exception occurred 622 */ 623 public static java.util.List<com.liferay.portal.model.LayoutSet> findAll( 624 int start, int end) 625 throws com.liferay.portal.kernel.exception.SystemException { 626 return getPersistence().findAll(start, end); 627 } 628 629 /** 630 * Returns an ordered range of all the layout sets. 631 * 632 * <p> 633 * 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.LayoutSetModelImpl}. 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. 634 * </p> 635 * 636 * @param start the lower bound of the range of layout sets 637 * @param end the upper bound of the range of layout sets (not inclusive) 638 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 639 * @return the ordered range of layout sets 640 * @throws SystemException if a system exception occurred 641 */ 642 public static java.util.List<com.liferay.portal.model.LayoutSet> findAll( 643 int start, int end, 644 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 645 throws com.liferay.portal.kernel.exception.SystemException { 646 return getPersistence().findAll(start, end, orderByComparator); 647 } 648 649 /** 650 * Removes all the layout sets from the database. 651 * 652 * @throws SystemException if a system exception occurred 653 */ 654 public static void removeAll() 655 throws com.liferay.portal.kernel.exception.SystemException { 656 getPersistence().removeAll(); 657 } 658 659 /** 660 * Returns the number of layout sets. 661 * 662 * @return the number of layout sets 663 * @throws SystemException if a system exception occurred 664 */ 665 public static int countAll() 666 throws com.liferay.portal.kernel.exception.SystemException { 667 return getPersistence().countAll(); 668 } 669 670 public static LayoutSetPersistence getPersistence() { 671 if (_persistence == null) { 672 _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName()); 673 674 ReferenceRegistry.registerReference(LayoutSetUtil.class, 675 "_persistence"); 676 } 677 678 return _persistence; 679 } 680 681 /** 682 * @deprecated As of 6.2.0 683 */ 684 public void setPersistence(LayoutSetPersistence persistence) { 685 } 686 687 private static LayoutSetPersistence _persistence; 688 }