001 /** 002 * Copyright (c) 2000-2012 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 * <p> 155 * 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. 156 * </p> 157 * 158 * @param groupId the group ID 159 * @param classNameId the class name ID 160 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 161 * @return the first matching portlet item 162 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 163 * @throws SystemException if a system exception occurred 164 */ 165 public com.liferay.portal.model.PortletItem findByG_C_First(long groupId, 166 long classNameId, 167 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 168 throws com.liferay.portal.NoSuchPortletItemException, 169 com.liferay.portal.kernel.exception.SystemException; 170 171 /** 172 * Returns the last portlet item in the ordered set where groupId = ? and classNameId = ?. 173 * 174 * <p> 175 * 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. 176 * </p> 177 * 178 * @param groupId the group ID 179 * @param classNameId the class name ID 180 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 181 * @return the last matching portlet item 182 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public com.liferay.portal.model.PortletItem findByG_C_Last(long groupId, 186 long classNameId, 187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 188 throws com.liferay.portal.NoSuchPortletItemException, 189 com.liferay.portal.kernel.exception.SystemException; 190 191 /** 192 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and classNameId = ?. 193 * 194 * <p> 195 * 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. 196 * </p> 197 * 198 * @param portletItemId the primary key of the current portlet item 199 * @param groupId the group ID 200 * @param classNameId the class name ID 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the previous, current, and next portlet item 203 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 204 * @throws SystemException if a system exception occurred 205 */ 206 public com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext( 207 long portletItemId, long groupId, long classNameId, 208 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 209 throws com.liferay.portal.NoSuchPortletItemException, 210 com.liferay.portal.kernel.exception.SystemException; 211 212 /** 213 * Returns all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 214 * 215 * @param groupId the group ID 216 * @param portletId the portlet ID 217 * @param classNameId the class name ID 218 * @return the matching portlet items 219 * @throws SystemException if a system exception occurred 220 */ 221 public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 222 long groupId, java.lang.String portletId, long classNameId) 223 throws com.liferay.portal.kernel.exception.SystemException; 224 225 /** 226 * Returns a range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param groupId the group ID 233 * @param portletId the portlet ID 234 * @param classNameId the class name ID 235 * @param start the lower bound of the range of portlet items 236 * @param end the upper bound of the range of portlet items (not inclusive) 237 * @return the range of matching portlet items 238 * @throws SystemException if a system exception occurred 239 */ 240 public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 241 long groupId, java.lang.String portletId, long classNameId, int start, 242 int end) throws com.liferay.portal.kernel.exception.SystemException; 243 244 /** 245 * Returns an ordered range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 246 * 247 * <p> 248 * 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. 249 * </p> 250 * 251 * @param groupId the group ID 252 * @param portletId the portlet ID 253 * @param classNameId the class name ID 254 * @param start the lower bound of the range of portlet items 255 * @param end the upper bound of the range of portlet items (not inclusive) 256 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 257 * @return the ordered range of matching portlet items 258 * @throws SystemException if a system exception occurred 259 */ 260 public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 261 long groupId, java.lang.String portletId, long classNameId, int start, 262 int end, 263 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 264 throws com.liferay.portal.kernel.exception.SystemException; 265 266 /** 267 * Returns the first portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 268 * 269 * <p> 270 * 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. 271 * </p> 272 * 273 * @param groupId the group ID 274 * @param portletId the portlet ID 275 * @param classNameId the class name ID 276 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 277 * @return the first matching portlet item 278 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 279 * @throws SystemException if a system exception occurred 280 */ 281 public com.liferay.portal.model.PortletItem findByG_P_C_First( 282 long groupId, java.lang.String portletId, long classNameId, 283 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 284 throws com.liferay.portal.NoSuchPortletItemException, 285 com.liferay.portal.kernel.exception.SystemException; 286 287 /** 288 * Returns the last portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 289 * 290 * <p> 291 * 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. 292 * </p> 293 * 294 * @param groupId the group ID 295 * @param portletId the portlet ID 296 * @param classNameId the class name ID 297 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 298 * @return the last matching portlet item 299 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public com.liferay.portal.model.PortletItem findByG_P_C_Last(long groupId, 303 java.lang.String portletId, long classNameId, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.NoSuchPortletItemException, 306 com.liferay.portal.kernel.exception.SystemException; 307 308 /** 309 * Returns the portlet items before and after the current portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 310 * 311 * <p> 312 * 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. 313 * </p> 314 * 315 * @param portletItemId the primary key of the current portlet item 316 * @param groupId the group ID 317 * @param portletId the portlet ID 318 * @param classNameId the class name ID 319 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 320 * @return the previous, current, and next portlet item 321 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 322 * @throws SystemException if a system exception occurred 323 */ 324 public com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext( 325 long portletItemId, long groupId, java.lang.String portletId, 326 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 portlet item where groupId = ? and name = ? and portletId = ? and classNameId = ? or throws a {@link com.liferay.portal.NoSuchPortletItemException} if it could not be found. 333 * 334 * @param groupId the group ID 335 * @param name the name 336 * @param portletId the portlet ID 337 * @param classNameId the class name ID 338 * @return the matching portlet item 339 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 340 * @throws SystemException if a system exception occurred 341 */ 342 public com.liferay.portal.model.PortletItem findByG_N_P_C(long groupId, 343 java.lang.String name, java.lang.String portletId, long classNameId) 344 throws com.liferay.portal.NoSuchPortletItemException, 345 com.liferay.portal.kernel.exception.SystemException; 346 347 /** 348 * 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. 349 * 350 * @param groupId the group ID 351 * @param name the name 352 * @param portletId the portlet ID 353 * @param classNameId the class name ID 354 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 355 * @throws SystemException if a system exception occurred 356 */ 357 public com.liferay.portal.model.PortletItem fetchByG_N_P_C(long groupId, 358 java.lang.String name, java.lang.String portletId, long classNameId) 359 throws com.liferay.portal.kernel.exception.SystemException; 360 361 /** 362 * 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. 363 * 364 * @param groupId the group ID 365 * @param name the name 366 * @param portletId the portlet ID 367 * @param classNameId the class name ID 368 * @param retrieveFromCache whether to use the finder cache 369 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 370 * @throws SystemException if a system exception occurred 371 */ 372 public com.liferay.portal.model.PortletItem fetchByG_N_P_C(long groupId, 373 java.lang.String name, java.lang.String portletId, long classNameId, 374 boolean retrieveFromCache) 375 throws com.liferay.portal.kernel.exception.SystemException; 376 377 /** 378 * Returns all the portlet items. 379 * 380 * @return the portlet items 381 * @throws SystemException if a system exception occurred 382 */ 383 public java.util.List<com.liferay.portal.model.PortletItem> findAll() 384 throws com.liferay.portal.kernel.exception.SystemException; 385 386 /** 387 * Returns a range of all the portlet items. 388 * 389 * <p> 390 * 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. 391 * </p> 392 * 393 * @param start the lower bound of the range of portlet items 394 * @param end the upper bound of the range of portlet items (not inclusive) 395 * @return the range of portlet items 396 * @throws SystemException if a system exception occurred 397 */ 398 public java.util.List<com.liferay.portal.model.PortletItem> findAll( 399 int start, int end) 400 throws com.liferay.portal.kernel.exception.SystemException; 401 402 /** 403 * Returns an ordered range of all the portlet items. 404 * 405 * <p> 406 * 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. 407 * </p> 408 * 409 * @param start the lower bound of the range of portlet items 410 * @param end the upper bound of the range of portlet items (not inclusive) 411 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 412 * @return the ordered range of portlet items 413 * @throws SystemException if a system exception occurred 414 */ 415 public java.util.List<com.liferay.portal.model.PortletItem> findAll( 416 int start, int end, 417 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 418 throws com.liferay.portal.kernel.exception.SystemException; 419 420 /** 421 * Removes all the portlet items where groupId = ? and classNameId = ? from the database. 422 * 423 * @param groupId the group ID 424 * @param classNameId the class name ID 425 * @throws SystemException if a system exception occurred 426 */ 427 public void removeByG_C(long groupId, long classNameId) 428 throws com.liferay.portal.kernel.exception.SystemException; 429 430 /** 431 * Removes all the portlet items where groupId = ? and portletId = ? and classNameId = ? from the database. 432 * 433 * @param groupId the group ID 434 * @param portletId the portlet ID 435 * @param classNameId the class name ID 436 * @throws SystemException if a system exception occurred 437 */ 438 public void removeByG_P_C(long groupId, java.lang.String portletId, 439 long classNameId) 440 throws com.liferay.portal.kernel.exception.SystemException; 441 442 /** 443 * Removes the portlet item where groupId = ? and name = ? and portletId = ? and classNameId = ? from the database. 444 * 445 * @param groupId the group ID 446 * @param name the name 447 * @param portletId the portlet ID 448 * @param classNameId the class name ID 449 * @throws SystemException if a system exception occurred 450 */ 451 public void removeByG_N_P_C(long groupId, java.lang.String name, 452 java.lang.String portletId, long classNameId) 453 throws com.liferay.portal.NoSuchPortletItemException, 454 com.liferay.portal.kernel.exception.SystemException; 455 456 /** 457 * Removes all the portlet items from the database. 458 * 459 * @throws SystemException if a system exception occurred 460 */ 461 public void removeAll() 462 throws com.liferay.portal.kernel.exception.SystemException; 463 464 /** 465 * Returns the number of portlet items where groupId = ? and classNameId = ?. 466 * 467 * @param groupId the group ID 468 * @param classNameId the class name ID 469 * @return the number of matching portlet items 470 * @throws SystemException if a system exception occurred 471 */ 472 public int countByG_C(long groupId, long classNameId) 473 throws com.liferay.portal.kernel.exception.SystemException; 474 475 /** 476 * Returns the number of portlet items where groupId = ? and portletId = ? and classNameId = ?. 477 * 478 * @param groupId the group ID 479 * @param portletId the portlet ID 480 * @param classNameId the class name ID 481 * @return the number of matching portlet items 482 * @throws SystemException if a system exception occurred 483 */ 484 public int countByG_P_C(long groupId, java.lang.String portletId, 485 long classNameId) 486 throws com.liferay.portal.kernel.exception.SystemException; 487 488 /** 489 * Returns the number of portlet items where groupId = ? and name = ? and portletId = ? and classNameId = ?. 490 * 491 * @param groupId the group ID 492 * @param name the name 493 * @param portletId the portlet ID 494 * @param classNameId the class name ID 495 * @return the number of matching portlet items 496 * @throws SystemException if a system exception occurred 497 */ 498 public int countByG_N_P_C(long groupId, java.lang.String name, 499 java.lang.String portletId, long classNameId) 500 throws com.liferay.portal.kernel.exception.SystemException; 501 502 /** 503 * Returns the number of portlet items. 504 * 505 * @return the number of portlet items 506 * @throws SystemException if a system exception occurred 507 */ 508 public int countAll() 509 throws com.liferay.portal.kernel.exception.SystemException; 510 }