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