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