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