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