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