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