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