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