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