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            * 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 = &#63;.
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 = &#63;.
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 = &#63;.
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 = &#63;.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param itemId the item ID
161            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
162            * @return the first matching shopping item field
163            * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_First(
167                    long itemId,
168                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169                    throws com.liferay.portal.kernel.exception.SystemException,
170                            com.liferay.portlet.shopping.NoSuchItemFieldException;
171    
172            /**
173            * Returns the last shopping item field in the ordered set where itemId = &#63;.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param itemId the item ID
180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
181            * @return the last matching shopping item field
182            * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            public com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_Last(
186                    long itemId,
187                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188                    throws com.liferay.portal.kernel.exception.SystemException,
189                            com.liferay.portlet.shopping.NoSuchItemFieldException;
190    
191            /**
192            * Returns the shopping item fields before and after the current shopping item field in the ordered set where itemId = &#63;.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param itemFieldId the primary key of the current shopping item field
199            * @param itemId the item ID
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the previous, current, and next shopping item field
202            * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portlet.shopping.model.ShoppingItemField[] findByItemId_PrevAndNext(
206                    long itemFieldId, long itemId,
207                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208                    throws com.liferay.portal.kernel.exception.SystemException,
209                            com.liferay.portlet.shopping.NoSuchItemFieldException;
210    
211            /**
212            * Returns all the shopping item fields.
213            *
214            * @return the shopping item fields
215            * @throws SystemException if a system exception occurred
216            */
217            public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll()
218                    throws com.liferay.portal.kernel.exception.SystemException;
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
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            * @throws SystemException if a system exception occurred
231            */
232            public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll(
233                    int start, int end)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Returns an ordered range of all the shopping item fields.
238            *
239            * <p>
240            * 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.
241            * </p>
242            *
243            * @param start the lower bound of the range of shopping item fields
244            * @param end the upper bound of the range of shopping item fields (not inclusive)
245            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
246            * @return the ordered range of 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                    int start, int end,
251                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252                    throws com.liferay.portal.kernel.exception.SystemException;
253    
254            /**
255            * Removes all the shopping item fields where itemId = &#63; from the database.
256            *
257            * @param itemId the item ID
258            * @throws SystemException if a system exception occurred
259            */
260            public void removeByItemId(long itemId)
261                    throws com.liferay.portal.kernel.exception.SystemException;
262    
263            /**
264            * Removes all the shopping item fields from the database.
265            *
266            * @throws SystemException if a system exception occurred
267            */
268            public void removeAll()
269                    throws com.liferay.portal.kernel.exception.SystemException;
270    
271            /**
272            * Returns the number of shopping item fields where itemId = &#63;.
273            *
274            * @param itemId the item ID
275            * @return the number of matching shopping item fields
276            * @throws SystemException if a system exception occurred
277            */
278            public int countByItemId(long itemId)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            /**
282            * Returns the number of shopping item fields.
283            *
284            * @return the number of shopping item fields
285            * @throws SystemException if a system exception occurred
286            */
287            public int countAll()
288                    throws com.liferay.portal.kernel.exception.SystemException;
289    }