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.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            * <p>
149            * 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.
150            * </p>
151            *
152            * @param size the size
153            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
154            * @return the first matching image
155            * @throws com.liferay.portal.NoSuchImageException if a matching image could not be found
156            * @throws SystemException if a system exception occurred
157            */
158            public com.liferay.portal.model.Image findByLtSize_First(int size,
159                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160                    throws com.liferay.portal.NoSuchImageException,
161                            com.liferay.portal.kernel.exception.SystemException;
162    
163            /**
164            * Returns the last image in the ordered set where size &lt; &#63;.
165            *
166            * <p>
167            * 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.
168            * </p>
169            *
170            * @param size the size
171            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
172            * @return the last matching image
173            * @throws com.liferay.portal.NoSuchImageException if a matching image could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public com.liferay.portal.model.Image findByLtSize_Last(int size,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.NoSuchImageException,
179                            com.liferay.portal.kernel.exception.SystemException;
180    
181            /**
182            * Returns the images before and after the current image in the ordered set where size &lt; &#63;.
183            *
184            * <p>
185            * 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.
186            * </p>
187            *
188            * @param imageId the primary key of the current image
189            * @param size the size
190            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
191            * @return the previous, current, and next image
192            * @throws com.liferay.portal.NoSuchImageException if a image with the primary key could not be found
193            * @throws SystemException if a system exception occurred
194            */
195            public com.liferay.portal.model.Image[] findByLtSize_PrevAndNext(
196                    long imageId, int size,
197                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198                    throws com.liferay.portal.NoSuchImageException,
199                            com.liferay.portal.kernel.exception.SystemException;
200    
201            /**
202            * Returns all the images.
203            *
204            * @return the images
205            * @throws SystemException if a system exception occurred
206            */
207            public java.util.List<com.liferay.portal.model.Image> findAll()
208                    throws com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * Returns a range of all the images.
212            *
213            * <p>
214            * 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.
215            * </p>
216            *
217            * @param start the lower bound of the range of images
218            * @param end the upper bound of the range of images (not inclusive)
219            * @return the range of images
220            * @throws SystemException if a system exception occurred
221            */
222            public java.util.List<com.liferay.portal.model.Image> findAll(int start,
223                    int end) throws com.liferay.portal.kernel.exception.SystemException;
224    
225            /**
226            * Returns an ordered range of all the images.
227            *
228            * <p>
229            * 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.
230            * </p>
231            *
232            * @param start the lower bound of the range of images
233            * @param end the upper bound of the range of images (not inclusive)
234            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235            * @return the ordered range of images
236            * @throws SystemException if a system exception occurred
237            */
238            public java.util.List<com.liferay.portal.model.Image> findAll(int start,
239                    int end,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.kernel.exception.SystemException;
242    
243            /**
244            * Removes all the images where size &lt; &#63; from the database.
245            *
246            * @param size the size
247            * @throws SystemException if a system exception occurred
248            */
249            public void removeByLtSize(int size)
250                    throws com.liferay.portal.kernel.exception.SystemException;
251    
252            /**
253            * Removes all the images from the database.
254            *
255            * @throws SystemException if a system exception occurred
256            */
257            public void removeAll()
258                    throws com.liferay.portal.kernel.exception.SystemException;
259    
260            /**
261            * Returns the number of images where size &lt; &#63;.
262            *
263            * @param size the size
264            * @return the number of matching images
265            * @throws SystemException if a system exception occurred
266            */
267            public int countByLtSize(int size)
268                    throws com.liferay.portal.kernel.exception.SystemException;
269    
270            /**
271            * Returns the number of images.
272            *
273            * @return the number of images
274            * @throws SystemException if a system exception occurred
275            */
276            public int countAll()
277                    throws com.liferay.portal.kernel.exception.SystemException;
278    }