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