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