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.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.UserIdMapper; 020 021 /** 022 * The persistence interface for the user ID mapper service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see com.liferay.portal.service.persistence.impl.UserIdMapperPersistenceImpl 030 * @see UserIdMapperUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface UserIdMapperPersistence extends BasePersistence<UserIdMapper> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link UserIdMapperUtil} to access the user ID mapper persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the user ID mappers where userId = ?. 043 * 044 * @param userId the user ID 045 * @return the matching user ID mappers 046 */ 047 public java.util.List<UserIdMapper> findByUserId(long userId); 048 049 /** 050 * Returns a range of all the user ID mappers where userId = ?. 051 * 052 * <p> 053 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserIdMapperModelImpl}. 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. 054 * </p> 055 * 056 * @param userId the user ID 057 * @param start the lower bound of the range of user ID mappers 058 * @param end the upper bound of the range of user ID mappers (not inclusive) 059 * @return the range of matching user ID mappers 060 */ 061 public java.util.List<UserIdMapper> findByUserId(long userId, int start, 062 int end); 063 064 /** 065 * Returns an ordered range of all the user ID mappers where userId = ?. 066 * 067 * <p> 068 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserIdMapperModelImpl}. 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. 069 * </p> 070 * 071 * @param userId the user ID 072 * @param start the lower bound of the range of user ID mappers 073 * @param end the upper bound of the range of user ID mappers (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching user ID mappers 076 */ 077 public java.util.List<UserIdMapper> findByUserId(long userId, int start, 078 int end, 079 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator); 080 081 /** 082 * Returns an ordered range of all the user ID mappers where userId = ?. 083 * 084 * <p> 085 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserIdMapperModelImpl}. 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. 086 * </p> 087 * 088 * @param userId the user ID 089 * @param start the lower bound of the range of user ID mappers 090 * @param end the upper bound of the range of user ID mappers (not inclusive) 091 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 092 * @param retrieveFromCache whether to retrieve from the finder cache 093 * @return the ordered range of matching user ID mappers 094 */ 095 public java.util.List<UserIdMapper> findByUserId(long userId, int start, 096 int end, 097 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator, 098 boolean retrieveFromCache); 099 100 /** 101 * Returns the first user ID mapper in the ordered set where userId = ?. 102 * 103 * @param userId the user ID 104 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 105 * @return the first matching user ID mapper 106 * @throws NoSuchUserIdMapperException if a matching user ID mapper could not be found 107 */ 108 public UserIdMapper findByUserId_First(long userId, 109 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator) 110 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 111 112 /** 113 * Returns the first user ID mapper in the ordered set where userId = ?. 114 * 115 * @param userId the user ID 116 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 117 * @return the first matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found 118 */ 119 public UserIdMapper fetchByUserId_First(long userId, 120 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator); 121 122 /** 123 * Returns the last user ID mapper in the ordered set where userId = ?. 124 * 125 * @param userId the user ID 126 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 127 * @return the last matching user ID mapper 128 * @throws NoSuchUserIdMapperException if a matching user ID mapper could not be found 129 */ 130 public UserIdMapper findByUserId_Last(long userId, 131 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator) 132 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 133 134 /** 135 * Returns the last user ID mapper in the ordered set where userId = ?. 136 * 137 * @param userId the user ID 138 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 139 * @return the last matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found 140 */ 141 public UserIdMapper fetchByUserId_Last(long userId, 142 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator); 143 144 /** 145 * Returns the user ID mappers before and after the current user ID mapper in the ordered set where userId = ?. 146 * 147 * @param userIdMapperId the primary key of the current user ID mapper 148 * @param userId the user ID 149 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 150 * @return the previous, current, and next user ID mapper 151 * @throws NoSuchUserIdMapperException if a user ID mapper with the primary key could not be found 152 */ 153 public UserIdMapper[] findByUserId_PrevAndNext(long userIdMapperId, 154 long userId, 155 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator) 156 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 157 158 /** 159 * Removes all the user ID mappers where userId = ? from the database. 160 * 161 * @param userId the user ID 162 */ 163 public void removeByUserId(long userId); 164 165 /** 166 * Returns the number of user ID mappers where userId = ?. 167 * 168 * @param userId the user ID 169 * @return the number of matching user ID mappers 170 */ 171 public int countByUserId(long userId); 172 173 /** 174 * Returns the user ID mapper where userId = ? and type = ? or throws a {@link NoSuchUserIdMapperException} if it could not be found. 175 * 176 * @param userId the user ID 177 * @param type the type 178 * @return the matching user ID mapper 179 * @throws NoSuchUserIdMapperException if a matching user ID mapper could not be found 180 */ 181 public UserIdMapper findByU_T(long userId, java.lang.String type) 182 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 183 184 /** 185 * Returns the user ID mapper where userId = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 186 * 187 * @param userId the user ID 188 * @param type the type 189 * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found 190 */ 191 public UserIdMapper fetchByU_T(long userId, java.lang.String type); 192 193 /** 194 * Returns the user ID mapper where userId = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 195 * 196 * @param userId the user ID 197 * @param type the type 198 * @param retrieveFromCache whether to retrieve from the finder cache 199 * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found 200 */ 201 public UserIdMapper fetchByU_T(long userId, java.lang.String type, 202 boolean retrieveFromCache); 203 204 /** 205 * Removes the user ID mapper where userId = ? and type = ? from the database. 206 * 207 * @param userId the user ID 208 * @param type the type 209 * @return the user ID mapper that was removed 210 */ 211 public UserIdMapper removeByU_T(long userId, java.lang.String type) 212 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 213 214 /** 215 * Returns the number of user ID mappers where userId = ? and type = ?. 216 * 217 * @param userId the user ID 218 * @param type the type 219 * @return the number of matching user ID mappers 220 */ 221 public int countByU_T(long userId, java.lang.String type); 222 223 /** 224 * Returns the user ID mapper where type = ? and externalUserId = ? or throws a {@link NoSuchUserIdMapperException} if it could not be found. 225 * 226 * @param type the type 227 * @param externalUserId the external user ID 228 * @return the matching user ID mapper 229 * @throws NoSuchUserIdMapperException if a matching user ID mapper could not be found 230 */ 231 public UserIdMapper findByT_E(java.lang.String type, 232 java.lang.String externalUserId) 233 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 234 235 /** 236 * Returns the user ID mapper where type = ? and externalUserId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 237 * 238 * @param type the type 239 * @param externalUserId the external user ID 240 * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found 241 */ 242 public UserIdMapper fetchByT_E(java.lang.String type, 243 java.lang.String externalUserId); 244 245 /** 246 * Returns the user ID mapper where type = ? and externalUserId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 247 * 248 * @param type the type 249 * @param externalUserId the external user ID 250 * @param retrieveFromCache whether to retrieve from the finder cache 251 * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found 252 */ 253 public UserIdMapper fetchByT_E(java.lang.String type, 254 java.lang.String externalUserId, boolean retrieveFromCache); 255 256 /** 257 * Removes the user ID mapper where type = ? and externalUserId = ? from the database. 258 * 259 * @param type the type 260 * @param externalUserId the external user ID 261 * @return the user ID mapper that was removed 262 */ 263 public UserIdMapper removeByT_E(java.lang.String type, 264 java.lang.String externalUserId) 265 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 266 267 /** 268 * Returns the number of user ID mappers where type = ? and externalUserId = ?. 269 * 270 * @param type the type 271 * @param externalUserId the external user ID 272 * @return the number of matching user ID mappers 273 */ 274 public int countByT_E(java.lang.String type, java.lang.String externalUserId); 275 276 /** 277 * Caches the user ID mapper in the entity cache if it is enabled. 278 * 279 * @param userIdMapper the user ID mapper 280 */ 281 public void cacheResult(UserIdMapper userIdMapper); 282 283 /** 284 * Caches the user ID mappers in the entity cache if it is enabled. 285 * 286 * @param userIdMappers the user ID mappers 287 */ 288 public void cacheResult(java.util.List<UserIdMapper> userIdMappers); 289 290 /** 291 * Creates a new user ID mapper with the primary key. Does not add the user ID mapper to the database. 292 * 293 * @param userIdMapperId the primary key for the new user ID mapper 294 * @return the new user ID mapper 295 */ 296 public UserIdMapper create(long userIdMapperId); 297 298 /** 299 * Removes the user ID mapper with the primary key from the database. Also notifies the appropriate model listeners. 300 * 301 * @param userIdMapperId the primary key of the user ID mapper 302 * @return the user ID mapper that was removed 303 * @throws NoSuchUserIdMapperException if a user ID mapper with the primary key could not be found 304 */ 305 public UserIdMapper remove(long userIdMapperId) 306 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 307 308 public UserIdMapper updateImpl(UserIdMapper userIdMapper); 309 310 /** 311 * Returns the user ID mapper with the primary key or throws a {@link NoSuchUserIdMapperException} if it could not be found. 312 * 313 * @param userIdMapperId the primary key of the user ID mapper 314 * @return the user ID mapper 315 * @throws NoSuchUserIdMapperException if a user ID mapper with the primary key could not be found 316 */ 317 public UserIdMapper findByPrimaryKey(long userIdMapperId) 318 throws com.liferay.portal.exception.NoSuchUserIdMapperException; 319 320 /** 321 * Returns the user ID mapper with the primary key or returns <code>null</code> if it could not be found. 322 * 323 * @param userIdMapperId the primary key of the user ID mapper 324 * @return the user ID mapper, or <code>null</code> if a user ID mapper with the primary key could not be found 325 */ 326 public UserIdMapper fetchByPrimaryKey(long userIdMapperId); 327 328 @Override 329 public java.util.Map<java.io.Serializable, UserIdMapper> fetchByPrimaryKeys( 330 java.util.Set<java.io.Serializable> primaryKeys); 331 332 /** 333 * Returns all the user ID mappers. 334 * 335 * @return the user ID mappers 336 */ 337 public java.util.List<UserIdMapper> findAll(); 338 339 /** 340 * Returns a range of all the user ID mappers. 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserIdMapperModelImpl}. 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 user ID mappers 347 * @param end the upper bound of the range of user ID mappers (not inclusive) 348 * @return the range of user ID mappers 349 */ 350 public java.util.List<UserIdMapper> findAll(int start, int end); 351 352 /** 353 * Returns an ordered range of all the user ID mappers. 354 * 355 * <p> 356 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserIdMapperModelImpl}. 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. 357 * </p> 358 * 359 * @param start the lower bound of the range of user ID mappers 360 * @param end the upper bound of the range of user ID mappers (not inclusive) 361 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 362 * @return the ordered range of user ID mappers 363 */ 364 public java.util.List<UserIdMapper> findAll(int start, int end, 365 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator); 366 367 /** 368 * Returns an ordered range of all the user ID mappers. 369 * 370 * <p> 371 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserIdMapperModelImpl}. 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. 372 * </p> 373 * 374 * @param start the lower bound of the range of user ID mappers 375 * @param end the upper bound of the range of user ID mappers (not inclusive) 376 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 377 * @param retrieveFromCache whether to retrieve from the finder cache 378 * @return the ordered range of user ID mappers 379 */ 380 public java.util.List<UserIdMapper> findAll(int start, int end, 381 com.liferay.portal.kernel.util.OrderByComparator<UserIdMapper> orderByComparator, 382 boolean retrieveFromCache); 383 384 /** 385 * Removes all the user ID mappers from the database. 386 */ 387 public void removeAll(); 388 389 /** 390 * Returns the number of user ID mappers. 391 * 392 * @return the number of user ID mappers 393 */ 394 public int countAll(); 395 396 @Override 397 public java.util.Set<java.lang.String> getBadColumnNames(); 398 }