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