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.softwarecatalog.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.softwarecatalog.model.SCProductScreenshot;
022    
023    /**
024     * The persistence interface for the s c product screenshot 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.softwarecatalog.service.persistence.impl.SCProductScreenshotPersistenceImpl
032     * @see SCProductScreenshotUtil
033     * @generated
034     */
035    @ProviderType
036    public interface SCProductScreenshotPersistence extends BasePersistence<SCProductScreenshot> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link SCProductScreenshotUtil} to access the s c product screenshot persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the s c product screenshots where productEntryId = &#63;.
045            *
046            * @param productEntryId the product entry ID
047            * @return the matching s c product screenshots
048            */
049            public java.util.List<SCProductScreenshot> findByProductEntryId(
050                    long productEntryId);
051    
052            /**
053            * Returns a range of all the s c product screenshots where productEntryId = &#63;.
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 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 SCProductScreenshotModelImpl}. 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 productEntryId the product entry ID
060            * @param start the lower bound of the range of s c product screenshots
061            * @param end the upper bound of the range of s c product screenshots (not inclusive)
062            * @return the range of matching s c product screenshots
063            */
064            public java.util.List<SCProductScreenshot> findByProductEntryId(
065                    long productEntryId, int start, int end);
066    
067            /**
068            * Returns an ordered range of all the s c product screenshots where productEntryId = &#63;.
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 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 SCProductScreenshotModelImpl}. 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 productEntryId the product entry ID
075            * @param start the lower bound of the range of s c product screenshots
076            * @param end the upper bound of the range of s c product screenshots (not inclusive)
077            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
078            * @return the ordered range of matching s c product screenshots
079            */
080            public java.util.List<SCProductScreenshot> findByProductEntryId(
081                    long productEntryId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator<SCProductScreenshot> orderByComparator);
083    
084            /**
085            * Returns the first s c product screenshot in the ordered set where productEntryId = &#63;.
086            *
087            * @param productEntryId the product entry ID
088            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
089            * @return the first matching s c product screenshot
090            * @throws NoSuchProductScreenshotException if a matching s c product screenshot could not be found
091            */
092            public SCProductScreenshot findByProductEntryId_First(long productEntryId,
093                    com.liferay.portal.kernel.util.OrderByComparator<SCProductScreenshot> orderByComparator)
094                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
095    
096            /**
097            * Returns the first s c product screenshot in the ordered set where productEntryId = &#63;.
098            *
099            * @param productEntryId the product entry ID
100            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
101            * @return the first matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
102            */
103            public SCProductScreenshot fetchByProductEntryId_First(
104                    long productEntryId,
105                    com.liferay.portal.kernel.util.OrderByComparator<SCProductScreenshot> orderByComparator);
106    
107            /**
108            * Returns the last s c product screenshot in the ordered set where productEntryId = &#63;.
109            *
110            * @param productEntryId the product entry ID
111            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
112            * @return the last matching s c product screenshot
113            * @throws NoSuchProductScreenshotException if a matching s c product screenshot could not be found
114            */
115            public SCProductScreenshot findByProductEntryId_Last(long productEntryId,
116                    com.liferay.portal.kernel.util.OrderByComparator<SCProductScreenshot> orderByComparator)
117                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
118    
119            /**
120            * Returns the last s c product screenshot in the ordered set where productEntryId = &#63;.
121            *
122            * @param productEntryId the product entry ID
123            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
124            * @return the last matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
125            */
126            public SCProductScreenshot fetchByProductEntryId_Last(long productEntryId,
127                    com.liferay.portal.kernel.util.OrderByComparator<SCProductScreenshot> orderByComparator);
128    
129            /**
130            * Returns the s c product screenshots before and after the current s c product screenshot in the ordered set where productEntryId = &#63;.
131            *
132            * @param productScreenshotId the primary key of the current s c product screenshot
133            * @param productEntryId the product entry ID
134            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
135            * @return the previous, current, and next s c product screenshot
136            * @throws NoSuchProductScreenshotException if a s c product screenshot with the primary key could not be found
137            */
138            public SCProductScreenshot[] findByProductEntryId_PrevAndNext(
139                    long productScreenshotId, long productEntryId,
140                    com.liferay.portal.kernel.util.OrderByComparator<SCProductScreenshot> orderByComparator)
141                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
142    
143            /**
144            * Removes all the s c product screenshots where productEntryId = &#63; from the database.
145            *
146            * @param productEntryId the product entry ID
147            */
148            public void removeByProductEntryId(long productEntryId);
149    
150            /**
151            * Returns the number of s c product screenshots where productEntryId = &#63;.
152            *
153            * @param productEntryId the product entry ID
154            * @return the number of matching s c product screenshots
155            */
156            public int countByProductEntryId(long productEntryId);
157    
158            /**
159            * Returns the s c product screenshot where thumbnailId = &#63; or throws a {@link NoSuchProductScreenshotException} if it could not be found.
160            *
161            * @param thumbnailId the thumbnail ID
162            * @return the matching s c product screenshot
163            * @throws NoSuchProductScreenshotException if a matching s c product screenshot could not be found
164            */
165            public SCProductScreenshot findByThumbnailId(long thumbnailId)
166                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
167    
168            /**
169            * Returns the s c product screenshot where thumbnailId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
170            *
171            * @param thumbnailId the thumbnail ID
172            * @return the matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
173            */
174            public SCProductScreenshot fetchByThumbnailId(long thumbnailId);
175    
176            /**
177            * Returns the s c product screenshot where thumbnailId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
178            *
179            * @param thumbnailId the thumbnail ID
180            * @param retrieveFromCache whether to use the finder cache
181            * @return the matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
182            */
183            public SCProductScreenshot fetchByThumbnailId(long thumbnailId,
184                    boolean retrieveFromCache);
185    
186            /**
187            * Removes the s c product screenshot where thumbnailId = &#63; from the database.
188            *
189            * @param thumbnailId the thumbnail ID
190            * @return the s c product screenshot that was removed
191            */
192            public SCProductScreenshot removeByThumbnailId(long thumbnailId)
193                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
194    
195            /**
196            * Returns the number of s c product screenshots where thumbnailId = &#63;.
197            *
198            * @param thumbnailId the thumbnail ID
199            * @return the number of matching s c product screenshots
200            */
201            public int countByThumbnailId(long thumbnailId);
202    
203            /**
204            * Returns the s c product screenshot where fullImageId = &#63; or throws a {@link NoSuchProductScreenshotException} if it could not be found.
205            *
206            * @param fullImageId the full image ID
207            * @return the matching s c product screenshot
208            * @throws NoSuchProductScreenshotException if a matching s c product screenshot could not be found
209            */
210            public SCProductScreenshot findByFullImageId(long fullImageId)
211                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
212    
213            /**
214            * Returns the s c product screenshot where fullImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
215            *
216            * @param fullImageId the full image ID
217            * @return the matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
218            */
219            public SCProductScreenshot fetchByFullImageId(long fullImageId);
220    
221            /**
222            * Returns the s c product screenshot where fullImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
223            *
224            * @param fullImageId the full image ID
225            * @param retrieveFromCache whether to use the finder cache
226            * @return the matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
227            */
228            public SCProductScreenshot fetchByFullImageId(long fullImageId,
229                    boolean retrieveFromCache);
230    
231            /**
232            * Removes the s c product screenshot where fullImageId = &#63; from the database.
233            *
234            * @param fullImageId the full image ID
235            * @return the s c product screenshot that was removed
236            */
237            public SCProductScreenshot removeByFullImageId(long fullImageId)
238                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
239    
240            /**
241            * Returns the number of s c product screenshots where fullImageId = &#63;.
242            *
243            * @param fullImageId the full image ID
244            * @return the number of matching s c product screenshots
245            */
246            public int countByFullImageId(long fullImageId);
247    
248            /**
249            * Returns the s c product screenshot where productEntryId = &#63; and priority = &#63; or throws a {@link NoSuchProductScreenshotException} if it could not be found.
250            *
251            * @param productEntryId the product entry ID
252            * @param priority the priority
253            * @return the matching s c product screenshot
254            * @throws NoSuchProductScreenshotException if a matching s c product screenshot could not be found
255            */
256            public SCProductScreenshot findByP_P(long productEntryId, int priority)
257                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
258    
259            /**
260            * Returns the s c product screenshot where productEntryId = &#63; and priority = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
261            *
262            * @param productEntryId the product entry ID
263            * @param priority the priority
264            * @return the matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
265            */
266            public SCProductScreenshot fetchByP_P(long productEntryId, int priority);
267    
268            /**
269            * Returns the s c product screenshot where productEntryId = &#63; and priority = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
270            *
271            * @param productEntryId the product entry ID
272            * @param priority the priority
273            * @param retrieveFromCache whether to use the finder cache
274            * @return the matching s c product screenshot, or <code>null</code> if a matching s c product screenshot could not be found
275            */
276            public SCProductScreenshot fetchByP_P(long productEntryId, int priority,
277                    boolean retrieveFromCache);
278    
279            /**
280            * Removes the s c product screenshot where productEntryId = &#63; and priority = &#63; from the database.
281            *
282            * @param productEntryId the product entry ID
283            * @param priority the priority
284            * @return the s c product screenshot that was removed
285            */
286            public SCProductScreenshot removeByP_P(long productEntryId, int priority)
287                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
288    
289            /**
290            * Returns the number of s c product screenshots where productEntryId = &#63; and priority = &#63;.
291            *
292            * @param productEntryId the product entry ID
293            * @param priority the priority
294            * @return the number of matching s c product screenshots
295            */
296            public int countByP_P(long productEntryId, int priority);
297    
298            /**
299            * Caches the s c product screenshot in the entity cache if it is enabled.
300            *
301            * @param scProductScreenshot the s c product screenshot
302            */
303            public void cacheResult(SCProductScreenshot scProductScreenshot);
304    
305            /**
306            * Caches the s c product screenshots in the entity cache if it is enabled.
307            *
308            * @param scProductScreenshots the s c product screenshots
309            */
310            public void cacheResult(
311                    java.util.List<SCProductScreenshot> scProductScreenshots);
312    
313            /**
314            * Creates a new s c product screenshot with the primary key. Does not add the s c product screenshot to the database.
315            *
316            * @param productScreenshotId the primary key for the new s c product screenshot
317            * @return the new s c product screenshot
318            */
319            public SCProductScreenshot create(long productScreenshotId);
320    
321            /**
322            * Removes the s c product screenshot with the primary key from the database. Also notifies the appropriate model listeners.
323            *
324            * @param productScreenshotId the primary key of the s c product screenshot
325            * @return the s c product screenshot that was removed
326            * @throws NoSuchProductScreenshotException if a s c product screenshot with the primary key could not be found
327            */
328            public SCProductScreenshot remove(long productScreenshotId)
329                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
330    
331            public SCProductScreenshot updateImpl(
332                    SCProductScreenshot scProductScreenshot);
333    
334            /**
335            * Returns the s c product screenshot with the primary key or throws a {@link NoSuchProductScreenshotException} if it could not be found.
336            *
337            * @param productScreenshotId the primary key of the s c product screenshot
338            * @return the s c product screenshot
339            * @throws NoSuchProductScreenshotException if a s c product screenshot with the primary key could not be found
340            */
341            public SCProductScreenshot findByPrimaryKey(long productScreenshotId)
342                    throws com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
343    
344            /**
345            * Returns the s c product screenshot with the primary key or returns <code>null</code> if it could not be found.
346            *
347            * @param productScreenshotId the primary key of the s c product screenshot
348            * @return the s c product screenshot, or <code>null</code> if a s c product screenshot with the primary key could not be found
349            */
350            public SCProductScreenshot fetchByPrimaryKey(long productScreenshotId);
351    
352            @Override
353            public java.util.Map<java.io.Serializable, SCProductScreenshot> fetchByPrimaryKeys(
354                    java.util.Set<java.io.Serializable> primaryKeys);
355    
356            /**
357            * Returns all the s c product screenshots.
358            *
359            * @return the s c product screenshots
360            */
361            public java.util.List<SCProductScreenshot> findAll();
362    
363            /**
364            * Returns a range of all the s c product screenshots.
365            *
366            * <p>
367            * 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 SCProductScreenshotModelImpl}. 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.
368            * </p>
369            *
370            * @param start the lower bound of the range of s c product screenshots
371            * @param end the upper bound of the range of s c product screenshots (not inclusive)
372            * @return the range of s c product screenshots
373            */
374            public java.util.List<SCProductScreenshot> findAll(int start, int end);
375    
376            /**
377            * Returns an ordered range of all the s c product screenshots.
378            *
379            * <p>
380            * 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 SCProductScreenshotModelImpl}. 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.
381            * </p>
382            *
383            * @param start the lower bound of the range of s c product screenshots
384            * @param end the upper bound of the range of s c product screenshots (not inclusive)
385            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
386            * @return the ordered range of s c product screenshots
387            */
388            public java.util.List<SCProductScreenshot> findAll(int start, int end,
389                    com.liferay.portal.kernel.util.OrderByComparator<SCProductScreenshot> orderByComparator);
390    
391            /**
392            * Removes all the s c product screenshots from the database.
393            */
394            public void removeAll();
395    
396            /**
397            * Returns the number of s c product screenshots.
398            *
399            * @return the number of s c product screenshots
400            */
401            public int countAll();
402    }