001    /**
002     * Copyright (c) 2000-2012 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            * <p>
151            * 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.
152            * </p>
153            *
154            * @param userId the user ID
155            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
156            * @return the first matching user ID mapper
157            * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user ID mapper could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public com.liferay.portal.model.UserIdMapper findByUserId_First(
161                    long userId,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.NoSuchUserIdMapperException,
164                            com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns the last user ID mapper in the ordered set where userId = &#63;.
168            *
169            * <p>
170            * 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.
171            * </p>
172            *
173            * @param userId the user ID
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the last matching user ID mapper
176            * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user ID mapper could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            public com.liferay.portal.model.UserIdMapper findByUserId_Last(
180                    long userId,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.NoSuchUserIdMapperException,
183                            com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Returns the user ID mappers before and after the current user ID mapper in the ordered set where userId = &#63;.
187            *
188            * <p>
189            * 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.
190            * </p>
191            *
192            * @param userIdMapperId the primary key of the current user ID mapper
193            * @param userId the user ID
194            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
195            * @return the previous, current, and next user ID mapper
196            * @throws com.liferay.portal.NoSuchUserIdMapperException if a user ID mapper with the primary key could not be found
197            * @throws SystemException if a system exception occurred
198            */
199            public com.liferay.portal.model.UserIdMapper[] findByUserId_PrevAndNext(
200                    long userIdMapperId, long userId,
201                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202                    throws com.liferay.portal.NoSuchUserIdMapperException,
203                            com.liferay.portal.kernel.exception.SystemException;
204    
205            /**
206            * 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.
207            *
208            * @param userId the user ID
209            * @param type the type
210            * @return the matching user ID mapper
211            * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user ID mapper could not be found
212            * @throws SystemException if a system exception occurred
213            */
214            public com.liferay.portal.model.UserIdMapper findByU_T(long userId,
215                    java.lang.String type)
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 returns <code>null</code> if it could not be found. Uses the finder cache.
221            *
222            * @param userId the user ID
223            * @param type the type
224            * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found
225            * @throws SystemException if a system exception occurred
226            */
227            public com.liferay.portal.model.UserIdMapper fetchByU_T(long userId,
228                    java.lang.String type)
229                    throws com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * 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.
233            *
234            * @param userId the user ID
235            * @param type the type
236            * @param retrieveFromCache whether to use the finder cache
237            * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public com.liferay.portal.model.UserIdMapper fetchByU_T(long userId,
241                    java.lang.String type, boolean retrieveFromCache)
242                    throws com.liferay.portal.kernel.exception.SystemException;
243    
244            /**
245            * 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.
246            *
247            * @param type the type
248            * @param externalUserId the external user ID
249            * @return the matching user ID mapper
250            * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user ID mapper could not be found
251            * @throws SystemException if a system exception occurred
252            */
253            public com.liferay.portal.model.UserIdMapper findByT_E(
254                    java.lang.String type, java.lang.String externalUserId)
255                    throws com.liferay.portal.NoSuchUserIdMapperException,
256                            com.liferay.portal.kernel.exception.SystemException;
257    
258            /**
259            * 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.
260            *
261            * @param type the type
262            * @param externalUserId the external user ID
263            * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found
264            * @throws SystemException if a system exception occurred
265            */
266            public com.liferay.portal.model.UserIdMapper fetchByT_E(
267                    java.lang.String type, java.lang.String externalUserId)
268                    throws com.liferay.portal.kernel.exception.SystemException;
269    
270            /**
271            * 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.
272            *
273            * @param type the type
274            * @param externalUserId the external user ID
275            * @param retrieveFromCache whether to use the finder cache
276            * @return the matching user ID mapper, or <code>null</code> if a matching user ID mapper could not be found
277            * @throws SystemException if a system exception occurred
278            */
279            public com.liferay.portal.model.UserIdMapper fetchByT_E(
280                    java.lang.String type, java.lang.String externalUserId,
281                    boolean retrieveFromCache)
282                    throws com.liferay.portal.kernel.exception.SystemException;
283    
284            /**
285            * Returns all the user ID mappers.
286            *
287            * @return the user ID mappers
288            * @throws SystemException if a system exception occurred
289            */
290            public java.util.List<com.liferay.portal.model.UserIdMapper> findAll()
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Returns a range of all the user ID mappers.
295            *
296            * <p>
297            * 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.
298            * </p>
299            *
300            * @param start the lower bound of the range of user ID mappers
301            * @param end the upper bound of the range of user ID mappers (not inclusive)
302            * @return the range of user ID mappers
303            * @throws SystemException if a system exception occurred
304            */
305            public java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
306                    int start, int end)
307                    throws com.liferay.portal.kernel.exception.SystemException;
308    
309            /**
310            * Returns an ordered range of all the user ID mappers.
311            *
312            * <p>
313            * 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.
314            * </p>
315            *
316            * @param start the lower bound of the range of user ID mappers
317            * @param end the upper bound of the range of user ID mappers (not inclusive)
318            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
319            * @return the ordered range of user ID mappers
320            * @throws SystemException if a system exception occurred
321            */
322            public java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
323                    int start, int end,
324                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            /**
328            * Removes all the user ID mappers where userId = &#63; from the database.
329            *
330            * @param userId the user ID
331            * @throws SystemException if a system exception occurred
332            */
333            public void removeByUserId(long userId)
334                    throws com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * Removes the user ID mapper where userId = &#63; and type = &#63; from the database.
338            *
339            * @param userId the user ID
340            * @param type the type
341            * @throws SystemException if a system exception occurred
342            */
343            public void removeByU_T(long userId, java.lang.String type)
344                    throws com.liferay.portal.NoSuchUserIdMapperException,
345                            com.liferay.portal.kernel.exception.SystemException;
346    
347            /**
348            * Removes the user ID mapper where type = &#63; and externalUserId = &#63; from the database.
349            *
350            * @param type the type
351            * @param externalUserId the external user ID
352            * @throws SystemException if a system exception occurred
353            */
354            public void removeByT_E(java.lang.String type,
355                    java.lang.String externalUserId)
356                    throws com.liferay.portal.NoSuchUserIdMapperException,
357                            com.liferay.portal.kernel.exception.SystemException;
358    
359            /**
360            * Removes all the user ID mappers from the database.
361            *
362            * @throws SystemException if a system exception occurred
363            */
364            public void removeAll()
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Returns the number of user ID mappers where userId = &#63;.
369            *
370            * @param userId the user ID
371            * @return the number of matching user ID mappers
372            * @throws SystemException if a system exception occurred
373            */
374            public int countByUserId(long userId)
375                    throws com.liferay.portal.kernel.exception.SystemException;
376    
377            /**
378            * Returns the number of user ID mappers where userId = &#63; and type = &#63;.
379            *
380            * @param userId the user ID
381            * @param type the type
382            * @return the number of matching user ID mappers
383            * @throws SystemException if a system exception occurred
384            */
385            public int countByU_T(long userId, java.lang.String type)
386                    throws com.liferay.portal.kernel.exception.SystemException;
387    
388            /**
389            * Returns the number of user ID mappers where type = &#63; and externalUserId = &#63;.
390            *
391            * @param type the type
392            * @param externalUserId the external user ID
393            * @return the number of matching user ID mappers
394            * @throws SystemException if a system exception occurred
395            */
396            public int countByT_E(java.lang.String type, java.lang.String externalUserId)
397                    throws com.liferay.portal.kernel.exception.SystemException;
398    
399            /**
400            * Returns the number of user ID mappers.
401            *
402            * @return the number of user ID mappers
403            * @throws SystemException if a system exception occurred
404            */
405            public int countAll()
406                    throws com.liferay.portal.kernel.exception.SystemException;
407    }