001 /** 002 * Copyright (c) 2000-2010 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.service.ServiceContext; 022 023 import com.liferay.portlet.shopping.model.ShoppingCategory; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the shopping category service. 029 * 030 * <p> 031 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class. 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see ShoppingCategoryPersistence 036 * @see ShoppingCategoryPersistenceImpl 037 * @generated 038 */ 039 public class ShoppingCategoryUtil { 040 /** 041 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 042 */ 043 public static void clearCache() { 044 getPersistence().clearCache(); 045 } 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 049 */ 050 public static void clearCache(ShoppingCategory shoppingCategory) { 051 getPersistence().clearCache(shoppingCategory); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 056 */ 057 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 058 throws SystemException { 059 return getPersistence().countWithDynamicQuery(dynamicQuery); 060 } 061 062 /** 063 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 064 */ 065 public static List<ShoppingCategory> findWithDynamicQuery( 066 DynamicQuery dynamicQuery) throws SystemException { 067 return getPersistence().findWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 072 */ 073 public static List<ShoppingCategory> findWithDynamicQuery( 074 DynamicQuery dynamicQuery, int start, int end) 075 throws SystemException { 076 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 077 } 078 079 /** 080 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 081 */ 082 public static List<ShoppingCategory> findWithDynamicQuery( 083 DynamicQuery dynamicQuery, int start, int end, 084 OrderByComparator orderByComparator) throws SystemException { 085 return getPersistence() 086 .findWithDynamicQuery(dynamicQuery, start, end, 087 orderByComparator); 088 } 089 090 /** 091 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 092 */ 093 public static ShoppingCategory remove(ShoppingCategory shoppingCategory) 094 throws SystemException { 095 return getPersistence().remove(shoppingCategory); 096 } 097 098 /** 099 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 100 */ 101 public static ShoppingCategory update(ShoppingCategory shoppingCategory, 102 boolean merge) throws SystemException { 103 return getPersistence().update(shoppingCategory, merge); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 108 */ 109 public static ShoppingCategory update(ShoppingCategory shoppingCategory, 110 boolean merge, ServiceContext serviceContext) throws SystemException { 111 return getPersistence().update(shoppingCategory, merge, serviceContext); 112 } 113 114 /** 115 * Caches the shopping category in the entity cache if it is enabled. 116 * 117 * @param shoppingCategory the shopping category to cache 118 */ 119 public static void cacheResult( 120 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) { 121 getPersistence().cacheResult(shoppingCategory); 122 } 123 124 /** 125 * Caches the shopping categories in the entity cache if it is enabled. 126 * 127 * @param shoppingCategories the shopping categories to cache 128 */ 129 public static void cacheResult( 130 java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories) { 131 getPersistence().cacheResult(shoppingCategories); 132 } 133 134 /** 135 * Creates a new shopping category with the primary key. 136 * 137 * @param categoryId the primary key for the new shopping category 138 * @return the new shopping category 139 */ 140 public static com.liferay.portlet.shopping.model.ShoppingCategory create( 141 long categoryId) { 142 return getPersistence().create(categoryId); 143 } 144 145 /** 146 * Removes the shopping category with the primary key from the database. Also notifies the appropriate model listeners. 147 * 148 * @param categoryId the primary key of the shopping category to remove 149 * @return the shopping category that was removed 150 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found 151 * @throws SystemException if a system exception occurred 152 */ 153 public static com.liferay.portlet.shopping.model.ShoppingCategory remove( 154 long categoryId) 155 throws com.liferay.portal.kernel.exception.SystemException, 156 com.liferay.portlet.shopping.NoSuchCategoryException { 157 return getPersistence().remove(categoryId); 158 } 159 160 public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl( 161 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory, 162 boolean merge) 163 throws com.liferay.portal.kernel.exception.SystemException { 164 return getPersistence().updateImpl(shoppingCategory, merge); 165 } 166 167 /** 168 * Finds the shopping category with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchCategoryException} if it could not be found. 169 * 170 * @param categoryId the primary key of the shopping category to find 171 * @return the shopping category 172 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey( 176 long categoryId) 177 throws com.liferay.portal.kernel.exception.SystemException, 178 com.liferay.portlet.shopping.NoSuchCategoryException { 179 return getPersistence().findByPrimaryKey(categoryId); 180 } 181 182 /** 183 * Finds the shopping category with the primary key or returns <code>null</code> if it could not be found. 184 * 185 * @param categoryId the primary key of the shopping category to find 186 * @return the shopping category, or <code>null</code> if a shopping category with the primary key could not be found 187 * @throws SystemException if a system exception occurred 188 */ 189 public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey( 190 long categoryId) 191 throws com.liferay.portal.kernel.exception.SystemException { 192 return getPersistence().fetchByPrimaryKey(categoryId); 193 } 194 195 /** 196 * Finds all the shopping categories where groupId = ?. 197 * 198 * @param groupId the group id to search with 199 * @return the matching shopping categories 200 * @throws SystemException if a system exception occurred 201 */ 202 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId( 203 long groupId) 204 throws com.liferay.portal.kernel.exception.SystemException { 205 return getPersistence().findByGroupId(groupId); 206 } 207 208 /** 209 * Finds a range of all the shopping categories where groupId = ?. 210 * 211 * <p> 212 * 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. 213 * </p> 214 * 215 * @param groupId the group id to search with 216 * @param start the lower bound of the range of shopping categories to return 217 * @param end the upper bound of the range of shopping categories to return (not inclusive) 218 * @return the range of matching shopping categories 219 * @throws SystemException if a system exception occurred 220 */ 221 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId( 222 long groupId, int start, int end) 223 throws com.liferay.portal.kernel.exception.SystemException { 224 return getPersistence().findByGroupId(groupId, start, end); 225 } 226 227 /** 228 * Finds an ordered range of all the shopping categories where groupId = ?. 229 * 230 * <p> 231 * 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. 232 * </p> 233 * 234 * @param groupId the group id to search with 235 * @param start the lower bound of the range of shopping categories to return 236 * @param end the upper bound of the range of shopping categories to return (not inclusive) 237 * @param orderByComparator the comparator to order the results by 238 * @return the ordered range of matching shopping categories 239 * @throws SystemException if a system exception occurred 240 */ 241 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId( 242 long groupId, int start, int end, 243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 244 throws com.liferay.portal.kernel.exception.SystemException { 245 return getPersistence() 246 .findByGroupId(groupId, start, end, orderByComparator); 247 } 248 249 /** 250 * Finds the first shopping category in the ordered set where groupId = ?. 251 * 252 * <p> 253 * 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. 254 * </p> 255 * 256 * @param groupId the group id to search with 257 * @param orderByComparator the comparator to order the set by 258 * @return the first matching shopping category 259 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found 260 * @throws SystemException if a system exception occurred 261 */ 262 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First( 263 long groupId, 264 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 265 throws com.liferay.portal.kernel.exception.SystemException, 266 com.liferay.portlet.shopping.NoSuchCategoryException { 267 return getPersistence().findByGroupId_First(groupId, orderByComparator); 268 } 269 270 /** 271 * Finds the last shopping category in the ordered set where groupId = ?. 272 * 273 * <p> 274 * 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. 275 * </p> 276 * 277 * @param groupId the group id to search with 278 * @param orderByComparator the comparator to order the set by 279 * @return the last matching shopping category 280 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found 281 * @throws SystemException if a system exception occurred 282 */ 283 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last( 284 long groupId, 285 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 286 throws com.liferay.portal.kernel.exception.SystemException, 287 com.liferay.portlet.shopping.NoSuchCategoryException { 288 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 289 } 290 291 /** 292 * Finds the shopping categories before and after the current shopping category in the ordered set where groupId = ?. 293 * 294 * <p> 295 * 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. 296 * </p> 297 * 298 * @param categoryId the primary key of the current shopping category 299 * @param groupId the group id to search with 300 * @param orderByComparator the comparator to order the set by 301 * @return the previous, current, and next shopping category 302 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found 303 * @throws SystemException if a system exception occurred 304 */ 305 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext( 306 long categoryId, long groupId, 307 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 308 throws com.liferay.portal.kernel.exception.SystemException, 309 com.liferay.portlet.shopping.NoSuchCategoryException { 310 return getPersistence() 311 .findByGroupId_PrevAndNext(categoryId, groupId, 312 orderByComparator); 313 } 314 315 /** 316 * Filters by the user's permissions and finds all the shopping categories where groupId = ?. 317 * 318 * @param groupId the group id to search with 319 * @return the matching shopping categories that the user has permission to view 320 * @throws SystemException if a system exception occurred 321 */ 322 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId( 323 long groupId) 324 throws com.liferay.portal.kernel.exception.SystemException { 325 return getPersistence().filterFindByGroupId(groupId); 326 } 327 328 /** 329 * Filters by the user's permissions and finds a range of all the shopping categories where groupId = ?. 330 * 331 * <p> 332 * 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. 333 * </p> 334 * 335 * @param groupId the group id to search with 336 * @param start the lower bound of the range of shopping categories to return 337 * @param end the upper bound of the range of shopping categories to return (not inclusive) 338 * @return the range of matching shopping categories that the user has permission to view 339 * @throws SystemException if a system exception occurred 340 */ 341 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId( 342 long groupId, int start, int end) 343 throws com.liferay.portal.kernel.exception.SystemException { 344 return getPersistence().filterFindByGroupId(groupId, start, end); 345 } 346 347 /** 348 * Filters by the user's permissions and finds an ordered range of all the shopping categories where groupId = ?. 349 * 350 * <p> 351 * 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. 352 * </p> 353 * 354 * @param groupId the group id to search with 355 * @param start the lower bound of the range of shopping categories to return 356 * @param end the upper bound of the range of shopping categories to return (not inclusive) 357 * @param orderByComparator the comparator to order the results by 358 * @return the ordered range of matching shopping categories that the user has permission to view 359 * @throws SystemException if a system exception occurred 360 */ 361 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId( 362 long groupId, int start, int end, 363 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 364 throws com.liferay.portal.kernel.exception.SystemException { 365 return getPersistence() 366 .filterFindByGroupId(groupId, start, end, orderByComparator); 367 } 368 369 /** 370 * Finds all the shopping categories where groupId = ? and parentCategoryId = ?. 371 * 372 * @param groupId the group id to search with 373 * @param parentCategoryId the parent category id to search with 374 * @return the matching shopping categories 375 * @throws SystemException if a system exception occurred 376 */ 377 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P( 378 long groupId, long parentCategoryId) 379 throws com.liferay.portal.kernel.exception.SystemException { 380 return getPersistence().findByG_P(groupId, parentCategoryId); 381 } 382 383 /** 384 * Finds a range of all the shopping categories where groupId = ? and parentCategoryId = ?. 385 * 386 * <p> 387 * 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. 388 * </p> 389 * 390 * @param groupId the group id to search with 391 * @param parentCategoryId the parent category id to search with 392 * @param start the lower bound of the range of shopping categories to return 393 * @param end the upper bound of the range of shopping categories to return (not inclusive) 394 * @return the range of matching shopping categories 395 * @throws SystemException if a system exception occurred 396 */ 397 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P( 398 long groupId, long parentCategoryId, int start, int end) 399 throws com.liferay.portal.kernel.exception.SystemException { 400 return getPersistence().findByG_P(groupId, parentCategoryId, start, end); 401 } 402 403 /** 404 * Finds an ordered range of all the shopping categories where groupId = ? and parentCategoryId = ?. 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 groupId the group id to search with 411 * @param parentCategoryId the parent category id to search with 412 * @param start the lower bound of the range of shopping categories to return 413 * @param end the upper bound of the range of shopping categories to return (not inclusive) 414 * @param orderByComparator the comparator to order the results by 415 * @return the ordered range of matching shopping categories 416 * @throws SystemException if a system exception occurred 417 */ 418 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P( 419 long groupId, long parentCategoryId, int start, int end, 420 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 421 throws com.liferay.portal.kernel.exception.SystemException { 422 return getPersistence() 423 .findByG_P(groupId, parentCategoryId, start, end, 424 orderByComparator); 425 } 426 427 /** 428 * Finds the first shopping category in the ordered set where groupId = ? and parentCategoryId = ?. 429 * 430 * <p> 431 * 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. 432 * </p> 433 * 434 * @param groupId the group id to search with 435 * @param parentCategoryId the parent category id to search with 436 * @param orderByComparator the comparator to order the set by 437 * @return the first matching shopping category 438 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First( 442 long groupId, long parentCategoryId, 443 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 444 throws com.liferay.portal.kernel.exception.SystemException, 445 com.liferay.portlet.shopping.NoSuchCategoryException { 446 return getPersistence() 447 .findByG_P_First(groupId, parentCategoryId, orderByComparator); 448 } 449 450 /** 451 * Finds the last shopping category in the ordered set where groupId = ? and parentCategoryId = ?. 452 * 453 * <p> 454 * 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. 455 * </p> 456 * 457 * @param groupId the group id to search with 458 * @param parentCategoryId the parent category id to search with 459 * @param orderByComparator the comparator to order the set by 460 * @return the last matching shopping category 461 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a matching shopping category could not be found 462 * @throws SystemException if a system exception occurred 463 */ 464 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last( 465 long groupId, long parentCategoryId, 466 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 467 throws com.liferay.portal.kernel.exception.SystemException, 468 com.liferay.portlet.shopping.NoSuchCategoryException { 469 return getPersistence() 470 .findByG_P_Last(groupId, parentCategoryId, orderByComparator); 471 } 472 473 /** 474 * Finds the shopping categories before and after the current shopping category in the ordered set where groupId = ? and parentCategoryId = ?. 475 * 476 * <p> 477 * 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. 478 * </p> 479 * 480 * @param categoryId the primary key of the current shopping category 481 * @param groupId the group id to search with 482 * @param parentCategoryId the parent category id to search with 483 * @param orderByComparator the comparator to order the set by 484 * @return the previous, current, and next shopping category 485 * @throws com.liferay.portlet.shopping.NoSuchCategoryException if a shopping category with the primary key could not be found 486 * @throws SystemException if a system exception occurred 487 */ 488 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext( 489 long categoryId, long groupId, long parentCategoryId, 490 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 491 throws com.liferay.portal.kernel.exception.SystemException, 492 com.liferay.portlet.shopping.NoSuchCategoryException { 493 return getPersistence() 494 .findByG_P_PrevAndNext(categoryId, groupId, 495 parentCategoryId, orderByComparator); 496 } 497 498 /** 499 * Filters by the user's permissions and finds all the shopping categories where groupId = ? and parentCategoryId = ?. 500 * 501 * @param groupId the group id to search with 502 * @param parentCategoryId the parent category id to search with 503 * @return the matching shopping categories that the user has permission to view 504 * @throws SystemException if a system exception occurred 505 */ 506 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P( 507 long groupId, long parentCategoryId) 508 throws com.liferay.portal.kernel.exception.SystemException { 509 return getPersistence().filterFindByG_P(groupId, parentCategoryId); 510 } 511 512 /** 513 * Filters by the user's permissions and finds a range of all the shopping categories where groupId = ? and parentCategoryId = ?. 514 * 515 * <p> 516 * 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. 517 * </p> 518 * 519 * @param groupId the group id to search with 520 * @param parentCategoryId the parent category id to search with 521 * @param start the lower bound of the range of shopping categories to return 522 * @param end the upper bound of the range of shopping categories to return (not inclusive) 523 * @return the range of matching shopping categories that the user has permission to view 524 * @throws SystemException if a system exception occurred 525 */ 526 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P( 527 long groupId, long parentCategoryId, int start, int end) 528 throws com.liferay.portal.kernel.exception.SystemException { 529 return getPersistence() 530 .filterFindByG_P(groupId, parentCategoryId, start, end); 531 } 532 533 /** 534 * Filters by the user's permissions and finds an ordered range of all the shopping categories where groupId = ? and parentCategoryId = ?. 535 * 536 * <p> 537 * 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. 538 * </p> 539 * 540 * @param groupId the group id to search with 541 * @param parentCategoryId the parent category id to search with 542 * @param start the lower bound of the range of shopping categories to return 543 * @param end the upper bound of the range of shopping categories to return (not inclusive) 544 * @param orderByComparator the comparator to order the results by 545 * @return the ordered range of matching shopping categories that the user has permission to view 546 * @throws SystemException if a system exception occurred 547 */ 548 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P( 549 long groupId, long parentCategoryId, int start, int end, 550 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 551 throws com.liferay.portal.kernel.exception.SystemException { 552 return getPersistence() 553 .filterFindByG_P(groupId, parentCategoryId, start, end, 554 orderByComparator); 555 } 556 557 /** 558 * Finds all the shopping categories. 559 * 560 * @return the shopping categories 561 * @throws SystemException if a system exception occurred 562 */ 563 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll() 564 throws com.liferay.portal.kernel.exception.SystemException { 565 return getPersistence().findAll(); 566 } 567 568 /** 569 * Finds a range of all the shopping categories. 570 * 571 * <p> 572 * 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. 573 * </p> 574 * 575 * @param start the lower bound of the range of shopping categories to return 576 * @param end the upper bound of the range of shopping categories to return (not inclusive) 577 * @return the range of shopping categories 578 * @throws SystemException if a system exception occurred 579 */ 580 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll( 581 int start, int end) 582 throws com.liferay.portal.kernel.exception.SystemException { 583 return getPersistence().findAll(start, end); 584 } 585 586 /** 587 * Finds an ordered range of all the shopping categories. 588 * 589 * <p> 590 * 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. 591 * </p> 592 * 593 * @param start the lower bound of the range of shopping categories to return 594 * @param end the upper bound of the range of shopping categories to return (not inclusive) 595 * @param orderByComparator the comparator to order the results by 596 * @return the ordered range of shopping categories 597 * @throws SystemException if a system exception occurred 598 */ 599 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll( 600 int start, int end, 601 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 602 throws com.liferay.portal.kernel.exception.SystemException { 603 return getPersistence().findAll(start, end, orderByComparator); 604 } 605 606 /** 607 * Removes all the shopping categories where groupId = ? from the database. 608 * 609 * @param groupId the group id to search with 610 * @throws SystemException if a system exception occurred 611 */ 612 public static void removeByGroupId(long groupId) 613 throws com.liferay.portal.kernel.exception.SystemException { 614 getPersistence().removeByGroupId(groupId); 615 } 616 617 /** 618 * Removes all the shopping categories where groupId = ? and parentCategoryId = ? from the database. 619 * 620 * @param groupId the group id to search with 621 * @param parentCategoryId the parent category id to search with 622 * @throws SystemException if a system exception occurred 623 */ 624 public static void removeByG_P(long groupId, long parentCategoryId) 625 throws com.liferay.portal.kernel.exception.SystemException { 626 getPersistence().removeByG_P(groupId, parentCategoryId); 627 } 628 629 /** 630 * Removes all the shopping categories from the database. 631 * 632 * @throws SystemException if a system exception occurred 633 */ 634 public static void removeAll() 635 throws com.liferay.portal.kernel.exception.SystemException { 636 getPersistence().removeAll(); 637 } 638 639 /** 640 * Counts all the shopping categories where groupId = ?. 641 * 642 * @param groupId the group id to search with 643 * @return the number of matching shopping categories 644 * @throws SystemException if a system exception occurred 645 */ 646 public static int countByGroupId(long groupId) 647 throws com.liferay.portal.kernel.exception.SystemException { 648 return getPersistence().countByGroupId(groupId); 649 } 650 651 /** 652 * Filters by the user's permissions and counts all the shopping categories where groupId = ?. 653 * 654 * @param groupId the group id to search with 655 * @return the number of matching shopping categories that the user has permission to view 656 * @throws SystemException if a system exception occurred 657 */ 658 public static int filterCountByGroupId(long groupId) 659 throws com.liferay.portal.kernel.exception.SystemException { 660 return getPersistence().filterCountByGroupId(groupId); 661 } 662 663 /** 664 * Counts all the shopping categories where groupId = ? and parentCategoryId = ?. 665 * 666 * @param groupId the group id to search with 667 * @param parentCategoryId the parent category id to search with 668 * @return the number of matching shopping categories 669 * @throws SystemException if a system exception occurred 670 */ 671 public static int countByG_P(long groupId, long parentCategoryId) 672 throws com.liferay.portal.kernel.exception.SystemException { 673 return getPersistence().countByG_P(groupId, parentCategoryId); 674 } 675 676 /** 677 * Filters by the user's permissions and counts all the shopping categories where groupId = ? and parentCategoryId = ?. 678 * 679 * @param groupId the group id to search with 680 * @param parentCategoryId the parent category id to search with 681 * @return the number of matching shopping categories that the user has permission to view 682 * @throws SystemException if a system exception occurred 683 */ 684 public static int filterCountByG_P(long groupId, long parentCategoryId) 685 throws com.liferay.portal.kernel.exception.SystemException { 686 return getPersistence().filterCountByG_P(groupId, parentCategoryId); 687 } 688 689 /** 690 * Counts all the shopping categories. 691 * 692 * @return the number of shopping categories 693 * @throws SystemException if a system exception occurred 694 */ 695 public static int countAll() 696 throws com.liferay.portal.kernel.exception.SystemException { 697 return getPersistence().countAll(); 698 } 699 700 public static ShoppingCategoryPersistence getPersistence() { 701 if (_persistence == null) { 702 _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName()); 703 } 704 705 return _persistence; 706 } 707 708 public void setPersistence(ShoppingCategoryPersistence persistence) { 709 _persistence = persistence; 710 } 711 712 private static ShoppingCategoryPersistence _persistence; 713 }