001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.PortletPreferences; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the portlet preferences service. This utility wraps {@link PortletPreferencesPersistenceImpl} 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 PortletPreferencesPersistence 036 * @see PortletPreferencesPersistenceImpl 037 * @generated 038 */ 039 public class PortletPreferencesUtil { 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(PortletPreferences portletPreferences) { 057 getPersistence().clearCache(portletPreferences); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<PortletPreferences> 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<PortletPreferences> 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<PortletPreferences> 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, boolean) 098 */ 099 public static PortletPreferences update( 100 PortletPreferences portletPreferences, boolean merge) 101 throws SystemException { 102 return getPersistence().update(portletPreferences, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static PortletPreferences update( 109 PortletPreferences portletPreferences, boolean merge, 110 ServiceContext serviceContext) throws SystemException { 111 return getPersistence().update(portletPreferences, merge, serviceContext); 112 } 113 114 /** 115 * Caches the portlet preferences in the entity cache if it is enabled. 116 * 117 * @param portletPreferences the portlet preferences 118 */ 119 public static void cacheResult( 120 com.liferay.portal.model.PortletPreferences portletPreferences) { 121 getPersistence().cacheResult(portletPreferences); 122 } 123 124 /** 125 * Caches the portlet preferenceses in the entity cache if it is enabled. 126 * 127 * @param portletPreferenceses the portlet preferenceses 128 */ 129 public static void cacheResult( 130 java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses) { 131 getPersistence().cacheResult(portletPreferenceses); 132 } 133 134 /** 135 * Creates a new portlet preferences with the primary key. Does not add the portlet preferences to the database. 136 * 137 * @param portletPreferencesId the primary key for the new portlet preferences 138 * @return the new portlet preferences 139 */ 140 public static com.liferay.portal.model.PortletPreferences create( 141 long portletPreferencesId) { 142 return getPersistence().create(portletPreferencesId); 143 } 144 145 /** 146 * Removes the portlet preferences with the primary key from the database. Also notifies the appropriate model listeners. 147 * 148 * @param portletPreferencesId the primary key of the portlet preferences 149 * @return the portlet preferences that was removed 150 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found 151 * @throws SystemException if a system exception occurred 152 */ 153 public static com.liferay.portal.model.PortletPreferences remove( 154 long portletPreferencesId) 155 throws com.liferay.portal.NoSuchPortletPreferencesException, 156 com.liferay.portal.kernel.exception.SystemException { 157 return getPersistence().remove(portletPreferencesId); 158 } 159 160 public static com.liferay.portal.model.PortletPreferences updateImpl( 161 com.liferay.portal.model.PortletPreferences portletPreferences, 162 boolean merge) 163 throws com.liferay.portal.kernel.exception.SystemException { 164 return getPersistence().updateImpl(portletPreferences, merge); 165 } 166 167 /** 168 * Returns the portlet preferences with the primary key or throws a {@link com.liferay.portal.NoSuchPortletPreferencesException} if it could not be found. 169 * 170 * @param portletPreferencesId the primary key of the portlet preferences 171 * @return the portlet preferences 172 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portal.model.PortletPreferences findByPrimaryKey( 176 long portletPreferencesId) 177 throws com.liferay.portal.NoSuchPortletPreferencesException, 178 com.liferay.portal.kernel.exception.SystemException { 179 return getPersistence().findByPrimaryKey(portletPreferencesId); 180 } 181 182 /** 183 * Returns the portlet preferences with the primary key or returns <code>null</code> if it could not be found. 184 * 185 * @param portletPreferencesId the primary key of the portlet preferences 186 * @return the portlet preferences, or <code>null</code> if a portlet preferences with the primary key could not be found 187 * @throws SystemException if a system exception occurred 188 */ 189 public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey( 190 long portletPreferencesId) 191 throws com.liferay.portal.kernel.exception.SystemException { 192 return getPersistence().fetchByPrimaryKey(portletPreferencesId); 193 } 194 195 /** 196 * Returns all the portlet preferenceses where plid = ?. 197 * 198 * @param plid the plid 199 * @return the matching portlet preferenceses 200 * @throws SystemException if a system exception occurred 201 */ 202 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid( 203 long plid) throws com.liferay.portal.kernel.exception.SystemException { 204 return getPersistence().findByPlid(plid); 205 } 206 207 /** 208 * Returns a range of all the portlet preferenceses where plid = ?. 209 * 210 * <p> 211 * 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. 212 * </p> 213 * 214 * @param plid the plid 215 * @param start the lower bound of the range of portlet preferenceses 216 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 217 * @return the range of matching portlet preferenceses 218 * @throws SystemException if a system exception occurred 219 */ 220 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid( 221 long plid, int start, int end) 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return getPersistence().findByPlid(plid, start, end); 224 } 225 226 /** 227 * Returns an ordered range of all the portlet preferenceses where plid = ?. 228 * 229 * <p> 230 * 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. 231 * </p> 232 * 233 * @param plid the plid 234 * @param start the lower bound of the range of portlet preferenceses 235 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 236 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 237 * @return the ordered range of matching portlet preferenceses 238 * @throws SystemException if a system exception occurred 239 */ 240 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid( 241 long plid, int start, int end, 242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 243 throws com.liferay.portal.kernel.exception.SystemException { 244 return getPersistence().findByPlid(plid, start, end, orderByComparator); 245 } 246 247 /** 248 * Returns the first portlet preferences in the ordered set where plid = ?. 249 * 250 * <p> 251 * 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. 252 * </p> 253 * 254 * @param plid the plid 255 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 256 * @return the first matching portlet preferences 257 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found 258 * @throws SystemException if a system exception occurred 259 */ 260 public static com.liferay.portal.model.PortletPreferences findByPlid_First( 261 long plid, 262 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 263 throws com.liferay.portal.NoSuchPortletPreferencesException, 264 com.liferay.portal.kernel.exception.SystemException { 265 return getPersistence().findByPlid_First(plid, orderByComparator); 266 } 267 268 /** 269 * Returns the last portlet preferences in the ordered set where plid = ?. 270 * 271 * <p> 272 * 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. 273 * </p> 274 * 275 * @param plid the plid 276 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 277 * @return the last matching portlet preferences 278 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found 279 * @throws SystemException if a system exception occurred 280 */ 281 public static com.liferay.portal.model.PortletPreferences findByPlid_Last( 282 long plid, 283 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 284 throws com.liferay.portal.NoSuchPortletPreferencesException, 285 com.liferay.portal.kernel.exception.SystemException { 286 return getPersistence().findByPlid_Last(plid, orderByComparator); 287 } 288 289 /** 290 * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = ?. 291 * 292 * <p> 293 * 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. 294 * </p> 295 * 296 * @param portletPreferencesId the primary key of the current portlet preferences 297 * @param plid the plid 298 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 299 * @return the previous, current, and next portlet preferences 300 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext( 304 long portletPreferencesId, long plid, 305 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 306 throws com.liferay.portal.NoSuchPortletPreferencesException, 307 com.liferay.portal.kernel.exception.SystemException { 308 return getPersistence() 309 .findByPlid_PrevAndNext(portletPreferencesId, plid, 310 orderByComparator); 311 } 312 313 /** 314 * Returns all the portlet preferenceses where plid = ? and portletId = ?. 315 * 316 * @param plid the plid 317 * @param portletId the portlet ID 318 * @return the matching portlet preferenceses 319 * @throws SystemException if a system exception occurred 320 */ 321 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P( 322 long plid, java.lang.String portletId) 323 throws com.liferay.portal.kernel.exception.SystemException { 324 return getPersistence().findByP_P(plid, portletId); 325 } 326 327 /** 328 * Returns a range of all the portlet preferenceses where plid = ? and portletId = ?. 329 * 330 * <p> 331 * 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. 332 * </p> 333 * 334 * @param plid the plid 335 * @param portletId the portlet ID 336 * @param start the lower bound of the range of portlet preferenceses 337 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 338 * @return the range of matching portlet preferenceses 339 * @throws SystemException if a system exception occurred 340 */ 341 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P( 342 long plid, java.lang.String portletId, int start, int end) 343 throws com.liferay.portal.kernel.exception.SystemException { 344 return getPersistence().findByP_P(plid, portletId, start, end); 345 } 346 347 /** 348 * Returns an ordered range of all the portlet preferenceses where plid = ? and portletId = ?. 349 * 350 * <p> 351 * 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. 352 * </p> 353 * 354 * @param plid the plid 355 * @param portletId the portlet ID 356 * @param start the lower bound of the range of portlet preferenceses 357 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 358 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 359 * @return the ordered range of matching portlet preferenceses 360 * @throws SystemException if a system exception occurred 361 */ 362 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P( 363 long plid, java.lang.String portletId, int start, int end, 364 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 365 throws com.liferay.portal.kernel.exception.SystemException { 366 return getPersistence() 367 .findByP_P(plid, portletId, start, end, orderByComparator); 368 } 369 370 /** 371 * Returns the first portlet preferences in the ordered set where plid = ? and portletId = ?. 372 * 373 * <p> 374 * 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. 375 * </p> 376 * 377 * @param plid the plid 378 * @param portletId the portlet ID 379 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 380 * @return the first matching portlet preferences 381 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found 382 * @throws SystemException if a system exception occurred 383 */ 384 public static com.liferay.portal.model.PortletPreferences findByP_P_First( 385 long plid, java.lang.String portletId, 386 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 387 throws com.liferay.portal.NoSuchPortletPreferencesException, 388 com.liferay.portal.kernel.exception.SystemException { 389 return getPersistence() 390 .findByP_P_First(plid, portletId, orderByComparator); 391 } 392 393 /** 394 * Returns the last portlet preferences in the ordered set where plid = ? and portletId = ?. 395 * 396 * <p> 397 * 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. 398 * </p> 399 * 400 * @param plid the plid 401 * @param portletId the portlet ID 402 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 403 * @return the last matching portlet preferences 404 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found 405 * @throws SystemException if a system exception occurred 406 */ 407 public static com.liferay.portal.model.PortletPreferences findByP_P_Last( 408 long plid, java.lang.String portletId, 409 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 410 throws com.liferay.portal.NoSuchPortletPreferencesException, 411 com.liferay.portal.kernel.exception.SystemException { 412 return getPersistence() 413 .findByP_P_Last(plid, portletId, orderByComparator); 414 } 415 416 /** 417 * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where plid = ? and portletId = ?. 418 * 419 * <p> 420 * 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. 421 * </p> 422 * 423 * @param portletPreferencesId the primary key of the current portlet preferences 424 * @param plid the plid 425 * @param portletId the portlet ID 426 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 427 * @return the previous, current, and next portlet preferences 428 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found 429 * @throws SystemException if a system exception occurred 430 */ 431 public static com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext( 432 long portletPreferencesId, long plid, java.lang.String portletId, 433 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 434 throws com.liferay.portal.NoSuchPortletPreferencesException, 435 com.liferay.portal.kernel.exception.SystemException { 436 return getPersistence() 437 .findByP_P_PrevAndNext(portletPreferencesId, plid, 438 portletId, orderByComparator); 439 } 440 441 /** 442 * Returns all the portlet preferenceses where ownerId = ? and ownerType = ? and plid = ?. 443 * 444 * @param ownerId the owner ID 445 * @param ownerType the owner type 446 * @param plid the plid 447 * @return the matching portlet preferenceses 448 * @throws SystemException if a system exception occurred 449 */ 450 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P( 451 long ownerId, int ownerType, long plid) 452 throws com.liferay.portal.kernel.exception.SystemException { 453 return getPersistence().findByO_O_P(ownerId, ownerType, plid); 454 } 455 456 /** 457 * Returns a range of all the portlet preferenceses where ownerId = ? and ownerType = ? and plid = ?. 458 * 459 * <p> 460 * 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. 461 * </p> 462 * 463 * @param ownerId the owner ID 464 * @param ownerType the owner type 465 * @param plid the plid 466 * @param start the lower bound of the range of portlet preferenceses 467 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 468 * @return the range of matching portlet preferenceses 469 * @throws SystemException if a system exception occurred 470 */ 471 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P( 472 long ownerId, int ownerType, long plid, int start, int end) 473 throws com.liferay.portal.kernel.exception.SystemException { 474 return getPersistence().findByO_O_P(ownerId, ownerType, plid, start, end); 475 } 476 477 /** 478 * Returns an ordered range of all the portlet preferenceses where ownerId = ? and ownerType = ? and plid = ?. 479 * 480 * <p> 481 * 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. 482 * </p> 483 * 484 * @param ownerId the owner ID 485 * @param ownerType the owner type 486 * @param plid the plid 487 * @param start the lower bound of the range of portlet preferenceses 488 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 489 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 490 * @return the ordered range of matching portlet preferenceses 491 * @throws SystemException if a system exception occurred 492 */ 493 public static java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P( 494 long ownerId, int ownerType, long plid, int start, int end, 495 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 496 throws com.liferay.portal.kernel.exception.SystemException { 497 return getPersistence() 498 .findByO_O_P(ownerId, ownerType, plid, start, end, 499 orderByComparator); 500 } 501 502 /** 503 * Returns the first portlet preferences in the ordered set where ownerId = ? and ownerType = ? and plid = ?. 504 * 505 * <p> 506 * 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. 507 * </p> 508 * 509 * @param ownerId the owner ID 510 * @param ownerType the owner type 511 * @param plid the plid 512 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 513 * @return the first matching portlet preferences 514 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found 515 * @throws SystemException if a system exception occurred 516 */ 517 public static com.liferay.portal.model.PortletPreferences findByO_O_P_First( 518 long ownerId, int ownerType, long plid, 519 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 520 throws com.liferay.portal.NoSuchPortletPreferencesException, 521 com.liferay.portal.kernel.exception.SystemException { 522 return getPersistence() 523 .findByO_O_P_First(ownerId, ownerType, plid, 524 orderByComparator); 525 } 526 527 /** 528 * Returns the last portlet preferences in the ordered set where ownerId = ? and ownerType = ? and plid = ?. 529 * 530 * <p> 531 * 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. 532 * </p> 533 * 534 * @param ownerId the owner ID 535 * @param ownerType the owner type 536 * @param plid the plid 537 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 538 * @return the last matching portlet preferences 539 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found 540 * @throws SystemException if a system exception occurred 541 */ 542 public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last( 543 long ownerId, int ownerType, long plid, 544 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 545 throws com.liferay.portal.NoSuchPortletPreferencesException, 546 com.liferay.portal.kernel.exception.SystemException { 547 return getPersistence() 548 .findByO_O_P_Last(ownerId, ownerType, plid, orderByComparator); 549 } 550 551 /** 552 * Returns the portlet preferenceses before and after the current portlet preferences in the ordered set where ownerId = ? and ownerType = ? and plid = ?. 553 * 554 * <p> 555 * 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. 556 * </p> 557 * 558 * @param portletPreferencesId the primary key of the current portlet preferences 559 * @param ownerId the owner ID 560 * @param ownerType the owner type 561 * @param plid the plid 562 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 563 * @return the previous, current, and next portlet preferences 564 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a portlet preferences with the primary key could not be found 565 * @throws SystemException if a system exception occurred 566 */ 567 public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext( 568 long portletPreferencesId, long ownerId, int ownerType, long plid, 569 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 570 throws com.liferay.portal.NoSuchPortletPreferencesException, 571 com.liferay.portal.kernel.exception.SystemException { 572 return getPersistence() 573 .findByO_O_P_PrevAndNext(portletPreferencesId, ownerId, 574 ownerType, plid, orderByComparator); 575 } 576 577 /** 578 * Returns the portlet preferences where ownerId = ? and ownerType = ? and plid = ? and portletId = ? or throws a {@link com.liferay.portal.NoSuchPortletPreferencesException} if it could not be found. 579 * 580 * @param ownerId the owner ID 581 * @param ownerType the owner type 582 * @param plid the plid 583 * @param portletId the portlet ID 584 * @return the matching portlet preferences 585 * @throws com.liferay.portal.NoSuchPortletPreferencesException if a matching portlet preferences could not be found 586 * @throws SystemException if a system exception occurred 587 */ 588 public static com.liferay.portal.model.PortletPreferences findByO_O_P_P( 589 long ownerId, int ownerType, long plid, java.lang.String portletId) 590 throws com.liferay.portal.NoSuchPortletPreferencesException, 591 com.liferay.portal.kernel.exception.SystemException { 592 return getPersistence() 593 .findByO_O_P_P(ownerId, ownerType, plid, portletId); 594 } 595 596 /** 597 * Returns the portlet preferences where ownerId = ? and ownerType = ? and plid = ? and portletId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 598 * 599 * @param ownerId the owner ID 600 * @param ownerType the owner type 601 * @param plid the plid 602 * @param portletId the portlet ID 603 * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found 604 * @throws SystemException if a system exception occurred 605 */ 606 public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P( 607 long ownerId, int ownerType, long plid, java.lang.String portletId) 608 throws com.liferay.portal.kernel.exception.SystemException { 609 return getPersistence() 610 .fetchByO_O_P_P(ownerId, ownerType, plid, portletId); 611 } 612 613 /** 614 * Returns the portlet preferences where ownerId = ? and ownerType = ? and plid = ? and portletId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 615 * 616 * @param ownerId the owner ID 617 * @param ownerType the owner type 618 * @param plid the plid 619 * @param portletId the portlet ID 620 * @param retrieveFromCache whether to use the finder cache 621 * @return the matching portlet preferences, or <code>null</code> if a matching portlet preferences could not be found 622 * @throws SystemException if a system exception occurred 623 */ 624 public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P( 625 long ownerId, int ownerType, long plid, java.lang.String portletId, 626 boolean retrieveFromCache) 627 throws com.liferay.portal.kernel.exception.SystemException { 628 return getPersistence() 629 .fetchByO_O_P_P(ownerId, ownerType, plid, portletId, 630 retrieveFromCache); 631 } 632 633 /** 634 * Returns all the portlet preferenceses. 635 * 636 * @return the portlet preferenceses 637 * @throws SystemException if a system exception occurred 638 */ 639 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll() 640 throws com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence().findAll(); 642 } 643 644 /** 645 * Returns a range of all the portlet preferenceses. 646 * 647 * <p> 648 * 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. 649 * </p> 650 * 651 * @param start the lower bound of the range of portlet preferenceses 652 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 653 * @return the range of portlet preferenceses 654 * @throws SystemException if a system exception occurred 655 */ 656 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll( 657 int start, int end) 658 throws com.liferay.portal.kernel.exception.SystemException { 659 return getPersistence().findAll(start, end); 660 } 661 662 /** 663 * Returns an ordered range of all the portlet preferenceses. 664 * 665 * <p> 666 * 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. 667 * </p> 668 * 669 * @param start the lower bound of the range of portlet preferenceses 670 * @param end the upper bound of the range of portlet preferenceses (not inclusive) 671 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 672 * @return the ordered range of portlet preferenceses 673 * @throws SystemException if a system exception occurred 674 */ 675 public static java.util.List<com.liferay.portal.model.PortletPreferences> findAll( 676 int start, int end, 677 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 678 throws com.liferay.portal.kernel.exception.SystemException { 679 return getPersistence().findAll(start, end, orderByComparator); 680 } 681 682 /** 683 * Removes all the portlet preferenceses where plid = ? from the database. 684 * 685 * @param plid the plid 686 * @throws SystemException if a system exception occurred 687 */ 688 public static void removeByPlid(long plid) 689 throws com.liferay.portal.kernel.exception.SystemException { 690 getPersistence().removeByPlid(plid); 691 } 692 693 /** 694 * Removes all the portlet preferenceses where plid = ? and portletId = ? from the database. 695 * 696 * @param plid the plid 697 * @param portletId the portlet ID 698 * @throws SystemException if a system exception occurred 699 */ 700 public static void removeByP_P(long plid, java.lang.String portletId) 701 throws com.liferay.portal.kernel.exception.SystemException { 702 getPersistence().removeByP_P(plid, portletId); 703 } 704 705 /** 706 * Removes all the portlet preferenceses where ownerId = ? and ownerType = ? and plid = ? from the database. 707 * 708 * @param ownerId the owner ID 709 * @param ownerType the owner type 710 * @param plid the plid 711 * @throws SystemException if a system exception occurred 712 */ 713 public static void removeByO_O_P(long ownerId, int ownerType, long plid) 714 throws com.liferay.portal.kernel.exception.SystemException { 715 getPersistence().removeByO_O_P(ownerId, ownerType, plid); 716 } 717 718 /** 719 * Removes the portlet preferences where ownerId = ? and ownerType = ? and plid = ? and portletId = ? from the database. 720 * 721 * @param ownerId the owner ID 722 * @param ownerType the owner type 723 * @param plid the plid 724 * @param portletId the portlet ID 725 * @throws SystemException if a system exception occurred 726 */ 727 public static void removeByO_O_P_P(long ownerId, int ownerType, long plid, 728 java.lang.String portletId) 729 throws com.liferay.portal.NoSuchPortletPreferencesException, 730 com.liferay.portal.kernel.exception.SystemException { 731 getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId); 732 } 733 734 /** 735 * Removes all the portlet preferenceses from the database. 736 * 737 * @throws SystemException if a system exception occurred 738 */ 739 public static void removeAll() 740 throws com.liferay.portal.kernel.exception.SystemException { 741 getPersistence().removeAll(); 742 } 743 744 /** 745 * Returns the number of portlet preferenceses where plid = ?. 746 * 747 * @param plid the plid 748 * @return the number of matching portlet preferenceses 749 * @throws SystemException if a system exception occurred 750 */ 751 public static int countByPlid(long plid) 752 throws com.liferay.portal.kernel.exception.SystemException { 753 return getPersistence().countByPlid(plid); 754 } 755 756 /** 757 * Returns the number of portlet preferenceses where plid = ? and portletId = ?. 758 * 759 * @param plid the plid 760 * @param portletId the portlet ID 761 * @return the number of matching portlet preferenceses 762 * @throws SystemException if a system exception occurred 763 */ 764 public static int countByP_P(long plid, java.lang.String portletId) 765 throws com.liferay.portal.kernel.exception.SystemException { 766 return getPersistence().countByP_P(plid, portletId); 767 } 768 769 /** 770 * Returns the number of portlet preferenceses where ownerId = ? and ownerType = ? and plid = ?. 771 * 772 * @param ownerId the owner ID 773 * @param ownerType the owner type 774 * @param plid the plid 775 * @return the number of matching portlet preferenceses 776 * @throws SystemException if a system exception occurred 777 */ 778 public static int countByO_O_P(long ownerId, int ownerType, long plid) 779 throws com.liferay.portal.kernel.exception.SystemException { 780 return getPersistence().countByO_O_P(ownerId, ownerType, plid); 781 } 782 783 /** 784 * Returns the number of portlet preferenceses where ownerId = ? and ownerType = ? and plid = ? and portletId = ?. 785 * 786 * @param ownerId the owner ID 787 * @param ownerType the owner type 788 * @param plid the plid 789 * @param portletId the portlet ID 790 * @return the number of matching portlet preferenceses 791 * @throws SystemException if a system exception occurred 792 */ 793 public static int countByO_O_P_P(long ownerId, int ownerType, long plid, 794 java.lang.String portletId) 795 throws com.liferay.portal.kernel.exception.SystemException { 796 return getPersistence() 797 .countByO_O_P_P(ownerId, ownerType, plid, portletId); 798 } 799 800 /** 801 * Returns the number of portlet preferenceses. 802 * 803 * @return the number of portlet preferenceses 804 * @throws SystemException if a system exception occurred 805 */ 806 public static int countAll() 807 throws com.liferay.portal.kernel.exception.SystemException { 808 return getPersistence().countAll(); 809 } 810 811 public static PortletPreferencesPersistence getPersistence() { 812 if (_persistence == null) { 813 _persistence = (PortletPreferencesPersistence)PortalBeanLocatorUtil.locate(PortletPreferencesPersistence.class.getName()); 814 815 ReferenceRegistry.registerReference(PortletPreferencesUtil.class, 816 "_persistence"); 817 } 818 819 return _persistence; 820 } 821 822 public void setPersistence(PortletPreferencesPersistence persistence) { 823 _persistence = persistence; 824 825 ReferenceRegistry.registerReference(PortletPreferencesUtil.class, 826 "_persistence"); 827 } 828 829 private static PortletPreferencesPersistence _persistence; 830 }