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