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