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