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