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