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