001    /**
002     * Copyright (c) 2000-present 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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for UserIdMapper. This utility wraps
024     * {@link com.liferay.portal.service.impl.UserIdMapperLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see UserIdMapperLocalService
032     * @see com.liferay.portal.service.base.UserIdMapperLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.UserIdMapperLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class UserIdMapperLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserIdMapperLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the user ID mapper to the database. Also notifies the appropriate model listeners.
046            *
047            * @param userIdMapper the user ID mapper
048            * @return the user ID mapper that was added
049            */
050            public static com.liferay.portal.model.UserIdMapper addUserIdMapper(
051                    com.liferay.portal.model.UserIdMapper userIdMapper) {
052                    return getService().addUserIdMapper(userIdMapper);
053            }
054    
055            /**
056            * Creates a new user ID mapper with the primary key. Does not add the user ID mapper to the database.
057            *
058            * @param userIdMapperId the primary key for the new user ID mapper
059            * @return the new user ID mapper
060            */
061            public static com.liferay.portal.model.UserIdMapper createUserIdMapper(
062                    long userIdMapperId) {
063                    return getService().createUserIdMapper(userIdMapperId);
064            }
065    
066            /**
067            * @throws PortalException
068            */
069            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
070                    com.liferay.portal.model.PersistedModel persistedModel)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    return getService().deletePersistedModel(persistedModel);
073            }
074    
075            /**
076            * Deletes the user ID mapper from the database. Also notifies the appropriate model listeners.
077            *
078            * @param userIdMapper the user ID mapper
079            * @return the user ID mapper that was removed
080            */
081            public static com.liferay.portal.model.UserIdMapper deleteUserIdMapper(
082                    com.liferay.portal.model.UserIdMapper userIdMapper) {
083                    return getService().deleteUserIdMapper(userIdMapper);
084            }
085    
086            /**
087            * Deletes the user ID mapper with the primary key from the database. Also notifies the appropriate model listeners.
088            *
089            * @param userIdMapperId the primary key of the user ID mapper
090            * @return the user ID mapper that was removed
091            * @throws PortalException if a user ID mapper with the primary key could not be found
092            */
093            public static com.liferay.portal.model.UserIdMapper deleteUserIdMapper(
094                    long userIdMapperId)
095                    throws com.liferay.portal.kernel.exception.PortalException {
096                    return getService().deleteUserIdMapper(userIdMapperId);
097            }
098    
099            public static void deleteUserIdMappers(long userId) {
100                    getService().deleteUserIdMappers(userId);
101            }
102    
103            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
104                    return getService().dynamicQuery();
105            }
106    
107            /**
108            * Performs a dynamic query on the database and returns the matching rows.
109            *
110            * @param dynamicQuery the dynamic query
111            * @return the matching rows
112            */
113            public static <T> java.util.List<T> dynamicQuery(
114                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
115                    return getService().dynamicQuery(dynamicQuery);
116            }
117    
118            /**
119            * Performs a dynamic query on the database and returns a range of the matching rows.
120            *
121            * <p>
122            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserIdMapperModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
123            * </p>
124            *
125            * @param dynamicQuery the dynamic query
126            * @param start the lower bound of the range of model instances
127            * @param end the upper bound of the range of model instances (not inclusive)
128            * @return the range of matching rows
129            */
130            public static <T> java.util.List<T> dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end) {
133                    return getService().dynamicQuery(dynamicQuery, start, end);
134            }
135    
136            /**
137            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
138            *
139            * <p>
140            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserIdMapperModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
141            * </p>
142            *
143            * @param dynamicQuery the dynamic query
144            * @param start the lower bound of the range of model instances
145            * @param end the upper bound of the range of model instances (not inclusive)
146            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
147            * @return the ordered range of matching rows
148            */
149            public static <T> java.util.List<T> dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
151                    int end,
152                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
153                    return getService()
154                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
155            }
156    
157            /**
158            * Returns the number of rows matching the dynamic query.
159            *
160            * @param dynamicQuery the dynamic query
161            * @return the number of rows matching the dynamic query
162            */
163            public static long dynamicQueryCount(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
165                    return getService().dynamicQueryCount(dynamicQuery);
166            }
167    
168            /**
169            * Returns the number of rows matching the dynamic query.
170            *
171            * @param dynamicQuery the dynamic query
172            * @param projection the projection to apply to the query
173            * @return the number of rows matching the dynamic query
174            */
175            public static long dynamicQueryCount(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
177                    com.liferay.portal.kernel.dao.orm.Projection projection) {
178                    return getService().dynamicQueryCount(dynamicQuery, projection);
179            }
180    
181            public static com.liferay.portal.model.UserIdMapper fetchUserIdMapper(
182                    long userIdMapperId) {
183                    return getService().fetchUserIdMapper(userIdMapperId);
184            }
185    
186            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
187                    return getService().getActionableDynamicQuery();
188            }
189    
190            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
191                    return getService().getIndexableActionableDynamicQuery();
192            }
193    
194            /**
195            * Returns the OSGi service identifier.
196            *
197            * @return the OSGi service identifier
198            */
199            public static java.lang.String getOSGiServiceIdentifier() {
200                    return getService().getOSGiServiceIdentifier();
201            }
202    
203            public static com.liferay.portal.model.PersistedModel getPersistedModel(
204                    java.io.Serializable primaryKeyObj)
205                    throws com.liferay.portal.kernel.exception.PortalException {
206                    return getService().getPersistedModel(primaryKeyObj);
207            }
208    
209            public static com.liferay.portal.model.UserIdMapper getUserIdMapper(
210                    long userId, java.lang.String type)
211                    throws com.liferay.portal.kernel.exception.PortalException {
212                    return getService().getUserIdMapper(userId, type);
213            }
214    
215            /**
216            * Returns the user ID mapper with the primary key.
217            *
218            * @param userIdMapperId the primary key of the user ID mapper
219            * @return the user ID mapper
220            * @throws PortalException if a user ID mapper with the primary key could not be found
221            */
222            public static com.liferay.portal.model.UserIdMapper getUserIdMapper(
223                    long userIdMapperId)
224                    throws com.liferay.portal.kernel.exception.PortalException {
225                    return getService().getUserIdMapper(userIdMapperId);
226            }
227    
228            public static com.liferay.portal.model.UserIdMapper getUserIdMapperByExternalUserId(
229                    java.lang.String type, java.lang.String externalUserId)
230                    throws com.liferay.portal.kernel.exception.PortalException {
231                    return getService().getUserIdMapperByExternalUserId(type, externalUserId);
232            }
233    
234            /**
235            * Returns a range of all the user ID mappers.
236            *
237            * <p>
238            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserIdMapperModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
239            * </p>
240            *
241            * @param start the lower bound of the range of user ID mappers
242            * @param end the upper bound of the range of user ID mappers (not inclusive)
243            * @return the range of user ID mappers
244            */
245            public static java.util.List<com.liferay.portal.model.UserIdMapper> getUserIdMappers(
246                    int start, int end) {
247                    return getService().getUserIdMappers(start, end);
248            }
249    
250            public static java.util.List<com.liferay.portal.model.UserIdMapper> getUserIdMappers(
251                    long userId) {
252                    return getService().getUserIdMappers(userId);
253            }
254    
255            /**
256            * Returns the number of user ID mappers.
257            *
258            * @return the number of user ID mappers
259            */
260            public static int getUserIdMappersCount() {
261                    return getService().getUserIdMappersCount();
262            }
263    
264            public static com.liferay.portal.model.UserIdMapper updateUserIdMapper(
265                    long userId, java.lang.String type, java.lang.String description,
266                    java.lang.String externalUserId) {
267                    return getService()
268                                       .updateUserIdMapper(userId, type, description, externalUserId);
269            }
270    
271            /**
272            * Updates the user ID mapper in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
273            *
274            * @param userIdMapper the user ID mapper
275            * @return the user ID mapper that was updated
276            */
277            public static com.liferay.portal.model.UserIdMapper updateUserIdMapper(
278                    com.liferay.portal.model.UserIdMapper userIdMapper) {
279                    return getService().updateUserIdMapper(userIdMapper);
280            }
281    
282            public static UserIdMapperLocalService getService() {
283                    if (_service == null) {
284                            _service = (UserIdMapperLocalService)PortalBeanLocatorUtil.locate(UserIdMapperLocalService.class.getName());
285    
286                            ReferenceRegistry.registerReference(UserIdMapperLocalServiceUtil.class,
287                                    "_service");
288                    }
289    
290                    return _service;
291            }
292    
293            private static UserIdMapperLocalService _service;
294    }