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