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