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