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