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.exception.NoSuchPortletItemException; 020 import com.liferay.portal.model.PortletItem; 021 022 /** 023 * The persistence interface for the portlet item service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see com.liferay.portal.service.persistence.impl.PortletItemPersistenceImpl 031 * @see PortletItemUtil 032 * @generated 033 */ 034 @ProviderType 035 public interface PortletItemPersistence extends BasePersistence<PortletItem> { 036 /* 037 * NOTE FOR DEVELOPERS: 038 * 039 * Never modify or reference this interface directly. Always use {@link PortletItemUtil} to access the portlet item persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 040 */ 041 042 /** 043 * Returns all the portlet items where groupId = ? and classNameId = ?. 044 * 045 * @param groupId the group ID 046 * @param classNameId the class name ID 047 * @return the matching portlet items 048 */ 049 public java.util.List<PortletItem> findByG_C(long groupId, long classNameId); 050 051 /** 052 * Returns a range of all the portlet items where groupId = ? and classNameId = ?. 053 * 054 * <p> 055 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 056 * </p> 057 * 058 * @param groupId the group ID 059 * @param classNameId the class name ID 060 * @param start the lower bound of the range of portlet items 061 * @param end the upper bound of the range of portlet items (not inclusive) 062 * @return the range of matching portlet items 063 */ 064 public java.util.List<PortletItem> findByG_C(long groupId, 065 long classNameId, int start, int end); 066 067 /** 068 * Returns an ordered range of all the portlet items where groupId = ? and classNameId = ?. 069 * 070 * <p> 071 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 072 * </p> 073 * 074 * @param groupId the group ID 075 * @param classNameId the class name ID 076 * @param start the lower bound of the range of portlet items 077 * @param end the upper bound of the range of portlet items (not inclusive) 078 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 079 * @return the ordered range of matching portlet items 080 */ 081 public java.util.List<PortletItem> findByG_C(long groupId, 082 long classNameId, int start, int end, 083 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator); 084 085 /** 086 * Returns an ordered range of all the portlet items where groupId = ? and classNameId = ?. 087 * 088 * <p> 089 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 090 * </p> 091 * 092 * @param groupId the group ID 093 * @param classNameId the class name ID 094 * @param start the lower bound of the range of portlet items 095 * @param end the upper bound of the range of portlet items (not inclusive) 096 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 097 * @param retrieveFromCache whether to retrieve from the finder cache 098 * @return the ordered range of matching portlet items 099 */ 100 public java.util.List<PortletItem> findByG_C(long groupId, 101 long classNameId, int start, int end, 102 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator, 103 boolean retrieveFromCache); 104 105 /** 106 * Returns the first portlet item in the ordered set where groupId = ? and classNameId = ?. 107 * 108 * @param groupId the group ID 109 * @param classNameId the class name ID 110 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 111 * @return the first matching portlet item 112 * @throws NoSuchPortletItemException if a matching portlet item could not be found 113 */ 114 public PortletItem findByG_C_First(long groupId, long classNameId, 115 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator) 116 throws NoSuchPortletItemException; 117 118 /** 119 * Returns the first portlet item in the ordered set where groupId = ? and classNameId = ?. 120 * 121 * @param groupId the group ID 122 * @param classNameId the class name ID 123 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 124 * @return the first matching portlet item, or <code>null</code> if a matching portlet item could not be found 125 */ 126 public PortletItem fetchByG_C_First(long groupId, long classNameId, 127 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator); 128 129 /** 130 * Returns the last portlet item in the ordered set where groupId = ? and classNameId = ?. 131 * 132 * @param groupId the group ID 133 * @param classNameId the class name ID 134 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 135 * @return the last matching portlet item 136 * @throws NoSuchPortletItemException if a matching portlet item could not be found 137 */ 138 public PortletItem findByG_C_Last(long groupId, long classNameId, 139 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator) 140 throws NoSuchPortletItemException; 141 142 /** 143 * Returns the last portlet item in the ordered set where groupId = ? and classNameId = ?. 144 * 145 * @param groupId the group ID 146 * @param classNameId the class name ID 147 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 148 * @return the last matching portlet item, or <code>null</code> if a matching portlet item could not be found 149 */ 150 public PortletItem fetchByG_C_Last(long groupId, long classNameId, 151 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator); 152 153 /** 154 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and classNameId = ?. 155 * 156 * @param portletItemId the primary key of the current portlet item 157 * @param groupId the group ID 158 * @param classNameId the class name ID 159 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 160 * @return the previous, current, and next portlet item 161 * @throws NoSuchPortletItemException if a portlet item with the primary key could not be found 162 */ 163 public PortletItem[] findByG_C_PrevAndNext(long portletItemId, 164 long groupId, long classNameId, 165 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator) 166 throws NoSuchPortletItemException; 167 168 /** 169 * Removes all the portlet items where groupId = ? and classNameId = ? from the database. 170 * 171 * @param groupId the group ID 172 * @param classNameId the class name ID 173 */ 174 public void removeByG_C(long groupId, long classNameId); 175 176 /** 177 * Returns the number of portlet items where groupId = ? and classNameId = ?. 178 * 179 * @param groupId the group ID 180 * @param classNameId the class name ID 181 * @return the number of matching portlet items 182 */ 183 public int countByG_C(long groupId, long classNameId); 184 185 /** 186 * Returns all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 187 * 188 * @param groupId the group ID 189 * @param portletId the portlet ID 190 * @param classNameId the class name ID 191 * @return the matching portlet items 192 */ 193 public java.util.List<PortletItem> findByG_P_C(long groupId, 194 java.lang.String portletId, long classNameId); 195 196 /** 197 * Returns a range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 198 * 199 * <p> 200 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 201 * </p> 202 * 203 * @param groupId the group ID 204 * @param portletId the portlet ID 205 * @param classNameId the class name ID 206 * @param start the lower bound of the range of portlet items 207 * @param end the upper bound of the range of portlet items (not inclusive) 208 * @return the range of matching portlet items 209 */ 210 public java.util.List<PortletItem> findByG_P_C(long groupId, 211 java.lang.String portletId, long classNameId, int start, int end); 212 213 /** 214 * Returns an ordered range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 215 * 216 * <p> 217 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 218 * </p> 219 * 220 * @param groupId the group ID 221 * @param portletId the portlet ID 222 * @param classNameId the class name ID 223 * @param start the lower bound of the range of portlet items 224 * @param end the upper bound of the range of portlet items (not inclusive) 225 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 226 * @return the ordered range of matching portlet items 227 */ 228 public java.util.List<PortletItem> findByG_P_C(long groupId, 229 java.lang.String portletId, long classNameId, int start, int end, 230 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator); 231 232 /** 233 * Returns an ordered range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 234 * 235 * <p> 236 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 237 * </p> 238 * 239 * @param groupId the group ID 240 * @param portletId the portlet ID 241 * @param classNameId the class name ID 242 * @param start the lower bound of the range of portlet items 243 * @param end the upper bound of the range of portlet items (not inclusive) 244 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 245 * @param retrieveFromCache whether to retrieve from the finder cache 246 * @return the ordered range of matching portlet items 247 */ 248 public java.util.List<PortletItem> findByG_P_C(long groupId, 249 java.lang.String portletId, long classNameId, int start, int end, 250 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator, 251 boolean retrieveFromCache); 252 253 /** 254 * Returns the first portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 255 * 256 * @param groupId the group ID 257 * @param portletId the portlet ID 258 * @param classNameId the class name ID 259 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 260 * @return the first matching portlet item 261 * @throws NoSuchPortletItemException if a matching portlet item could not be found 262 */ 263 public PortletItem findByG_P_C_First(long groupId, 264 java.lang.String portletId, long classNameId, 265 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator) 266 throws NoSuchPortletItemException; 267 268 /** 269 * Returns the first portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 270 * 271 * @param groupId the group ID 272 * @param portletId the portlet 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 */ 277 public PortletItem fetchByG_P_C_First(long groupId, 278 java.lang.String portletId, long classNameId, 279 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator); 280 281 /** 282 * Returns the last portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 283 * 284 * @param groupId the group ID 285 * @param portletId the portlet ID 286 * @param classNameId the class name ID 287 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 288 * @return the last matching portlet item 289 * @throws NoSuchPortletItemException if a matching portlet item could not be found 290 */ 291 public PortletItem findByG_P_C_Last(long groupId, 292 java.lang.String portletId, long classNameId, 293 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator) 294 throws NoSuchPortletItemException; 295 296 /** 297 * Returns the last portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 298 * 299 * @param groupId the group ID 300 * @param portletId the portlet ID 301 * @param classNameId the class name ID 302 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 303 * @return the last matching portlet item, or <code>null</code> if a matching portlet item could not be found 304 */ 305 public PortletItem fetchByG_P_C_Last(long groupId, 306 java.lang.String portletId, long classNameId, 307 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator); 308 309 /** 310 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 311 * 312 * @param portletItemId the primary key of the current portlet item 313 * @param groupId the group ID 314 * @param portletId the portlet ID 315 * @param classNameId the class name ID 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next portlet item 318 * @throws NoSuchPortletItemException if a portlet item with the primary key could not be found 319 */ 320 public PortletItem[] findByG_P_C_PrevAndNext(long portletItemId, 321 long groupId, java.lang.String portletId, long classNameId, 322 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator) 323 throws NoSuchPortletItemException; 324 325 /** 326 * Removes all the portlet items where groupId = ? and portletId = ? and classNameId = ? from the database. 327 * 328 * @param groupId the group ID 329 * @param portletId the portlet ID 330 * @param classNameId the class name ID 331 */ 332 public void removeByG_P_C(long groupId, java.lang.String portletId, 333 long classNameId); 334 335 /** 336 * Returns the number of portlet items where groupId = ? and portletId = ? and classNameId = ?. 337 * 338 * @param groupId the group ID 339 * @param portletId the portlet ID 340 * @param classNameId the class name ID 341 * @return the number of matching portlet items 342 */ 343 public int countByG_P_C(long groupId, java.lang.String portletId, 344 long classNameId); 345 346 /** 347 * Returns the portlet item where groupId = ? and name = ? and portletId = ? and classNameId = ? or throws a {@link NoSuchPortletItemException} if it could not be found. 348 * 349 * @param groupId the group ID 350 * @param name the name 351 * @param portletId the portlet ID 352 * @param classNameId the class name ID 353 * @return the matching portlet item 354 * @throws NoSuchPortletItemException if a matching portlet item could not be found 355 */ 356 public PortletItem findByG_N_P_C(long groupId, java.lang.String name, 357 java.lang.String portletId, long classNameId) 358 throws NoSuchPortletItemException; 359 360 /** 361 * 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. 362 * 363 * @param groupId the group ID 364 * @param name the name 365 * @param portletId the portlet ID 366 * @param classNameId the class name ID 367 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 368 */ 369 public PortletItem fetchByG_N_P_C(long groupId, java.lang.String name, 370 java.lang.String portletId, long classNameId); 371 372 /** 373 * 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. 374 * 375 * @param groupId the group ID 376 * @param name the name 377 * @param portletId the portlet ID 378 * @param classNameId the class name ID 379 * @param retrieveFromCache whether to retrieve from the finder cache 380 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 381 */ 382 public PortletItem fetchByG_N_P_C(long groupId, java.lang.String name, 383 java.lang.String portletId, long classNameId, boolean retrieveFromCache); 384 385 /** 386 * Removes the portlet item where groupId = ? and name = ? and portletId = ? and classNameId = ? from the database. 387 * 388 * @param groupId the group ID 389 * @param name the name 390 * @param portletId the portlet ID 391 * @param classNameId the class name ID 392 * @return the portlet item that was removed 393 */ 394 public PortletItem removeByG_N_P_C(long groupId, java.lang.String name, 395 java.lang.String portletId, long classNameId) 396 throws NoSuchPortletItemException; 397 398 /** 399 * Returns the number of portlet items where groupId = ? and name = ? and portletId = ? and classNameId = ?. 400 * 401 * @param groupId the group ID 402 * @param name the name 403 * @param portletId the portlet ID 404 * @param classNameId the class name ID 405 * @return the number of matching portlet items 406 */ 407 public int countByG_N_P_C(long groupId, java.lang.String name, 408 java.lang.String portletId, long classNameId); 409 410 /** 411 * Caches the portlet item in the entity cache if it is enabled. 412 * 413 * @param portletItem the portlet item 414 */ 415 public void cacheResult(PortletItem portletItem); 416 417 /** 418 * Caches the portlet items in the entity cache if it is enabled. 419 * 420 * @param portletItems the portlet items 421 */ 422 public void cacheResult(java.util.List<PortletItem> portletItems); 423 424 /** 425 * Creates a new portlet item with the primary key. Does not add the portlet item to the database. 426 * 427 * @param portletItemId the primary key for the new portlet item 428 * @return the new portlet item 429 */ 430 public PortletItem create(long portletItemId); 431 432 /** 433 * Removes the portlet item with the primary key from the database. Also notifies the appropriate model listeners. 434 * 435 * @param portletItemId the primary key of the portlet item 436 * @return the portlet item that was removed 437 * @throws NoSuchPortletItemException if a portlet item with the primary key could not be found 438 */ 439 public PortletItem remove(long portletItemId) 440 throws NoSuchPortletItemException; 441 442 public PortletItem updateImpl(PortletItem portletItem); 443 444 /** 445 * Returns the portlet item with the primary key or throws a {@link NoSuchPortletItemException} if it could not be found. 446 * 447 * @param portletItemId the primary key of the portlet item 448 * @return the portlet item 449 * @throws NoSuchPortletItemException if a portlet item with the primary key could not be found 450 */ 451 public PortletItem findByPrimaryKey(long portletItemId) 452 throws NoSuchPortletItemException; 453 454 /** 455 * Returns the portlet item with the primary key or returns <code>null</code> if it could not be found. 456 * 457 * @param portletItemId the primary key of the portlet item 458 * @return the portlet item, or <code>null</code> if a portlet item with the primary key could not be found 459 */ 460 public PortletItem fetchByPrimaryKey(long portletItemId); 461 462 @Override 463 public java.util.Map<java.io.Serializable, PortletItem> fetchByPrimaryKeys( 464 java.util.Set<java.io.Serializable> primaryKeys); 465 466 /** 467 * Returns all the portlet items. 468 * 469 * @return the portlet items 470 */ 471 public java.util.List<PortletItem> findAll(); 472 473 /** 474 * Returns a range of all the portlet items. 475 * 476 * <p> 477 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 478 * </p> 479 * 480 * @param start the lower bound of the range of portlet items 481 * @param end the upper bound of the range of portlet items (not inclusive) 482 * @return the range of portlet items 483 */ 484 public java.util.List<PortletItem> findAll(int start, int end); 485 486 /** 487 * Returns an ordered range of all the portlet items. 488 * 489 * <p> 490 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 491 * </p> 492 * 493 * @param start the lower bound of the range of portlet items 494 * @param end the upper bound of the range of portlet items (not inclusive) 495 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 496 * @return the ordered range of portlet items 497 */ 498 public java.util.List<PortletItem> findAll(int start, int end, 499 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator); 500 501 /** 502 * Returns an ordered range of all the portlet items. 503 * 504 * <p> 505 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 506 * </p> 507 * 508 * @param start the lower bound of the range of portlet items 509 * @param end the upper bound of the range of portlet items (not inclusive) 510 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 511 * @param retrieveFromCache whether to retrieve from the finder cache 512 * @return the ordered range of portlet items 513 */ 514 public java.util.List<PortletItem> findAll(int start, int end, 515 com.liferay.portal.kernel.util.OrderByComparator<PortletItem> orderByComparator, 516 boolean retrieveFromCache); 517 518 /** 519 * Removes all the portlet items from the database. 520 */ 521 public void removeAll(); 522 523 /** 524 * Returns the number of portlet items. 525 * 526 * @return the number of portlet items 527 */ 528 public int countAll(); 529 }