001 /** 002 * Copyright (c) 2000-2013 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 boolean merge) 081 throws com.liferay.portal.kernel.exception.SystemException; 082 083 /** 084 * Returns the shopping item field with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemFieldException} if it could not be found. 085 * 086 * @param itemFieldId the primary key of the shopping item field 087 * @return the shopping item field 088 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 089 * @throws SystemException if a system exception occurred 090 */ 091 public com.liferay.portlet.shopping.model.ShoppingItemField findByPrimaryKey( 092 long itemFieldId) 093 throws com.liferay.portal.kernel.exception.SystemException, 094 com.liferay.portlet.shopping.NoSuchItemFieldException; 095 096 /** 097 * Returns the shopping item field with the primary key or returns <code>null</code> if it could not be found. 098 * 099 * @param itemFieldId the primary key of the shopping item field 100 * @return the shopping item field, or <code>null</code> if a shopping item field with the primary key could not be found 101 * @throws SystemException if a system exception occurred 102 */ 103 public com.liferay.portlet.shopping.model.ShoppingItemField fetchByPrimaryKey( 104 long itemFieldId) 105 throws com.liferay.portal.kernel.exception.SystemException; 106 107 /** 108 * Returns all the shopping item fields where itemId = ?. 109 * 110 * @param itemId the item ID 111 * @return the matching shopping item fields 112 * @throws SystemException if a system exception occurred 113 */ 114 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 115 long itemId) throws com.liferay.portal.kernel.exception.SystemException; 116 117 /** 118 * Returns a range of all the shopping item fields where itemId = ?. 119 * 120 * <p> 121 * 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. 122 * </p> 123 * 124 * @param itemId the item ID 125 * @param start the lower bound of the range of shopping item fields 126 * @param end the upper bound of the range of shopping item fields (not inclusive) 127 * @return the range of matching shopping item fields 128 * @throws SystemException if a system exception occurred 129 */ 130 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 131 long itemId, int start, int end) 132 throws com.liferay.portal.kernel.exception.SystemException; 133 134 /** 135 * Returns an ordered range of all the shopping item fields where itemId = ?. 136 * 137 * <p> 138 * 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. 139 * </p> 140 * 141 * @param itemId the item ID 142 * @param start the lower bound of the range of shopping item fields 143 * @param end the upper bound of the range of shopping item fields (not inclusive) 144 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 145 * @return the ordered range of matching shopping item fields 146 * @throws SystemException if a system exception occurred 147 */ 148 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 149 long itemId, int start, int end, 150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 151 throws com.liferay.portal.kernel.exception.SystemException; 152 153 /** 154 * Returns the first shopping item field in the ordered set where itemId = ?. 155 * 156 * @param itemId the item ID 157 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 158 * @return the first matching shopping item field 159 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found 160 * @throws SystemException if a system exception occurred 161 */ 162 public com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_First( 163 long itemId, 164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 165 throws com.liferay.portal.kernel.exception.SystemException, 166 com.liferay.portlet.shopping.NoSuchItemFieldException; 167 168 /** 169 * Returns the first shopping item field in the ordered set where itemId = ?. 170 * 171 * @param itemId the item ID 172 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 173 * @return the first matching shopping item field, or <code>null</code> if a matching shopping item field could not be found 174 * @throws SystemException if a system exception occurred 175 */ 176 public com.liferay.portlet.shopping.model.ShoppingItemField fetchByItemId_First( 177 long itemId, 178 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 179 throws com.liferay.portal.kernel.exception.SystemException; 180 181 /** 182 * Returns the last shopping item field in the ordered set where itemId = ?. 183 * 184 * @param itemId the item ID 185 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 186 * @return the last matching shopping item field 187 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found 188 * @throws SystemException if a system exception occurred 189 */ 190 public com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_Last( 191 long itemId, 192 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 193 throws com.liferay.portal.kernel.exception.SystemException, 194 com.liferay.portlet.shopping.NoSuchItemFieldException; 195 196 /** 197 * Returns the last shopping item field in the ordered set where itemId = ?. 198 * 199 * @param itemId the item ID 200 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 201 * @return the last matching shopping item field, or <code>null</code> if a matching shopping item field could not be found 202 * @throws SystemException if a system exception occurred 203 */ 204 public com.liferay.portlet.shopping.model.ShoppingItemField fetchByItemId_Last( 205 long itemId, 206 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 207 throws com.liferay.portal.kernel.exception.SystemException; 208 209 /** 210 * Returns the shopping item fields before and after the current shopping item field in the ordered set where itemId = ?. 211 * 212 * @param itemFieldId the primary key of the current shopping item field 213 * @param itemId the item ID 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the previous, current, and next shopping item field 216 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 217 * @throws SystemException if a system exception occurred 218 */ 219 public com.liferay.portlet.shopping.model.ShoppingItemField[] findByItemId_PrevAndNext( 220 long itemFieldId, long itemId, 221 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 222 throws com.liferay.portal.kernel.exception.SystemException, 223 com.liferay.portlet.shopping.NoSuchItemFieldException; 224 225 /** 226 * Returns all the shopping item fields. 227 * 228 * @return the shopping item fields 229 * @throws SystemException if a system exception occurred 230 */ 231 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll() 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * Returns a 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 242 * @param end the upper bound of the range of shopping item fields (not inclusive) 243 * @return the range of shopping item fields 244 * @throws SystemException if a system exception occurred 245 */ 246 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll( 247 int start, int end) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * Returns an ordered range of all the shopping item fields. 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. 255 * </p> 256 * 257 * @param start the lower bound of the range of shopping item fields 258 * @param end the upper bound of the range of shopping item fields (not inclusive) 259 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 260 * @return the ordered range of shopping item fields 261 * @throws SystemException if a system exception occurred 262 */ 263 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll( 264 int start, int end, 265 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 266 throws com.liferay.portal.kernel.exception.SystemException; 267 268 /** 269 * Removes all the shopping item fields where itemId = ? from the database. 270 * 271 * @param itemId the item ID 272 * @throws SystemException if a system exception occurred 273 */ 274 public void removeByItemId(long itemId) 275 throws com.liferay.portal.kernel.exception.SystemException; 276 277 /** 278 * Removes all the shopping item fields from the database. 279 * 280 * @throws SystemException if a system exception occurred 281 */ 282 public void removeAll() 283 throws com.liferay.portal.kernel.exception.SystemException; 284 285 /** 286 * Returns the number of shopping item fields where itemId = ?. 287 * 288 * @param itemId the item ID 289 * @return the number of matching shopping item fields 290 * @throws SystemException if a system exception occurred 291 */ 292 public int countByItemId(long itemId) 293 throws com.liferay.portal.kernel.exception.SystemException; 294 295 /** 296 * Returns the number of shopping item fields. 297 * 298 * @return the number of shopping item fields 299 * @throws SystemException if a system exception occurred 300 */ 301 public int countAll() 302 throws com.liferay.portal.kernel.exception.SystemException; 303 }