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 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 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 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 * Returns 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 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 * Returns 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 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 * Returns all the announcements flags where entryId = ?. 109 * 110 * @param entryId the entry ID 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 * Returns 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 126 * @param start the lower bound of the range of announcements flags 127 * @param end the upper bound of the range of announcements flags (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 * Returns 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 143 * @param start the lower bound of the range of announcements flags 144 * @param end the upper bound of the range of announcements flags (not inclusive) 145 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 162 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 181 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * 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. 214 * 215 * @param userId the user ID 216 * @param entryId the entry ID 217 * @param value the value 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 * 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. 229 * 230 * @param userId the user ID 231 * @param entryId the entry ID 232 * @param value the value 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 * 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. 242 * 243 * @param userId the user ID 244 * @param entryId the entry ID 245 * @param value the value 246 * @param retrieveFromCache whether to use the finder cache 247 * @return the matching announcements flag, or <code>null</code> if a matching announcements flag could not be found 248 * @throws SystemException if a system exception occurred 249 */ 250 public com.liferay.portlet.announcements.model.AnnouncementsFlag fetchByU_E_V( 251 long userId, long entryId, int value, boolean retrieveFromCache) 252 throws com.liferay.portal.kernel.exception.SystemException; 253 254 /** 255 * Returns all the announcements flags. 256 * 257 * @return the announcements flags 258 * @throws SystemException if a system exception occurred 259 */ 260 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll() 261 throws com.liferay.portal.kernel.exception.SystemException; 262 263 /** 264 * Returns a range of all the announcements flags. 265 * 266 * <p> 267 * 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. 268 * </p> 269 * 270 * @param start the lower bound of the range of announcements flags 271 * @param end the upper bound of the range of announcements flags (not inclusive) 272 * @return the range of announcements flags 273 * @throws SystemException if a system exception occurred 274 */ 275 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll( 276 int start, int end) 277 throws com.liferay.portal.kernel.exception.SystemException; 278 279 /** 280 * Returns an ordered range of all the announcements flags. 281 * 282 * <p> 283 * 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. 284 * </p> 285 * 286 * @param start the lower bound of the range of announcements flags 287 * @param end the upper bound of the range of announcements flags (not inclusive) 288 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 289 * @return the ordered range of announcements flags 290 * @throws SystemException if a system exception occurred 291 */ 292 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> findAll( 293 int start, int end, 294 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 295 throws com.liferay.portal.kernel.exception.SystemException; 296 297 /** 298 * Removes all the announcements flags where entryId = ? from the database. 299 * 300 * @param entryId the entry ID 301 * @throws SystemException if a system exception occurred 302 */ 303 public void removeByEntryId(long entryId) 304 throws com.liferay.portal.kernel.exception.SystemException; 305 306 /** 307 * Removes the announcements flag where userId = ? and entryId = ? and value = ? from the database. 308 * 309 * @param userId the user ID 310 * @param entryId the entry ID 311 * @param value the value 312 * @throws SystemException if a system exception occurred 313 */ 314 public void removeByU_E_V(long userId, long entryId, int value) 315 throws com.liferay.portal.kernel.exception.SystemException, 316 com.liferay.portlet.announcements.NoSuchFlagException; 317 318 /** 319 * Removes all the announcements flags from the database. 320 * 321 * @throws SystemException if a system exception occurred 322 */ 323 public void removeAll() 324 throws com.liferay.portal.kernel.exception.SystemException; 325 326 /** 327 * Returns the number of announcements flags where entryId = ?. 328 * 329 * @param entryId the entry ID 330 * @return the number of matching announcements flags 331 * @throws SystemException if a system exception occurred 332 */ 333 public int countByEntryId(long entryId) 334 throws com.liferay.portal.kernel.exception.SystemException; 335 336 /** 337 * Returns the number of announcements flags where userId = ? and entryId = ? and value = ?. 338 * 339 * @param userId the user ID 340 * @param entryId the entry ID 341 * @param value the value 342 * @return the number of matching announcements flags 343 * @throws SystemException if a system exception occurred 344 */ 345 public int countByU_E_V(long userId, long entryId, int value) 346 throws com.liferay.portal.kernel.exception.SystemException; 347 348 /** 349 * Returns the number of announcements flags. 350 * 351 * @return the number of announcements flags 352 * @throws SystemException if a system exception occurred 353 */ 354 public int countAll() 355 throws com.liferay.portal.kernel.exception.SystemException; 356 357 public AnnouncementsFlag remove(AnnouncementsFlag announcementsFlag) 358 throws SystemException; 359 }