001 /** 002 * Copyright (c) 2000-present 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 com.liferay.portlet.shopping.service.persistence.impl.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 */ 049 public java.util.List<ShoppingItemField> findByItemId(long itemId); 050 051 /** 052 * Returns a range of all the shopping item fields where itemId = ?. 053 * 054 * <p> 055 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 056 * </p> 057 * 058 * @param itemId the item ID 059 * @param start the lower bound of the range of shopping item fields 060 * @param end the upper bound of the range of shopping item fields (not inclusive) 061 * @return the range of matching shopping item fields 062 */ 063 public java.util.List<ShoppingItemField> findByItemId(long itemId, 064 int start, int end); 065 066 /** 067 * Returns an ordered range of all the shopping item fields where itemId = ?. 068 * 069 * <p> 070 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 071 * </p> 072 * 073 * @param itemId the item ID 074 * @param start the lower bound of the range of shopping item fields 075 * @param end the upper bound of the range of shopping item fields (not inclusive) 076 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 077 * @return the ordered range of matching shopping item fields 078 */ 079 public java.util.List<ShoppingItemField> findByItemId(long itemId, 080 int start, int end, 081 com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemField> orderByComparator); 082 083 /** 084 * Returns the first shopping item field in the ordered set where itemId = ?. 085 * 086 * @param itemId the item ID 087 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 088 * @return the first matching shopping item field 089 * @throws NoSuchItemFieldException if a matching shopping item field could not be found 090 */ 091 public ShoppingItemField findByItemId_First(long itemId, 092 com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemField> orderByComparator) 093 throws com.liferay.portlet.shopping.NoSuchItemFieldException; 094 095 /** 096 * Returns the first shopping item field in the ordered set where itemId = ?. 097 * 098 * @param itemId the item ID 099 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 100 * @return the first matching shopping item field, or <code>null</code> if a matching shopping item field could not be found 101 */ 102 public ShoppingItemField fetchByItemId_First(long itemId, 103 com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemField> orderByComparator); 104 105 /** 106 * Returns the last shopping item field in the ordered set where itemId = ?. 107 * 108 * @param itemId the item ID 109 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 110 * @return the last matching shopping item field 111 * @throws NoSuchItemFieldException if a matching shopping item field could not be found 112 */ 113 public ShoppingItemField findByItemId_Last(long itemId, 114 com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemField> orderByComparator) 115 throws com.liferay.portlet.shopping.NoSuchItemFieldException; 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, or <code>null</code> if a matching shopping item field could not be found 123 */ 124 public ShoppingItemField fetchByItemId_Last(long itemId, 125 com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemField> orderByComparator); 126 127 /** 128 * Returns the shopping item fields before and after the current shopping item field in the ordered set where itemId = ?. 129 * 130 * @param itemFieldId the primary key of the current shopping item field 131 * @param itemId the item ID 132 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 133 * @return the previous, current, and next shopping item field 134 * @throws NoSuchItemFieldException if a shopping item field with the primary key could not be found 135 */ 136 public ShoppingItemField[] findByItemId_PrevAndNext(long itemFieldId, 137 long itemId, 138 com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemField> orderByComparator) 139 throws com.liferay.portlet.shopping.NoSuchItemFieldException; 140 141 /** 142 * Removes all the shopping item fields where itemId = ? from the database. 143 * 144 * @param itemId the item ID 145 */ 146 public void removeByItemId(long itemId); 147 148 /** 149 * Returns the number of shopping item fields where itemId = ?. 150 * 151 * @param itemId the item ID 152 * @return the number of matching shopping item fields 153 */ 154 public int countByItemId(long itemId); 155 156 /** 157 * Caches the shopping item field in the entity cache if it is enabled. 158 * 159 * @param shoppingItemField the shopping item field 160 */ 161 public void cacheResult(ShoppingItemField shoppingItemField); 162 163 /** 164 * Caches the shopping item fields in the entity cache if it is enabled. 165 * 166 * @param shoppingItemFields the shopping item fields 167 */ 168 public void cacheResult( 169 java.util.List<ShoppingItemField> shoppingItemFields); 170 171 /** 172 * Creates a new shopping item field with the primary key. Does not add the shopping item field to the database. 173 * 174 * @param itemFieldId the primary key for the new shopping item field 175 * @return the new shopping item field 176 */ 177 public ShoppingItemField create(long itemFieldId); 178 179 /** 180 * Removes the shopping item field with the primary key from the database. Also notifies the appropriate model listeners. 181 * 182 * @param itemFieldId the primary key of the shopping item field 183 * @return the shopping item field that was removed 184 * @throws NoSuchItemFieldException if a shopping item field with the primary key could not be found 185 */ 186 public ShoppingItemField remove(long itemFieldId) 187 throws com.liferay.portlet.shopping.NoSuchItemFieldException; 188 189 public ShoppingItemField updateImpl(ShoppingItemField shoppingItemField); 190 191 /** 192 * Returns the shopping item field with the primary key or throws a {@link NoSuchItemFieldException} if it could not be found. 193 * 194 * @param itemFieldId the primary key of the shopping item field 195 * @return the shopping item field 196 * @throws NoSuchItemFieldException if a shopping item field with the primary key could not be found 197 */ 198 public ShoppingItemField findByPrimaryKey(long itemFieldId) 199 throws com.liferay.portlet.shopping.NoSuchItemFieldException; 200 201 /** 202 * Returns the shopping item field with the primary key or returns <code>null</code> if it could not be found. 203 * 204 * @param itemFieldId the primary key of the shopping item field 205 * @return the shopping item field, or <code>null</code> if a shopping item field with the primary key could not be found 206 */ 207 public ShoppingItemField fetchByPrimaryKey(long itemFieldId); 208 209 @Override 210 public java.util.Map<java.io.Serializable, ShoppingItemField> fetchByPrimaryKeys( 211 java.util.Set<java.io.Serializable> primaryKeys); 212 213 /** 214 * Returns all the shopping item fields. 215 * 216 * @return the shopping item fields 217 */ 218 public java.util.List<ShoppingItemField> findAll(); 219 220 /** 221 * Returns a range of all the shopping item fields. 222 * 223 * <p> 224 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 225 * </p> 226 * 227 * @param start the lower bound of the range of shopping item fields 228 * @param end the upper bound of the range of shopping item fields (not inclusive) 229 * @return the range of shopping item fields 230 */ 231 public java.util.List<ShoppingItemField> findAll(int start, int end); 232 233 /** 234 * Returns an ordered 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 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 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 243 * @return the ordered range of shopping item fields 244 */ 245 public java.util.List<ShoppingItemField> findAll(int start, int end, 246 com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemField> orderByComparator); 247 248 /** 249 * Removes all the shopping item fields from the database. 250 */ 251 public void removeAll(); 252 253 /** 254 * Returns the number of shopping item fields. 255 * 256 * @return the number of shopping item fields 257 */ 258 public int countAll(); 259 }