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