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