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