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