001 /** 002 * Copyright (c) 2000-2013 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 * @param groupId the group ID 254 * @param classNameId the class name ID 255 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 256 * @return the first matching portlet item 257 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 258 * @throws SystemException if a system exception occurred 259 */ 260 public static com.liferay.portal.model.PortletItem findByG_C_First( 261 long groupId, long classNameId, 262 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 263 throws com.liferay.portal.NoSuchPortletItemException, 264 com.liferay.portal.kernel.exception.SystemException { 265 return getPersistence() 266 .findByG_C_First(groupId, classNameId, orderByComparator); 267 } 268 269 /** 270 * Returns the first portlet item in the ordered set where groupId = ? and classNameId = ?. 271 * 272 * @param groupId the group ID 273 * @param classNameId the class name ID 274 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 275 * @return the first matching portlet item, or <code>null</code> if a matching portlet item could not be found 276 * @throws SystemException if a system exception occurred 277 */ 278 public static com.liferay.portal.model.PortletItem fetchByG_C_First( 279 long groupId, long classNameId, 280 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 281 throws com.liferay.portal.kernel.exception.SystemException { 282 return getPersistence() 283 .fetchByG_C_First(groupId, classNameId, orderByComparator); 284 } 285 286 /** 287 * Returns the last portlet item in the ordered set where groupId = ? and classNameId = ?. 288 * 289 * @param groupId the group ID 290 * @param classNameId the class name ID 291 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 292 * @return the last matching portlet item 293 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 294 * @throws SystemException if a system exception occurred 295 */ 296 public static com.liferay.portal.model.PortletItem findByG_C_Last( 297 long groupId, long classNameId, 298 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 299 throws com.liferay.portal.NoSuchPortletItemException, 300 com.liferay.portal.kernel.exception.SystemException { 301 return getPersistence() 302 .findByG_C_Last(groupId, classNameId, orderByComparator); 303 } 304 305 /** 306 * Returns the last portlet item in the ordered set where groupId = ? and classNameId = ?. 307 * 308 * @param groupId the group ID 309 * @param classNameId the class name ID 310 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 311 * @return the last matching portlet item, or <code>null</code> if a matching portlet item could not be found 312 * @throws SystemException if a system exception occurred 313 */ 314 public static com.liferay.portal.model.PortletItem fetchByG_C_Last( 315 long groupId, long classNameId, 316 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 317 throws com.liferay.portal.kernel.exception.SystemException { 318 return getPersistence() 319 .fetchByG_C_Last(groupId, classNameId, orderByComparator); 320 } 321 322 /** 323 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and classNameId = ?. 324 * 325 * @param portletItemId the primary key of the current portlet item 326 * @param groupId the group ID 327 * @param classNameId the class name ID 328 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 329 * @return the previous, current, and next portlet item 330 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 331 * @throws SystemException if a system exception occurred 332 */ 333 public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext( 334 long portletItemId, long groupId, long classNameId, 335 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 336 throws com.liferay.portal.NoSuchPortletItemException, 337 com.liferay.portal.kernel.exception.SystemException { 338 return getPersistence() 339 .findByG_C_PrevAndNext(portletItemId, groupId, classNameId, 340 orderByComparator); 341 } 342 343 /** 344 * Returns all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 345 * 346 * @param groupId the group ID 347 * @param portletId the portlet ID 348 * @param classNameId the class name ID 349 * @return the 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) 354 throws com.liferay.portal.kernel.exception.SystemException { 355 return getPersistence().findByG_P_C(groupId, portletId, classNameId); 356 } 357 358 /** 359 * Returns a 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 * @return the range of matching portlet items 371 * @throws SystemException if a system exception occurred 372 */ 373 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 374 long groupId, java.lang.String portletId, long classNameId, int start, 375 int end) throws com.liferay.portal.kernel.exception.SystemException { 376 return getPersistence() 377 .findByG_P_C(groupId, portletId, classNameId, start, end); 378 } 379 380 /** 381 * Returns an ordered range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 382 * 383 * <p> 384 * 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. 385 * </p> 386 * 387 * @param groupId the group ID 388 * @param portletId the portlet ID 389 * @param classNameId the class name ID 390 * @param start the lower bound of the range of portlet items 391 * @param end the upper bound of the range of portlet items (not inclusive) 392 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 393 * @return the ordered range of matching portlet items 394 * @throws SystemException if a system exception occurred 395 */ 396 public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 397 long groupId, java.lang.String portletId, long classNameId, int start, 398 int end, 399 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 400 throws com.liferay.portal.kernel.exception.SystemException { 401 return getPersistence() 402 .findByG_P_C(groupId, portletId, classNameId, start, end, 403 orderByComparator); 404 } 405 406 /** 407 * Returns the first portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 408 * 409 * @param groupId the group ID 410 * @param portletId the portlet ID 411 * @param classNameId the class name ID 412 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 413 * @return the first matching portlet item 414 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 415 * @throws SystemException if a system exception occurred 416 */ 417 public static com.liferay.portal.model.PortletItem findByG_P_C_First( 418 long groupId, java.lang.String portletId, long classNameId, 419 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 420 throws com.liferay.portal.NoSuchPortletItemException, 421 com.liferay.portal.kernel.exception.SystemException { 422 return getPersistence() 423 .findByG_P_C_First(groupId, portletId, classNameId, 424 orderByComparator); 425 } 426 427 /** 428 * Returns the first portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 429 * 430 * @param groupId the group ID 431 * @param portletId the portlet ID 432 * @param classNameId the class name ID 433 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 434 * @return the first matching portlet item, or <code>null</code> if a matching portlet item could not be found 435 * @throws SystemException if a system exception occurred 436 */ 437 public static com.liferay.portal.model.PortletItem fetchByG_P_C_First( 438 long groupId, java.lang.String portletId, long classNameId, 439 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 440 throws com.liferay.portal.kernel.exception.SystemException { 441 return getPersistence() 442 .fetchByG_P_C_First(groupId, portletId, classNameId, 443 orderByComparator); 444 } 445 446 /** 447 * Returns the last portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 448 * 449 * @param groupId the group ID 450 * @param portletId the portlet ID 451 * @param classNameId the class name ID 452 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 453 * @return the last matching portlet item 454 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 455 * @throws SystemException if a system exception occurred 456 */ 457 public static com.liferay.portal.model.PortletItem findByG_P_C_Last( 458 long groupId, java.lang.String portletId, long classNameId, 459 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 460 throws com.liferay.portal.NoSuchPortletItemException, 461 com.liferay.portal.kernel.exception.SystemException { 462 return getPersistence() 463 .findByG_P_C_Last(groupId, portletId, classNameId, 464 orderByComparator); 465 } 466 467 /** 468 * Returns the last portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 469 * 470 * @param groupId the group ID 471 * @param portletId the portlet ID 472 * @param classNameId the class name ID 473 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 474 * @return the last matching portlet item, or <code>null</code> 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 fetchByG_P_C_Last( 478 long groupId, java.lang.String portletId, long classNameId, 479 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 480 throws com.liferay.portal.kernel.exception.SystemException { 481 return getPersistence() 482 .fetchByG_P_C_Last(groupId, portletId, classNameId, 483 orderByComparator); 484 } 485 486 /** 487 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 488 * 489 * @param portletItemId the primary key of the current portlet item 490 * @param groupId the group ID 491 * @param portletId the portlet ID 492 * @param classNameId the class name ID 493 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 494 * @return the previous, current, and next portlet item 495 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 496 * @throws SystemException if a system exception occurred 497 */ 498 public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext( 499 long portletItemId, long groupId, java.lang.String portletId, 500 long classNameId, 501 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 502 throws com.liferay.portal.NoSuchPortletItemException, 503 com.liferay.portal.kernel.exception.SystemException { 504 return getPersistence() 505 .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId, 506 classNameId, orderByComparator); 507 } 508 509 /** 510 * 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. 511 * 512 * @param groupId the group ID 513 * @param name the name 514 * @param portletId the portlet ID 515 * @param classNameId the class name ID 516 * @return the matching portlet item 517 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 518 * @throws SystemException if a system exception occurred 519 */ 520 public static com.liferay.portal.model.PortletItem findByG_N_P_C( 521 long groupId, java.lang.String name, java.lang.String portletId, 522 long classNameId) 523 throws com.liferay.portal.NoSuchPortletItemException, 524 com.liferay.portal.kernel.exception.SystemException { 525 return getPersistence() 526 .findByG_N_P_C(groupId, name, portletId, classNameId); 527 } 528 529 /** 530 * 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. 531 * 532 * @param groupId the group ID 533 * @param name the name 534 * @param portletId the portlet ID 535 * @param classNameId the class name ID 536 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 537 * @throws SystemException if a system exception occurred 538 */ 539 public static com.liferay.portal.model.PortletItem fetchByG_N_P_C( 540 long groupId, java.lang.String name, java.lang.String portletId, 541 long classNameId) 542 throws com.liferay.portal.kernel.exception.SystemException { 543 return getPersistence() 544 .fetchByG_N_P_C(groupId, name, portletId, classNameId); 545 } 546 547 /** 548 * 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. 549 * 550 * @param groupId the group ID 551 * @param name the name 552 * @param portletId the portlet ID 553 * @param classNameId the class name ID 554 * @param retrieveFromCache whether to use the finder cache 555 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 556 * @throws SystemException if a system exception occurred 557 */ 558 public static com.liferay.portal.model.PortletItem fetchByG_N_P_C( 559 long groupId, java.lang.String name, java.lang.String portletId, 560 long classNameId, boolean retrieveFromCache) 561 throws com.liferay.portal.kernel.exception.SystemException { 562 return getPersistence() 563 .fetchByG_N_P_C(groupId, name, portletId, classNameId, 564 retrieveFromCache); 565 } 566 567 /** 568 * Returns all the portlet items. 569 * 570 * @return the portlet items 571 * @throws SystemException if a system exception occurred 572 */ 573 public static java.util.List<com.liferay.portal.model.PortletItem> findAll() 574 throws com.liferay.portal.kernel.exception.SystemException { 575 return getPersistence().findAll(); 576 } 577 578 /** 579 * Returns a range of all the portlet items. 580 * 581 * <p> 582 * 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. 583 * </p> 584 * 585 * @param start the lower bound of the range of portlet items 586 * @param end the upper bound of the range of portlet items (not inclusive) 587 * @return the range of portlet items 588 * @throws SystemException if a system exception occurred 589 */ 590 public static java.util.List<com.liferay.portal.model.PortletItem> findAll( 591 int start, int end) 592 throws com.liferay.portal.kernel.exception.SystemException { 593 return getPersistence().findAll(start, end); 594 } 595 596 /** 597 * Returns an ordered range of all the portlet items. 598 * 599 * <p> 600 * 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. 601 * </p> 602 * 603 * @param start the lower bound of the range of portlet items 604 * @param end the upper bound of the range of portlet items (not inclusive) 605 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 606 * @return the ordered range of portlet items 607 * @throws SystemException if a system exception occurred 608 */ 609 public static java.util.List<com.liferay.portal.model.PortletItem> findAll( 610 int start, int end, 611 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 612 throws com.liferay.portal.kernel.exception.SystemException { 613 return getPersistence().findAll(start, end, orderByComparator); 614 } 615 616 /** 617 * Removes all the portlet items where groupId = ? and classNameId = ? from the database. 618 * 619 * @param groupId the group ID 620 * @param classNameId the class name ID 621 * @throws SystemException if a system exception occurred 622 */ 623 public static void removeByG_C(long groupId, long classNameId) 624 throws com.liferay.portal.kernel.exception.SystemException { 625 getPersistence().removeByG_C(groupId, classNameId); 626 } 627 628 /** 629 * Removes all the portlet items where groupId = ? and portletId = ? and classNameId = ? from the database. 630 * 631 * @param groupId the group ID 632 * @param portletId the portlet ID 633 * @param classNameId the class name ID 634 * @throws SystemException if a system exception occurred 635 */ 636 public static void removeByG_P_C(long groupId, java.lang.String portletId, 637 long classNameId) 638 throws com.liferay.portal.kernel.exception.SystemException { 639 getPersistence().removeByG_P_C(groupId, portletId, classNameId); 640 } 641 642 /** 643 * Removes the portlet item where groupId = ? and name = ? and portletId = ? and classNameId = ? from the database. 644 * 645 * @param groupId the group ID 646 * @param name the name 647 * @param portletId the portlet ID 648 * @param classNameId the class name ID 649 * @return the portlet item that was removed 650 * @throws SystemException if a system exception occurred 651 */ 652 public static com.liferay.portal.model.PortletItem removeByG_N_P_C( 653 long groupId, java.lang.String name, java.lang.String portletId, 654 long classNameId) 655 throws com.liferay.portal.NoSuchPortletItemException, 656 com.liferay.portal.kernel.exception.SystemException { 657 return getPersistence() 658 .removeByG_N_P_C(groupId, name, portletId, classNameId); 659 } 660 661 /** 662 * Removes all the portlet items from the database. 663 * 664 * @throws SystemException if a system exception occurred 665 */ 666 public static void removeAll() 667 throws com.liferay.portal.kernel.exception.SystemException { 668 getPersistence().removeAll(); 669 } 670 671 /** 672 * Returns the number of portlet items where groupId = ? and classNameId = ?. 673 * 674 * @param groupId the group ID 675 * @param classNameId the class name ID 676 * @return the number of matching portlet items 677 * @throws SystemException if a system exception occurred 678 */ 679 public static int countByG_C(long groupId, long classNameId) 680 throws com.liferay.portal.kernel.exception.SystemException { 681 return getPersistence().countByG_C(groupId, classNameId); 682 } 683 684 /** 685 * Returns the number of portlet items where groupId = ? and portletId = ? and classNameId = ?. 686 * 687 * @param groupId the group ID 688 * @param portletId the portlet ID 689 * @param classNameId the class name ID 690 * @return the number of matching portlet items 691 * @throws SystemException if a system exception occurred 692 */ 693 public static int countByG_P_C(long groupId, java.lang.String portletId, 694 long classNameId) 695 throws com.liferay.portal.kernel.exception.SystemException { 696 return getPersistence().countByG_P_C(groupId, portletId, classNameId); 697 } 698 699 /** 700 * Returns the number of portlet items where groupId = ? and name = ? and portletId = ? and classNameId = ?. 701 * 702 * @param groupId the group ID 703 * @param name the name 704 * @param portletId the portlet ID 705 * @param classNameId the class name ID 706 * @return the number of matching portlet items 707 * @throws SystemException if a system exception occurred 708 */ 709 public static int countByG_N_P_C(long groupId, java.lang.String name, 710 java.lang.String portletId, long classNameId) 711 throws com.liferay.portal.kernel.exception.SystemException { 712 return getPersistence() 713 .countByG_N_P_C(groupId, name, portletId, classNameId); 714 } 715 716 /** 717 * Returns the number of portlet items. 718 * 719 * @return the number of portlet items 720 * @throws SystemException if a system exception occurred 721 */ 722 public static int countAll() 723 throws com.liferay.portal.kernel.exception.SystemException { 724 return getPersistence().countAll(); 725 } 726 727 public static PortletItemPersistence getPersistence() { 728 if (_persistence == null) { 729 _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName()); 730 731 ReferenceRegistry.registerReference(PortletItemUtil.class, 732 "_persistence"); 733 } 734 735 return _persistence; 736 } 737 738 /** 739 * @deprecated 740 */ 741 public void setPersistence(PortletItemPersistence persistence) { 742 } 743 744 private static PortletItemPersistence _persistence; 745 }