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