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