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