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