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