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.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Image;
020    
021    /**
022     * The persistence interface for the image 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 com.liferay.portal.service.persistence.impl.ImagePersistenceImpl
030     * @see ImageUtil
031     * @generated
032     */
033    @ProviderType
034    public interface ImagePersistence extends BasePersistence<Image> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link ImageUtil} to access the image persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the images where size &lt; &#63;.
043            *
044            * @param size the size
045            * @return the matching images
046            */
047            public java.util.List<Image> findByLtSize(int size);
048    
049            /**
050            * Returns a range of all the images where size &lt; &#63;.
051            *
052            * <p>
053            * 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 ImageModelImpl}. 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.
054            * </p>
055            *
056            * @param size the size
057            * @param start the lower bound of the range of images
058            * @param end the upper bound of the range of images (not inclusive)
059            * @return the range of matching images
060            */
061            public java.util.List<Image> findByLtSize(int size, int start, int end);
062    
063            /**
064            * Returns an ordered range of all the images where size &lt; &#63;.
065            *
066            * <p>
067            * 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 ImageModelImpl}. 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.
068            * </p>
069            *
070            * @param size the size
071            * @param start the lower bound of the range of images
072            * @param end the upper bound of the range of images (not inclusive)
073            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
074            * @return the ordered range of matching images
075            */
076            public java.util.List<Image> findByLtSize(int size, int start, int end,
077                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator);
078    
079            /**
080            * Returns an ordered range of all the images where size &lt; &#63;.
081            *
082            * <p>
083            * 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 ImageModelImpl}. 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.
084            * </p>
085            *
086            * @param size the size
087            * @param start the lower bound of the range of images
088            * @param end the upper bound of the range of images (not inclusive)
089            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
090            * @param retrieveFromCache whether to retrieve from the finder cache
091            * @return the ordered range of matching images
092            */
093            public java.util.List<Image> findByLtSize(int size, int start, int end,
094                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator,
095                    boolean retrieveFromCache);
096    
097            /**
098            * Returns the first image in the ordered set where size &lt; &#63;.
099            *
100            * @param size the size
101            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
102            * @return the first matching image
103            * @throws NoSuchImageException if a matching image could not be found
104            */
105            public Image findByLtSize_First(int size,
106                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator)
107                    throws com.liferay.portal.exception.NoSuchImageException;
108    
109            /**
110            * Returns the first image in the ordered set where size &lt; &#63;.
111            *
112            * @param size the size
113            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
114            * @return the first matching image, or <code>null</code> if a matching image could not be found
115            */
116            public Image fetchByLtSize_First(int size,
117                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator);
118    
119            /**
120            * Returns the last image in the ordered set where size &lt; &#63;.
121            *
122            * @param size the size
123            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
124            * @return the last matching image
125            * @throws NoSuchImageException if a matching image could not be found
126            */
127            public Image findByLtSize_Last(int size,
128                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator)
129                    throws com.liferay.portal.exception.NoSuchImageException;
130    
131            /**
132            * Returns the last image in the ordered set where size &lt; &#63;.
133            *
134            * @param size the size
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the last matching image, or <code>null</code> if a matching image could not be found
137            */
138            public Image fetchByLtSize_Last(int size,
139                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator);
140    
141            /**
142            * Returns the images before and after the current image in the ordered set where size &lt; &#63;.
143            *
144            * @param imageId the primary key of the current image
145            * @param size the size
146            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
147            * @return the previous, current, and next image
148            * @throws NoSuchImageException if a image with the primary key could not be found
149            */
150            public Image[] findByLtSize_PrevAndNext(long imageId, int size,
151                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator)
152                    throws com.liferay.portal.exception.NoSuchImageException;
153    
154            /**
155            * Removes all the images where size &lt; &#63; from the database.
156            *
157            * @param size the size
158            */
159            public void removeByLtSize(int size);
160    
161            /**
162            * Returns the number of images where size &lt; &#63;.
163            *
164            * @param size the size
165            * @return the number of matching images
166            */
167            public int countByLtSize(int size);
168    
169            /**
170            * Caches the image in the entity cache if it is enabled.
171            *
172            * @param image the image
173            */
174            public void cacheResult(Image image);
175    
176            /**
177            * Caches the images in the entity cache if it is enabled.
178            *
179            * @param images the images
180            */
181            public void cacheResult(java.util.List<Image> images);
182    
183            /**
184            * Creates a new image with the primary key. Does not add the image to the database.
185            *
186            * @param imageId the primary key for the new image
187            * @return the new image
188            */
189            public Image create(long imageId);
190    
191            /**
192            * Removes the image with the primary key from the database. Also notifies the appropriate model listeners.
193            *
194            * @param imageId the primary key of the image
195            * @return the image that was removed
196            * @throws NoSuchImageException if a image with the primary key could not be found
197            */
198            public Image remove(long imageId)
199                    throws com.liferay.portal.exception.NoSuchImageException;
200    
201            public Image updateImpl(Image image);
202    
203            /**
204            * Returns the image with the primary key or throws a {@link NoSuchImageException} if it could not be found.
205            *
206            * @param imageId the primary key of the image
207            * @return the image
208            * @throws NoSuchImageException if a image with the primary key could not be found
209            */
210            public Image findByPrimaryKey(long imageId)
211                    throws com.liferay.portal.exception.NoSuchImageException;
212    
213            /**
214            * Returns the image with the primary key or returns <code>null</code> if it could not be found.
215            *
216            * @param imageId the primary key of the image
217            * @return the image, or <code>null</code> if a image with the primary key could not be found
218            */
219            public Image fetchByPrimaryKey(long imageId);
220    
221            @Override
222            public java.util.Map<java.io.Serializable, Image> fetchByPrimaryKeys(
223                    java.util.Set<java.io.Serializable> primaryKeys);
224    
225            /**
226            * Returns all the images.
227            *
228            * @return the images
229            */
230            public java.util.List<Image> findAll();
231    
232            /**
233            * Returns a range of all the images.
234            *
235            * <p>
236            * 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 ImageModelImpl}. 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.
237            * </p>
238            *
239            * @param start the lower bound of the range of images
240            * @param end the upper bound of the range of images (not inclusive)
241            * @return the range of images
242            */
243            public java.util.List<Image> findAll(int start, int end);
244    
245            /**
246            * Returns an ordered range of all the images.
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 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 ImageModelImpl}. 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 images
253            * @param end the upper bound of the range of images (not inclusive)
254            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
255            * @return the ordered range of images
256            */
257            public java.util.List<Image> findAll(int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator);
259    
260            /**
261            * Returns an ordered range of all the images.
262            *
263            * <p>
264            * 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 ImageModelImpl}. 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.
265            * </p>
266            *
267            * @param start the lower bound of the range of images
268            * @param end the upper bound of the range of images (not inclusive)
269            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
270            * @param retrieveFromCache whether to retrieve from the finder cache
271            * @return the ordered range of images
272            */
273            public java.util.List<Image> findAll(int start, int end,
274                    com.liferay.portal.kernel.util.OrderByComparator<Image> orderByComparator,
275                    boolean retrieveFromCache);
276    
277            /**
278            * Removes all the images from the database.
279            */
280            public void removeAll();
281    
282            /**
283            * Returns the number of images.
284            *
285            * @return the number of images
286            */
287            public int countAll();
288    
289            @Override
290            public java.util.Set<java.lang.String> getBadColumnNames();
291    }