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