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