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