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