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