001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.exception.SystemException; 018 import com.liferay.portal.model.PortletItem; 019 020 /** 021 * The persistence interface for the portlet item service. 022 * 023 * <p> 024 * Caching information and settings can be found in <code>portal.properties</code> 025 * </p> 026 * 027 * @author Brian Wing Shun Chan 028 * @see PortletItemPersistenceImpl 029 * @see PortletItemUtil 030 * @generated 031 */ 032 public interface PortletItemPersistence extends BasePersistence<PortletItem> { 033 /* 034 * NOTE FOR DEVELOPERS: 035 * 036 * 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. 037 */ 038 039 /** 040 * Caches the portlet item in the entity cache if it is enabled. 041 * 042 * @param portletItem the portlet item to cache 043 */ 044 public void cacheResult(com.liferay.portal.model.PortletItem portletItem); 045 046 /** 047 * Caches the portlet items in the entity cache if it is enabled. 048 * 049 * @param portletItems the portlet items to cache 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portal.model.PortletItem> portletItems); 053 054 /** 055 * Creates a new portlet item with the primary key. Does not add the portlet item to the database. 056 * 057 * @param portletItemId the primary key for the new portlet item 058 * @return the new portlet item 059 */ 060 public com.liferay.portal.model.PortletItem create(long portletItemId); 061 062 /** 063 * Removes the portlet item with the primary key from the database. Also notifies the appropriate model listeners. 064 * 065 * @param portletItemId the primary key of the portlet item to remove 066 * @return the portlet item that was removed 067 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 068 * @throws SystemException if a system exception occurred 069 */ 070 public com.liferay.portal.model.PortletItem remove(long portletItemId) 071 throws com.liferay.portal.NoSuchPortletItemException, 072 com.liferay.portal.kernel.exception.SystemException; 073 074 public com.liferay.portal.model.PortletItem updateImpl( 075 com.liferay.portal.model.PortletItem portletItem, boolean merge) 076 throws com.liferay.portal.kernel.exception.SystemException; 077 078 /** 079 * Finds the portlet item with the primary key or throws a {@link com.liferay.portal.NoSuchPortletItemException} if it could not be found. 080 * 081 * @param portletItemId the primary key of the portlet item to find 082 * @return the portlet item 083 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 084 * @throws SystemException if a system exception occurred 085 */ 086 public com.liferay.portal.model.PortletItem findByPrimaryKey( 087 long portletItemId) 088 throws com.liferay.portal.NoSuchPortletItemException, 089 com.liferay.portal.kernel.exception.SystemException; 090 091 /** 092 * Finds the portlet item with the primary key or returns <code>null</code> if it could not be found. 093 * 094 * @param portletItemId the primary key of the portlet item to find 095 * @return the portlet item, or <code>null</code> if a portlet item with the primary key could not be found 096 * @throws SystemException if a system exception occurred 097 */ 098 public com.liferay.portal.model.PortletItem fetchByPrimaryKey( 099 long portletItemId) 100 throws com.liferay.portal.kernel.exception.SystemException; 101 102 /** 103 * Finds all the portlet items where groupId = ? and classNameId = ?. 104 * 105 * @param groupId the group ID to search with 106 * @param classNameId the class name ID to search with 107 * @return the matching portlet items 108 * @throws SystemException if a system exception occurred 109 */ 110 public java.util.List<com.liferay.portal.model.PortletItem> findByG_C( 111 long groupId, long classNameId) 112 throws com.liferay.portal.kernel.exception.SystemException; 113 114 /** 115 * Finds a range of all the portlet items where groupId = ? and classNameId = ?. 116 * 117 * <p> 118 * 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. 119 * </p> 120 * 121 * @param groupId the group ID to search with 122 * @param classNameId the class name ID to search with 123 * @param start the lower bound of the range of portlet items to return 124 * @param end the upper bound of the range of portlet items to return (not inclusive) 125 * @return the range of matching portlet items 126 * @throws SystemException if a system exception occurred 127 */ 128 public java.util.List<com.liferay.portal.model.PortletItem> findByG_C( 129 long groupId, long classNameId, int start, int end) 130 throws com.liferay.portal.kernel.exception.SystemException; 131 132 /** 133 * Finds an ordered range of all the portlet items where groupId = ? and classNameId = ?. 134 * 135 * <p> 136 * 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. 137 * </p> 138 * 139 * @param groupId the group ID to search with 140 * @param classNameId the class name ID to search with 141 * @param start the lower bound of the range of portlet items to return 142 * @param end the upper bound of the range of portlet items to return (not inclusive) 143 * @param orderByComparator the comparator to order the results by 144 * @return the ordered range of matching portlet items 145 * @throws SystemException if a system exception occurred 146 */ 147 public java.util.List<com.liferay.portal.model.PortletItem> findByG_C( 148 long groupId, long classNameId, int start, int end, 149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Finds the first portlet item in the ordered set where groupId = ? and classNameId = ?. 154 * 155 * <p> 156 * 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. 157 * </p> 158 * 159 * @param groupId the group ID to search with 160 * @param classNameId the class name ID to search with 161 * @param orderByComparator the comparator to order the set by 162 * @return the first matching portlet item 163 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 164 * @throws SystemException if a system exception occurred 165 */ 166 public com.liferay.portal.model.PortletItem findByG_C_First(long groupId, 167 long classNameId, 168 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 169 throws com.liferay.portal.NoSuchPortletItemException, 170 com.liferay.portal.kernel.exception.SystemException; 171 172 /** 173 * Finds the last portlet item in the ordered set where groupId = ? and classNameId = ?. 174 * 175 * <p> 176 * 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. 177 * </p> 178 * 179 * @param groupId the group ID to search with 180 * @param classNameId the class name ID to search with 181 * @param orderByComparator the comparator to order the set by 182 * @return the last matching portlet item 183 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 184 * @throws SystemException if a system exception occurred 185 */ 186 public com.liferay.portal.model.PortletItem findByG_C_Last(long groupId, 187 long classNameId, 188 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 189 throws com.liferay.portal.NoSuchPortletItemException, 190 com.liferay.portal.kernel.exception.SystemException; 191 192 /** 193 * Finds the portlet items before and after the current portlet item in the ordered set where groupId = ? and classNameId = ?. 194 * 195 * <p> 196 * 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. 197 * </p> 198 * 199 * @param portletItemId the primary key of the current portlet item 200 * @param groupId the group ID to search with 201 * @param classNameId the class name ID to search with 202 * @param orderByComparator the comparator to order the set by 203 * @return the previous, current, and next portlet item 204 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext( 208 long portletItemId, long groupId, long classNameId, 209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 210 throws com.liferay.portal.NoSuchPortletItemException, 211 com.liferay.portal.kernel.exception.SystemException; 212 213 /** 214 * Finds all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 215 * 216 * @param groupId the group ID to search with 217 * @param portletId the portlet ID to search with 218 * @param classNameId the class name ID to search with 219 * @return the matching portlet items 220 * @throws SystemException if a system exception occurred 221 */ 222 public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 223 long groupId, java.lang.String portletId, long classNameId) 224 throws com.liferay.portal.kernel.exception.SystemException; 225 226 /** 227 * Finds a range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 228 * 229 * <p> 230 * 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. 231 * </p> 232 * 233 * @param groupId the group ID to search with 234 * @param portletId the portlet ID to search with 235 * @param classNameId the class name ID to search with 236 * @param start the lower bound of the range of portlet items to return 237 * @param end the upper bound of the range of portlet items to return (not inclusive) 238 * @return the range of matching portlet items 239 * @throws SystemException if a system exception occurred 240 */ 241 public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 242 long groupId, java.lang.String portletId, long classNameId, int start, 243 int end) throws com.liferay.portal.kernel.exception.SystemException; 244 245 /** 246 * Finds an ordered range of all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 247 * 248 * <p> 249 * 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. 250 * </p> 251 * 252 * @param groupId the group ID to search with 253 * @param portletId the portlet ID to search with 254 * @param classNameId the class name ID to search with 255 * @param start the lower bound of the range of portlet items to return 256 * @param end the upper bound of the range of portlet items to return (not inclusive) 257 * @param orderByComparator the comparator to order the results by 258 * @return the ordered range of matching portlet items 259 * @throws SystemException if a system exception occurred 260 */ 261 public java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C( 262 long groupId, java.lang.String portletId, long classNameId, int start, 263 int end, 264 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 265 throws com.liferay.portal.kernel.exception.SystemException; 266 267 /** 268 * Finds the first portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 269 * 270 * <p> 271 * 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. 272 * </p> 273 * 274 * @param groupId the group ID to search with 275 * @param portletId the portlet ID to search with 276 * @param classNameId the class name ID to search with 277 * @param orderByComparator the comparator to order the set by 278 * @return the first matching portlet item 279 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 280 * @throws SystemException if a system exception occurred 281 */ 282 public com.liferay.portal.model.PortletItem findByG_P_C_First( 283 long groupId, java.lang.String portletId, long classNameId, 284 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 285 throws com.liferay.portal.NoSuchPortletItemException, 286 com.liferay.portal.kernel.exception.SystemException; 287 288 /** 289 * Finds the last portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 290 * 291 * <p> 292 * 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. 293 * </p> 294 * 295 * @param groupId the group ID to search with 296 * @param portletId the portlet ID to search with 297 * @param classNameId the class name ID to search with 298 * @param orderByComparator the comparator to order the set by 299 * @return the last matching portlet item 300 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public com.liferay.portal.model.PortletItem findByG_P_C_Last(long groupId, 304 java.lang.String portletId, long classNameId, 305 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 306 throws com.liferay.portal.NoSuchPortletItemException, 307 com.liferay.portal.kernel.exception.SystemException; 308 309 /** 310 * Finds the portlet items before and after the current portlet item in the ordered set where groupId = ? and portletId = ? and classNameId = ?. 311 * 312 * <p> 313 * 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. 314 * </p> 315 * 316 * @param portletItemId the primary key of the current portlet item 317 * @param groupId the group ID to search with 318 * @param portletId the portlet ID to search with 319 * @param classNameId the class name ID to search with 320 * @param orderByComparator the comparator to order the set by 321 * @return the previous, current, and next portlet item 322 * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found 323 * @throws SystemException if a system exception occurred 324 */ 325 public com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext( 326 long portletItemId, long groupId, java.lang.String portletId, 327 long classNameId, 328 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 329 throws com.liferay.portal.NoSuchPortletItemException, 330 com.liferay.portal.kernel.exception.SystemException; 331 332 /** 333 * 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. 334 * 335 * @param groupId the group ID to search with 336 * @param name the name to search with 337 * @param portletId the portlet ID to search with 338 * @param classNameId the class name ID to search with 339 * @return the matching portlet item 340 * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found 341 * @throws SystemException if a system exception occurred 342 */ 343 public com.liferay.portal.model.PortletItem findByG_N_P_C(long groupId, 344 java.lang.String name, java.lang.String portletId, long classNameId) 345 throws com.liferay.portal.NoSuchPortletItemException, 346 com.liferay.portal.kernel.exception.SystemException; 347 348 /** 349 * 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. 350 * 351 * @param groupId the group ID to search with 352 * @param name the name to search with 353 * @param portletId the portlet ID to search with 354 * @param classNameId the class name ID to search with 355 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 356 * @throws SystemException if a system exception occurred 357 */ 358 public com.liferay.portal.model.PortletItem fetchByG_N_P_C(long groupId, 359 java.lang.String name, java.lang.String portletId, long classNameId) 360 throws com.liferay.portal.kernel.exception.SystemException; 361 362 /** 363 * 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. 364 * 365 * @param groupId the group ID to search with 366 * @param name the name to search with 367 * @param portletId the portlet ID to search with 368 * @param classNameId the class name ID to search with 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 * Finds 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 * Finds 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 to return 394 * @param end the upper bound of the range of portlet items to return (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 * Finds 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 to return 410 * @param end the upper bound of the range of portlet items to return (not inclusive) 411 * @param orderByComparator the comparator to order the results by 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 to search with 424 * @param classNameId the class name ID to search with 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 to search with 434 * @param portletId the portlet ID to search with 435 * @param classNameId the class name ID to search with 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 to search with 446 * @param name the name to search with 447 * @param portletId the portlet ID to search with 448 * @param classNameId the class name ID to search with 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 * Counts all the portlet items where groupId = ? and classNameId = ?. 466 * 467 * @param groupId the group ID to search with 468 * @param classNameId the class name ID to search with 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 * Counts all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 477 * 478 * @param groupId the group ID to search with 479 * @param portletId the portlet ID to search with 480 * @param classNameId the class name ID to search with 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 * Counts all the portlet items where groupId = ? and name = ? and portletId = ? and classNameId = ?. 490 * 491 * @param groupId the group ID to search with 492 * @param name the name to search with 493 * @param portletId the portlet ID to search with 494 * @param classNameId the class name ID to search with 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 * Counts all the 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 511 public PortletItem remove(PortletItem portletItem) 512 throws SystemException; 513 }