001 /** 002 * Copyright (c) 2000-2012 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.PortletItem; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the portlet item service. This utility wraps {@link PortletItemPersistenceImpl} 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 PortletItemPersistence 036 * @see PortletItemPersistenceImpl 037 * @generated 038 */ 039 public class PortletItemUtil { 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(PortletItem portletItem) { 057 getPersistence().clearCache(portletItem); 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<PortletItem> 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<PortletItem> 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<PortletItem> 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 PortletItem update(PortletItem portletItem, boolean merge) 100 throws SystemException { 101 return getPersistence().update(portletItem, merge); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 106 */ 107 public static PortletItem update(PortletItem portletItem, boolean merge, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(portletItem, merge, serviceContext); 110 } 111 112 /** 113 * Caches the portlet item in the entity cache if it is enabled. 114 * 115 * @param portletItem the portlet item 116 */ 117 public static void cacheResult( 118 com.liferay.portal.model.PortletItem portletItem) { 119 getPersistence().cacheResult(portletItem); 120 } 121 122 /** 123 * Caches the portlet items in the entity cache if it is enabled. 124 * 125 * @param portletItems the portlet items 126 */ 127 public static void cacheResult( 128 java.util.List<com.liferay.portal.model.PortletItem> portletItems) { 129 getPersistence().cacheResult(portletItems); 130 } 131 132 /** 133 * Creates a new portlet item with the primary key. Does not add the portlet item to the database. 134 * 135 * @param portletItemId the primary key for the new portlet item 136 * @return the new portlet item 137 */ 138 public static com.liferay.portal.model.PortletItem create( 139 long portletItemId) { 140 return getPersistence().create(portletItemId); 141 } 142 143 /** 144 * Removes the portlet item with the primary key from the database. Also notifies the appropriate model listeners. 145 * 146 * @param portletItemId the primary key of the portlet item 147 * @return the portlet item that was removed 148 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public static com.liferay.portal.model.PortletItem remove( 152 long portletItemId) 153 throws com.liferay.portal.NoSuchPortletItemException, 154 com.liferay.portal.kernel.exception.SystemException { 155 return getPersistence().remove(portletItemId); 156 } 157 158 public static com.liferay.portal.model.PortletItem updateImpl( 159 com.liferay.portal.model.PortletItem portletItem, boolean merge) 160 throws com.liferay.portal.kernel.exception.SystemException { 161 return getPersistence().updateImpl(portletItem, merge); 162 } 163 164 /** 165 * Returns the portlet item with the primary key or throws a {@link com.liferay.portal.NoSuchPortletItemException} if it could not be found. 166 * 167 * @param portletItemId the primary key of the portlet item 168 * @return the portlet item 169 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public static com.liferay.portal.model.PortletItem findByPrimaryKey( 173 long portletItemId) 174 throws com.liferay.portal.NoSuchPortletItemException, 175 com.liferay.portal.kernel.exception.SystemException { 176 return getPersistence().findByPrimaryKey(portletItemId); 177 } 178 179 /** 180 * Returns the portlet item with the primary key or returns <code>null</code> if it could not be found. 181 * 182 * @param portletItemId the primary key of the portlet item 183 * @return the portlet item, or <code>null</code> if a portlet item with the primary key could not be found 184 * @throws SystemException if a system exception occurred 185 */ 186 public static com.liferay.portal.model.PortletItem fetchByPrimaryKey( 187 long portletItemId) 188 throws com.liferay.portal.kernel.exception.SystemException { 189 return getPersistence().fetchByPrimaryKey(portletItemId); 190 } 191 192 /** 193 * Returns all the portlet items where groupId = ? and classNameId = ?. 194 * 195 * @param groupId the group ID 196 * @param classNameId the class name ID 197 * @return the matching portlet items 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C( 201 long groupId, long classNameId) 202 throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByG_C(groupId, classNameId); 204 } 205 206 /** 207 * Returns a range of all the portlet items where groupId = ? and classNameId = ?. 208 * 209 * <p> 210 * 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. 211 * </p> 212 * 213 * @param groupId the group ID 214 * @param classNameId the class name ID 215 * @param start the lower bound of the range of portlet items 216 * @param end the upper bound of the range of portlet items (not inclusive) 217 * @return the range of matching portlet items 218 * @throws SystemException if a system exception occurred 219 */ 220 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C( 221 long groupId, long classNameId, int start, int end) 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return getPersistence().findByG_C(groupId, classNameId, start, end); 224 } 225 226 /** 227 * Returns an ordered range of all the portlet items where groupId = ? and classNameId = ?. 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 groupId the group ID 234 * @param classNameId the class name ID 235 * @param start the lower bound of the range of portlet items 236 * @param end the upper bound of the range of portlet items (not inclusive) 237 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 238 * @return the ordered range of matching portlet items 239 * @throws SystemException if a system exception occurred 240 */ 241 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C( 242 long groupId, long classNameId, int start, int end, 243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 244 throws com.liferay.portal.kernel.exception.SystemException { 245 return getPersistence() 246 .findByG_C(groupId, classNameId, start, end, 247 orderByComparator); 248 } 249 250 /** 251 * Returns the first portlet item in the ordered set where groupId = ? and classNameId = ?. 252 * 253 * <p> 254 * 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. 255 * </p> 256 * 257 * @param groupId the group ID 258 * @param classNameId the class name ID 259 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 260 * @return the first matching portlet item 261 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 262 * @throws SystemException if a system exception occurred 263 */ 264 public static com.liferay.portal.model.PortletItem findByG_C_First( 265 long groupId, long classNameId, 266 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 267 throws com.liferay.portal.NoSuchPortletItemException, 268 com.liferay.portal.kernel.exception.SystemException { 269 return getPersistence() 270 .findByG_C_First(groupId, classNameId, orderByComparator); 271 } 272 273 /** 274 * Returns the last portlet item in the ordered set where groupId = ? and classNameId = ?. 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 groupId the group ID 281 * @param classNameId the class name ID 282 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 283 * @return the last matching portlet item 284 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 285 * @throws SystemException if a system exception occurred 286 */ 287 public static com.liferay.portal.model.PortletItem findByG_C_Last( 288 long groupId, long classNameId, 289 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 290 throws com.liferay.portal.NoSuchPortletItemException, 291 com.liferay.portal.kernel.exception.SystemException { 292 return getPersistence() 293 .findByG_C_Last(groupId, classNameId, orderByComparator); 294 } 295 296 /** 297 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and classNameId = ?. 298 * 299 * <p> 300 * 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. 301 * </p> 302 * 303 * @param portletItemId the primary key of the current portlet item 304 * @param groupId the group ID 305 * @param classNameId the class name ID 306 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 307 * @return the previous, current, and next portlet item 308 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 309 * @throws SystemException if a system exception occurred 310 */ 311 public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext( 312 long portletItemId, long groupId, long classNameId, 313 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 314 throws com.liferay.portal.NoSuchPortletItemException, 315 com.liferay.portal.kernel.exception.SystemException { 316 return getPersistence() 317 .findByG_C_PrevAndNext(portletItemId, groupId, classNameId, 318 orderByComparator); 319 } 320 321 /** 322 * Returns all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 323 * 324 * @param groupId the group ID 325 * @param portletId the portlet ID 326 * @param classNameId the class name ID 327 * @return the matching portlet items 328 * @throws SystemException if a system exception occurred 329 */ 330 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 331 long groupId, java.lang.String portletId, long classNameId) 332 throws com.liferay.portal.kernel.exception.SystemException { 333 return getPersistence().findByG_P_C(groupId, portletId, classNameId); 334 } 335 336 /** 337 * Returns a range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 338 * 339 * <p> 340 * 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. 341 * </p> 342 * 343 * @param groupId the group ID 344 * @param portletId the portlet ID 345 * @param classNameId the class name ID 346 * @param start the lower bound of the range of portlet items 347 * @param end the upper bound of the range of portlet items (not inclusive) 348 * @return the range of matching portlet items 349 * @throws SystemException if a system exception occurred 350 */ 351 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 352 long groupId, java.lang.String portletId, long classNameId, int start, 353 int end) throws com.liferay.portal.kernel.exception.SystemException { 354 return getPersistence() 355 .findByG_P_C(groupId, portletId, classNameId, start, end); 356 } 357 358 /** 359 * Returns an ordered range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 360 * 361 * <p> 362 * 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. 363 * </p> 364 * 365 * @param groupId the group ID 366 * @param portletId the portlet ID 367 * @param classNameId the class name ID 368 * @param start the lower bound of the range of portlet items 369 * @param end the upper bound of the range of portlet items (not inclusive) 370 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 371 * @return the ordered range of matching portlet items 372 * @throws SystemException if a system exception occurred 373 */ 374 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 375 long groupId, java.lang.String portletId, long classNameId, int start, 376 int end, 377 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 378 throws com.liferay.portal.kernel.exception.SystemException { 379 return getPersistence() 380 .findByG_P_C(groupId, portletId, classNameId, start, end, 381 orderByComparator); 382 } 383 384 /** 385 * Returns the first portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 386 * 387 * <p> 388 * 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. 389 * </p> 390 * 391 * @param groupId the group ID 392 * @param portletId the portlet ID 393 * @param classNameId the class name ID 394 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 395 * @return the first matching portlet item 396 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 397 * @throws SystemException if a system exception occurred 398 */ 399 public static com.liferay.portal.model.PortletItem findByG_P_C_First( 400 long groupId, java.lang.String portletId, long classNameId, 401 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 402 throws com.liferay.portal.NoSuchPortletItemException, 403 com.liferay.portal.kernel.exception.SystemException { 404 return getPersistence() 405 .findByG_P_C_First(groupId, portletId, classNameId, 406 orderByComparator); 407 } 408 409 /** 410 * Returns the last portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 411 * 412 * <p> 413 * 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. 414 * </p> 415 * 416 * @param groupId the group ID 417 * @param portletId the portlet ID 418 * @param classNameId the class name ID 419 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 420 * @return the last matching portlet item 421 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 422 * @throws SystemException if a system exception occurred 423 */ 424 public static com.liferay.portal.model.PortletItem findByG_P_C_Last( 425 long groupId, java.lang.String portletId, long classNameId, 426 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 427 throws com.liferay.portal.NoSuchPortletItemException, 428 com.liferay.portal.kernel.exception.SystemException { 429 return getPersistence() 430 .findByG_P_C_Last(groupId, portletId, classNameId, 431 orderByComparator); 432 } 433 434 /** 435 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 436 * 437 * <p> 438 * 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. 439 * </p> 440 * 441 * @param portletItemId the primary key of the current portlet item 442 * @param groupId the group ID 443 * @param portletId the portlet ID 444 * @param classNameId the class name ID 445 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 446 * @return the previous, current, and next portlet item 447 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 448 * @throws SystemException if a system exception occurred 449 */ 450 public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext( 451 long portletItemId, long groupId, java.lang.String portletId, 452 long classNameId, 453 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 454 throws com.liferay.portal.NoSuchPortletItemException, 455 com.liferay.portal.kernel.exception.SystemException { 456 return getPersistence() 457 .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId, 458 classNameId, orderByComparator); 459 } 460 461 /** 462 * Returns 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. 463 * 464 * @param groupId the group ID 465 * @param name the name 466 * @param portletId the portlet ID 467 * @param classNameId the class name ID 468 * @return the matching portlet item 469 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 470 * @throws SystemException if a system exception occurred 471 */ 472 public static com.liferay.portal.model.PortletItem findByG_N_P_C( 473 long groupId, java.lang.String name, java.lang.String portletId, 474 long classNameId) 475 throws com.liferay.portal.NoSuchPortletItemException, 476 com.liferay.portal.kernel.exception.SystemException { 477 return getPersistence() 478 .findByG_N_P_C(groupId, name, portletId, classNameId); 479 } 480 481 /** 482 * Returns 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. 483 * 484 * @param groupId the group ID 485 * @param name the name 486 * @param portletId the portlet ID 487 * @param classNameId the class name ID 488 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 489 * @throws SystemException if a system exception occurred 490 */ 491 public static com.liferay.portal.model.PortletItem fetchByG_N_P_C( 492 long groupId, java.lang.String name, java.lang.String portletId, 493 long classNameId) 494 throws com.liferay.portal.kernel.exception.SystemException { 495 return getPersistence() 496 .fetchByG_N_P_C(groupId, name, portletId, classNameId); 497 } 498 499 /** 500 * Returns 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. 501 * 502 * @param groupId the group ID 503 * @param name the name 504 * @param portletId the portlet ID 505 * @param classNameId the class name ID 506 * @param retrieveFromCache whether to use the finder cache 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 * Returns 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 * Returns 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 538 * @param end the upper bound of the range of portlet items (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 * Returns 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 556 * @param end the upper bound of the range of portlet items (not inclusive) 557 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 572 * @param classNameId the class name ID 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 584 * @param portletId the portlet ID 585 * @param classNameId the class name ID 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 598 * @param name the name 599 * @param portletId the portlet ID 600 * @param classNameId the class name ID 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 * Returns the number of portlet items where groupId = ? and classNameId = ?. 622 * 623 * @param groupId the group ID 624 * @param classNameId the class name ID 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 * Returns the number of portlet items where groupId = ? and portletId = ? and classNameId = ?. 635 * 636 * @param groupId the group ID 637 * @param portletId the portlet ID 638 * @param classNameId the class name ID 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 * Returns the number of portlet items where groupId = ? and name = ? and portletId = ? and classNameId = ?. 650 * 651 * @param groupId the group ID 652 * @param name the name 653 * @param portletId the portlet ID 654 * @param classNameId the class name ID 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 * Returns the number of 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 ReferenceRegistry.registerReference(PortletItemUtil.class, 681 "_persistence"); 682 } 683 684 return _persistence; 685 } 686 687 public void setPersistence(PortletItemPersistence persistence) { 688 _persistence = persistence; 689 690 ReferenceRegistry.registerReference(PortletItemUtil.class, 691 "_persistence"); 692 } 693 694 private static PortletItemPersistence _persistence; 695 }