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 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 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 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 * Returns 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 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 * Returns 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 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 * Returns all the portlet items where groupId = ? and classNameId = ?. 104 * 105 * @param groupId the group ID 106 * @param classNameId the class name ID 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 * Returns 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 122 * @param classNameId the class name ID 123 * @param start the lower bound of the range of portlet items 124 * @param end the upper bound of the range of portlet items (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 * Returns 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 140 * @param classNameId the class name ID 141 * @param start the lower bound of the range of portlet items 142 * @param end the upper bound of the range of portlet items (not inclusive) 143 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 160 * @param classNameId the class name ID 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 180 * @param classNameId the class name ID 181 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 201 * @param classNameId the class name ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns all the portlet items where groupId = ? and portletId = ? and classNameId = ?. 215 * 216 * @param groupId the group ID 217 * @param portletId the portlet ID 218 * @param classNameId the class name ID 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 * Returns 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 234 * @param portletId the portlet ID 235 * @param classNameId the class name ID 236 * @param start the lower bound of the range of portlet items 237 * @param end the upper bound of the range of portlet items (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 * Returns 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 253 * @param portletId the portlet ID 254 * @param classNameId the class name ID 255 * @param start the lower bound of the range of portlet items 256 * @param end the upper bound of the range of portlet items (not inclusive) 257 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 275 * @param portletId the portlet ID 276 * @param classNameId the class name ID 277 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 296 * @param portletId the portlet ID 297 * @param classNameId the class name ID 298 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 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 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 * 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. 334 * 335 * @param groupId the group ID 336 * @param name the name 337 * @param portletId the portlet ID 338 * @param classNameId the class name ID 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 * 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. 350 * 351 * @param groupId the group ID 352 * @param name the name 353 * @param portletId the portlet ID 354 * @param classNameId the class name ID 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 * 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. 364 * 365 * @param groupId the group ID 366 * @param name the name 367 * @param portletId the portlet ID 368 * @param classNameId the class name ID 369 * @param retrieveFromCache whether to use the finder cache 370 * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found 371 * @throws SystemException if a system exception occurred 372 */ 373 public com.liferay.portal.model.PortletItem fetchByG_N_P_C(long groupId, 374 java.lang.String name, java.lang.String portletId, long classNameId, 375 boolean retrieveFromCache) 376 throws com.liferay.portal.kernel.exception.SystemException; 377 378 /** 379 * Returns all the portlet items. 380 * 381 * @return the portlet items 382 * @throws SystemException if a system exception occurred 383 */ 384 public java.util.List<com.liferay.portal.model.PortletItem> findAll() 385 throws com.liferay.portal.kernel.exception.SystemException; 386 387 /** 388 * Returns a range of all the portlet items. 389 * 390 * <p> 391 * 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. 392 * </p> 393 * 394 * @param start the lower bound of the range of portlet items 395 * @param end the upper bound of the range of portlet items (not inclusive) 396 * @return the range of portlet items 397 * @throws SystemException if a system exception occurred 398 */ 399 public java.util.List<com.liferay.portal.model.PortletItem> findAll( 400 int start, int end) 401 throws com.liferay.portal.kernel.exception.SystemException; 402 403 /** 404 * Returns an ordered range of all the portlet items. 405 * 406 * <p> 407 * 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. 408 * </p> 409 * 410 * @param start the lower bound of the range of portlet items 411 * @param end the upper bound of the range of portlet items (not inclusive) 412 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 413 * @return the ordered range of portlet items 414 * @throws SystemException if a system exception occurred 415 */ 416 public java.util.List<com.liferay.portal.model.PortletItem> findAll( 417 int start, int end, 418 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 419 throws com.liferay.portal.kernel.exception.SystemException; 420 421 /** 422 * Removes all the portlet items where groupId = ? and classNameId = ? from the database. 423 * 424 * @param groupId the group ID 425 * @param classNameId the class name ID 426 * @throws SystemException if a system exception occurred 427 */ 428 public void removeByG_C(long groupId, long classNameId) 429 throws com.liferay.portal.kernel.exception.SystemException; 430 431 /** 432 * Removes all the portlet items where groupId = ? and portletId = ? and classNameId = ? from the database. 433 * 434 * @param groupId the group ID 435 * @param portletId the portlet ID 436 * @param classNameId the class name ID 437 * @throws SystemException if a system exception occurred 438 */ 439 public void removeByG_P_C(long groupId, java.lang.String portletId, 440 long classNameId) 441 throws com.liferay.portal.kernel.exception.SystemException; 442 443 /** 444 * Removes the portlet item where groupId = ? and name = ? and portletId = ? and classNameId = ? from the database. 445 * 446 * @param groupId the group ID 447 * @param name the name 448 * @param portletId the portlet ID 449 * @param classNameId the class name ID 450 * @throws SystemException if a system exception occurred 451 */ 452 public void removeByG_N_P_C(long groupId, java.lang.String name, 453 java.lang.String portletId, long classNameId) 454 throws com.liferay.portal.NoSuchPortletItemException, 455 com.liferay.portal.kernel.exception.SystemException; 456 457 /** 458 * Removes all the portlet items from the database. 459 * 460 * @throws SystemException if a system exception occurred 461 */ 462 public void removeAll() 463 throws com.liferay.portal.kernel.exception.SystemException; 464 465 /** 466 * Returns the number of portlet items where groupId = ? and classNameId = ?. 467 * 468 * @param groupId the group ID 469 * @param classNameId the class name ID 470 * @return the number of matching portlet items 471 * @throws SystemException if a system exception occurred 472 */ 473 public int countByG_C(long groupId, long classNameId) 474 throws com.liferay.portal.kernel.exception.SystemException; 475 476 /** 477 * Returns the number of portlet items where groupId = ? and portletId = ? and classNameId = ?. 478 * 479 * @param groupId the group ID 480 * @param portletId the portlet ID 481 * @param classNameId the class name ID 482 * @return the number of matching portlet items 483 * @throws SystemException if a system exception occurred 484 */ 485 public int countByG_P_C(long groupId, java.lang.String portletId, 486 long classNameId) 487 throws com.liferay.portal.kernel.exception.SystemException; 488 489 /** 490 * Returns the number of portlet items where groupId = ? and name = ? and portletId = ? and classNameId = ?. 491 * 492 * @param groupId the group ID 493 * @param name the name 494 * @param portletId the portlet ID 495 * @param classNameId the class name ID 496 * @return the number of matching portlet items 497 * @throws SystemException if a system exception occurred 498 */ 499 public int countByG_N_P_C(long groupId, java.lang.String name, 500 java.lang.String portletId, long classNameId) 501 throws com.liferay.portal.kernel.exception.SystemException; 502 503 /** 504 * Returns the number of portlet items. 505 * 506 * @return the number of portlet items 507 * @throws SystemException if a system exception occurred 508 */ 509 public int countAll() 510 throws com.liferay.portal.kernel.exception.SystemException; 511 512 public PortletItem remove(PortletItem portletItem) 513 throws SystemException; 514 }