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.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.shopping.model.ShoppingItemField; 020 021 /** 022 * The persistence interface for the shopping item field service. 023 * 024 * <p> 025 * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface. 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see ShoppingItemFieldPersistenceImpl 030 * @see ShoppingItemFieldUtil 031 * @generated 032 */ 033 public interface ShoppingItemFieldPersistence extends BasePersistence<ShoppingItemField> { 034 /** 035 * Caches the shopping item field in the entity cache if it is enabled. 036 * 037 * @param shoppingItemField the shopping item field to cache 038 */ 039 public void cacheResult( 040 com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField); 041 042 /** 043 * Caches the shopping item fields in the entity cache if it is enabled. 044 * 045 * @param shoppingItemFields the shopping item fields to cache 046 */ 047 public void cacheResult( 048 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> shoppingItemFields); 049 050 /** 051 * Creates a new shopping item field with the primary key. 052 * 053 * @param itemFieldId the primary key for the new shopping item field 054 * @return the new shopping item field 055 */ 056 public com.liferay.portlet.shopping.model.ShoppingItemField create( 057 long itemFieldId); 058 059 /** 060 * Removes the shopping item field with the primary key from the database. Also notifies the appropriate model listeners. 061 * 062 * @param itemFieldId the primary key of the shopping item field to remove 063 * @return the shopping item field that was removed 064 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 065 * @throws SystemException if a system exception occurred 066 */ 067 public com.liferay.portlet.shopping.model.ShoppingItemField remove( 068 long itemFieldId) 069 throws com.liferay.portal.kernel.exception.SystemException, 070 com.liferay.portlet.shopping.NoSuchItemFieldException; 071 072 public com.liferay.portlet.shopping.model.ShoppingItemField updateImpl( 073 com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField, 074 boolean merge) 075 throws com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Finds the shopping item field with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemFieldException} if it could not be found. 079 * 080 * @param itemFieldId the primary key of the shopping item field to find 081 * @return the shopping item field 082 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portlet.shopping.model.ShoppingItemField findByPrimaryKey( 086 long itemFieldId) 087 throws com.liferay.portal.kernel.exception.SystemException, 088 com.liferay.portlet.shopping.NoSuchItemFieldException; 089 090 /** 091 * Finds the shopping item field with the primary key or returns <code>null</code> if it could not be found. 092 * 093 * @param itemFieldId the primary key of the shopping item field to find 094 * @return the shopping item field, or <code>null</code> if a shopping item field with the primary key could not be found 095 * @throws SystemException if a system exception occurred 096 */ 097 public com.liferay.portlet.shopping.model.ShoppingItemField fetchByPrimaryKey( 098 long itemFieldId) 099 throws com.liferay.portal.kernel.exception.SystemException; 100 101 /** 102 * Finds all the shopping item fields where itemId = ?. 103 * 104 * @param itemId the item id to search with 105 * @return the matching shopping item fields 106 * @throws SystemException if a system exception occurred 107 */ 108 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 109 long itemId) throws com.liferay.portal.kernel.exception.SystemException; 110 111 /** 112 * Finds a range of all the shopping item fields where itemId = ?. 113 * 114 * <p> 115 * 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. 116 * </p> 117 * 118 * @param itemId the item id to search with 119 * @param start the lower bound of the range of shopping item fields to return 120 * @param end the upper bound of the range of shopping item fields to return (not inclusive) 121 * @return the range of matching shopping item fields 122 * @throws SystemException if a system exception occurred 123 */ 124 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 125 long itemId, int start, int end) 126 throws com.liferay.portal.kernel.exception.SystemException; 127 128 /** 129 * Finds an ordered range of all the shopping item fields where itemId = ?. 130 * 131 * <p> 132 * 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. 133 * </p> 134 * 135 * @param itemId the item id to search with 136 * @param start the lower bound of the range of shopping item fields to return 137 * @param end the upper bound of the range of shopping item fields to return (not inclusive) 138 * @param orderByComparator the comparator to order the results by 139 * @return the ordered range of matching shopping item fields 140 * @throws SystemException if a system exception occurred 141 */ 142 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 143 long itemId, int start, int end, 144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 145 throws com.liferay.portal.kernel.exception.SystemException; 146 147 /** 148 * Finds the first shopping item field in the ordered set where itemId = ?. 149 * 150 * <p> 151 * 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. 152 * </p> 153 * 154 * @param itemId the item id to search with 155 * @param orderByComparator the comparator to order the set by 156 * @return the first matching shopping item field 157 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_First( 161 long itemId, 162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 163 throws com.liferay.portal.kernel.exception.SystemException, 164 com.liferay.portlet.shopping.NoSuchItemFieldException; 165 166 /** 167 * Finds the last shopping item field in the ordered set where itemId = ?. 168 * 169 * <p> 170 * 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. 171 * </p> 172 * 173 * @param itemId the item id to search with 174 * @param orderByComparator the comparator to order the set by 175 * @return the last matching shopping item field 176 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found 177 * @throws SystemException if a system exception occurred 178 */ 179 public com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_Last( 180 long itemId, 181 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 182 throws com.liferay.portal.kernel.exception.SystemException, 183 com.liferay.portlet.shopping.NoSuchItemFieldException; 184 185 /** 186 * Finds the shopping item fields before and after the current shopping item field in the ordered set where itemId = ?. 187 * 188 * <p> 189 * 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. 190 * </p> 191 * 192 * @param itemFieldId the primary key of the current shopping item field 193 * @param itemId the item id to search with 194 * @param orderByComparator the comparator to order the set by 195 * @return the previous, current, and next shopping item field 196 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public com.liferay.portlet.shopping.model.ShoppingItemField[] findByItemId_PrevAndNext( 200 long itemFieldId, long itemId, 201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 202 throws com.liferay.portal.kernel.exception.SystemException, 203 com.liferay.portlet.shopping.NoSuchItemFieldException; 204 205 /** 206 * Finds all the shopping item fields. 207 * 208 * @return the shopping item fields 209 * @throws SystemException if a system exception occurred 210 */ 211 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll() 212 throws com.liferay.portal.kernel.exception.SystemException; 213 214 /** 215 * Finds a range of all the shopping item fields. 216 * 217 * <p> 218 * 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. 219 * </p> 220 * 221 * @param start the lower bound of the range of shopping item fields to return 222 * @param end the upper bound of the range of shopping item fields to return (not inclusive) 223 * @return the range of shopping item fields 224 * @throws SystemException if a system exception occurred 225 */ 226 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll( 227 int start, int end) 228 throws com.liferay.portal.kernel.exception.SystemException; 229 230 /** 231 * Finds an ordered range of all the shopping item fields. 232 * 233 * <p> 234 * 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. 235 * </p> 236 * 237 * @param start the lower bound of the range of shopping item fields to return 238 * @param end the upper bound of the range of shopping item fields to return (not inclusive) 239 * @param orderByComparator the comparator to order the results by 240 * @return the ordered range of shopping item fields 241 * @throws SystemException if a system exception occurred 242 */ 243 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll( 244 int start, int end, 245 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 246 throws com.liferay.portal.kernel.exception.SystemException; 247 248 /** 249 * Removes all the shopping item fields where itemId = ? from the database. 250 * 251 * @param itemId the item id to search with 252 * @throws SystemException if a system exception occurred 253 */ 254 public void removeByItemId(long itemId) 255 throws com.liferay.portal.kernel.exception.SystemException; 256 257 /** 258 * Removes all the shopping item fields from the database. 259 * 260 * @throws SystemException if a system exception occurred 261 */ 262 public void removeAll() 263 throws com.liferay.portal.kernel.exception.SystemException; 264 265 /** 266 * Counts all the shopping item fields where itemId = ?. 267 * 268 * @param itemId the item id to search with 269 * @return the number of matching shopping item fields 270 * @throws SystemException if a system exception occurred 271 */ 272 public int countByItemId(long itemId) 273 throws com.liferay.portal.kernel.exception.SystemException; 274 275 /** 276 * Counts all the shopping item fields. 277 * 278 * @return the number of shopping item fields 279 * @throws SystemException if a system exception occurred 280 */ 281 public int countAll() 282 throws com.liferay.portal.kernel.exception.SystemException; 283 }