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.portlet.announcements.service.persistence; 016 017 import com.liferay.portal.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.announcements.model.AnnouncementsFlag; 020 021 /** 022 * The persistence interface for the announcements flag service. 023 * 024 * <p> 025 * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface. 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see AnnouncementsFlagPersistenceImpl 030 * @see AnnouncementsFlagUtil 031 * @generated 032 */ 033 public interface AnnouncementsFlagPersistence extends BasePersistence<AnnouncementsFlag> { 034 /** 035 * Caches the announcements flag in the entity cache if it is enabled. 036 * 037 * @param announcementsFlag the announcements flag to cache 038 */ 039 public void cacheResult( 040 com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag); 041 042 /** 043 * Caches the announcements flags in the entity cache if it is enabled. 044 * 045 * @param announcementsFlags the announcements flags to cache 046 */ 047 public void cacheResult( 048 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> announcementsFlags); 049 050 /** 051 * Creates a new announcements flag with the primary key. 052 * 053 * @param flagId the primary key for the new announcements flag 054 * @return the new announcements flag 055 */ 056 public com.liferay.portlet.announcements.model.AnnouncementsFlag create( 057 long flagId); 058 059 /** 060 * Removes the announcements flag with the primary key from the database. Also notifies the appropriate model listeners. 061 * 062 * @param flagId the primary key of the announcements flag to remove 063 * @return the announcements flag that was removed 064 * @throws com.liferay.portlet.announcements.NoSuchFlagException if a announcements flag with the primary key could not be found 065 * @throws SystemException if a system exception occurred 066 */ 067 public com.liferay.portlet.announcements.model.AnnouncementsFlag remove( 068 long flagId) 069 throws com.liferay.portal.kernel.exception.SystemException, 070 com.liferay.portlet.announcements.NoSuchFlagException; 071 072 public com.liferay.portlet.announcements.model.AnnouncementsFlag updateImpl( 073 com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag, 074 boolean merge) 075 throws com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Finds the announcements flag with the primary key or throws a {@link com.liferay.portlet.announcements.NoSuchFlagException} if it could not be found. 079 * 080 * @param flagId the primary key of the announcements flag to find 081 * @return the announcements flag 082 * @throws com.liferay.portlet.announcements.NoSuchFlagException if a announcements flag with the primary key could not be found 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portlet.announcements.model.AnnouncementsFlag findByPrimaryKey( 086 long flagId) 087 throws com.liferay.portal.kernel.exception.SystemException, 088 com.liferay.portlet.announcements.NoSuchFlagException; 089 090 /** 091 * Finds the announcements flag with the primary key or returns <code>null</code> if it could not be found. 092 * 093 * @param flagId the primary key of the announcements flag to find 094 * @return the announcements flag, or <code>null</code> if a announcements flag with the primary key could not be found 095 * @throws SystemException if a system exception occurred 096 */ 097 public com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByPrimaryKey( 098 long flagId) throws com.liferay.portal.kernel.exception.SystemException; 099 100 /** 101 * Finds all the announcements flags where entryId = ?. 102 * 103 * @param entryId the entry id to search with 104 * @return the matching announcements flags 105 * @throws SystemException if a system exception occurred 106 */ 107 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId( 108 long entryId) 109 throws com.liferay.portal.kernel.exception.SystemException; 110 111 /** 112 * Finds a range of all the announcements flags where entryId = ?. 113 * 114 * <p> 115 * 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. 116 * </p> 117 * 118 * @param entryId the entry id to search with 119 * @param start the lower bound of the range of announcements flags to return 120 * @param end the upper bound of the range of announcements flags to return (not inclusive) 121 * @return the range of matching announcements flags 122 * @throws SystemException if a system exception occurred 123 */ 124 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId( 125 long entryId, int start, int end) 126 throws com.liferay.portal.kernel.exception.SystemException; 127 128 /** 129 * Finds an ordered range of all the announcements flags where entryId = ?. 130 * 131 * <p> 132 * 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. 133 * </p> 134 * 135 * @param entryId the entry id to search with 136 * @param start the lower bound of the range of announcements flags to return 137 * @param end the upper bound of the range of announcements flags to return (not inclusive) 138 * @param orderByComparator the comparator to order the results by 139 * @return the ordered range of matching announcements flags 140 * @throws SystemException if a system exception occurred 141 */ 142 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findByEntryId( 143 long entryId, int start, int end, 144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 145 throws com.liferay.portal.kernel.exception.SystemException; 146 147 /** 148 * Finds the first announcements flag in the ordered set where entryId = ?. 149 * 150 * <p> 151 * 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. 152 * </p> 153 * 154 * @param entryId the entry id to search with 155 * @param orderByComparator the comparator to order the set by 156 * @return the first matching announcements flag 157 * @throws com.liferay.portlet.announcements.NoSuchFlagException if a matching announcements flag could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public com.liferay.portlet.announcements.model.AnnouncementsFlag findByEntryId_First( 161 long entryId, 162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 163 throws com.liferay.portal.kernel.exception.SystemException, 164 com.liferay.portlet.announcements.NoSuchFlagException; 165 166 /** 167 * Finds the last announcements flag in the ordered set where entryId = ?. 168 * 169 * <p> 170 * 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. 171 * </p> 172 * 173 * @param entryId the entry id to search with 174 * @param orderByComparator the comparator to order the set by 175 * @return the last matching announcements flag 176 * @throws com.liferay.portlet.announcements.NoSuchFlagException if a matching announcements flag could not be found 177 * @throws SystemException if a system exception occurred 178 */ 179 public com.liferay.portlet.announcements.model.AnnouncementsFlag findByEntryId_Last( 180 long entryId, 181 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 182 throws com.liferay.portal.kernel.exception.SystemException, 183 com.liferay.portlet.announcements.NoSuchFlagException; 184 185 /** 186 * Finds the announcements flags before and after the current announcements flag in the ordered set where entryId = ?. 187 * 188 * <p> 189 * 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. 190 * </p> 191 * 192 * @param flagId the primary key of the current announcements flag 193 * @param entryId the entry id to search with 194 * @param orderByComparator the comparator to order the set by 195 * @return the previous, current, and next announcements flag 196 * @throws com.liferay.portlet.announcements.NoSuchFlagException if a announcements flag with the primary key could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public com.liferay.portlet.announcements.model.AnnouncementsFlag[] findByEntryId_PrevAndNext( 200 long flagId, long entryId, 201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 202 throws com.liferay.portal.kernel.exception.SystemException, 203 com.liferay.portlet.announcements.NoSuchFlagException; 204 205 /** 206 * Finds the announcements flag where userId = ? and entryId = ? and value = ? or throws a {@link com.liferay.portlet.announcements.NoSuchFlagException} if it could not be found. 207 * 208 * @param userId the user id to search with 209 * @param entryId the entry id to search with 210 * @param value the value to search with 211 * @return the matching announcements flag 212 * @throws com.liferay.portlet.announcements.NoSuchFlagException if a matching announcements flag could not be found 213 * @throws SystemException if a system exception occurred 214 */ 215 public com.liferay.portlet.announcements.model.AnnouncementsFlag findByU_E_V( 216 long userId, long entryId, int value) 217 throws com.liferay.portal.kernel.exception.SystemException, 218 com.liferay.portlet.announcements.NoSuchFlagException; 219 220 /** 221 * Finds the announcements flag where userId = ? and entryId = ? and value = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 222 * 223 * @param userId the user id to search with 224 * @param entryId the entry id to search with 225 * @param value the value to search with 226 * @return the matching announcements flag, or <code>null</code> if a matching announcements flag could not be found 227 * @throws SystemException if a system exception occurred 228 */ 229 public com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByU_E_V( 230 long userId, long entryId, int value) 231 throws com.liferay.portal.kernel.exception.SystemException; 232 233 /** 234 * Finds the announcements flag where userId = ? and entryId = ? and value = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 235 * 236 * @param userId the user id to search with 237 * @param entryId the entry id to search with 238 * @param value the value to search with 239 * @return the matching announcements flag, or <code>null</code> if a matching announcements flag could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByU_E_V( 243 long userId, long entryId, int value, boolean retrieveFromCache) 244 throws com.liferay.portal.kernel.exception.SystemException; 245 246 /** 247 * Finds all the announcements flags. 248 * 249 * @return the announcements flags 250 * @throws SystemException if a system exception occurred 251 */ 252 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll() 253 throws com.liferay.portal.kernel.exception.SystemException; 254 255 /** 256 * Finds a range of all the announcements flags. 257 * 258 * <p> 259 * 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. 260 * </p> 261 * 262 * @param start the lower bound of the range of announcements flags to return 263 * @param end the upper bound of the range of announcements flags to return (not inclusive) 264 * @return the range of announcements flags 265 * @throws SystemException if a system exception occurred 266 */ 267 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll( 268 int start, int end) 269 throws com.liferay.portal.kernel.exception.SystemException; 270 271 /** 272 * Finds an ordered range of all the announcements flags. 273 * 274 * <p> 275 * 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. 276 * </p> 277 * 278 * @param start the lower bound of the range of announcements flags to return 279 * @param end the upper bound of the range of announcements flags to return (not inclusive) 280 * @param orderByComparator the comparator to order the results by 281 * @return the ordered range of announcements flags 282 * @throws SystemException if a system exception occurred 283 */ 284 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll( 285 int start, int end, 286 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 287 throws com.liferay.portal.kernel.exception.SystemException; 288 289 /** 290 * Removes all the announcements flags where entryId = ? from the database. 291 * 292 * @param entryId the entry id to search with 293 * @throws SystemException if a system exception occurred 294 */ 295 public void removeByEntryId(long entryId) 296 throws com.liferay.portal.kernel.exception.SystemException; 297 298 /** 299 * Removes the announcements flag where userId = ? and entryId = ? and value = ? from the database. 300 * 301 * @param userId the user id to search with 302 * @param entryId the entry id to search with 303 * @param value the value to search with 304 * @throws SystemException if a system exception occurred 305 */ 306 public void removeByU_E_V(long userId, long entryId, int value) 307 throws com.liferay.portal.kernel.exception.SystemException, 308 com.liferay.portlet.announcements.NoSuchFlagException; 309 310 /** 311 * Removes all the announcements flags from the database. 312 * 313 * @throws SystemException if a system exception occurred 314 */ 315 public void removeAll() 316 throws com.liferay.portal.kernel.exception.SystemException; 317 318 /** 319 * Counts all the announcements flags where entryId = ?. 320 * 321 * @param entryId the entry id to search with 322 * @return the number of matching announcements flags 323 * @throws SystemException if a system exception occurred 324 */ 325 public int countByEntryId(long entryId) 326 throws com.liferay.portal.kernel.exception.SystemException; 327 328 /** 329 * Counts all the announcements flags where userId = ? and entryId = ? and value = ?. 330 * 331 * @param userId the user id to search with 332 * @param entryId the entry id to search with 333 * @param value the value to search with 334 * @return the number of matching announcements flags 335 * @throws SystemException if a system exception occurred 336 */ 337 public int countByU_E_V(long userId, long entryId, int value) 338 throws com.liferay.portal.kernel.exception.SystemException; 339 340 /** 341 * Counts all the announcements flags. 342 * 343 * @return the number of announcements flags 344 * @throws SystemException if a system exception occurred 345 */ 346 public int countAll() 347 throws com.liferay.portal.kernel.exception.SystemException; 348 }