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