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