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