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