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