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.kernel.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            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
044                    return getService().getActionableDynamicQuery();
045            }
046    
047            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
048                    return getService().dynamicQuery();
049            }
050    
051            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
052                    return getService().getIndexableActionableDynamicQuery();
053            }
054    
055            /**
056            * @throws PortalException
057            */
058            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
059                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService().deletePersistedModel(persistedModel);
062            }
063    
064            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
065                    java.io.Serializable primaryKeyObj)
066                    throws com.liferay.portal.kernel.exception.PortalException {
067                    return getService().getPersistedModel(primaryKeyObj);
068            }
069    
070            /**
071            * Adds the user ID mapper to the database. Also notifies the appropriate model listeners.
072            *
073            * @param userIdMapper the user ID mapper
074            * @return the user ID mapper that was added
075            */
076            public static com.liferay.portal.kernel.model.UserIdMapper addUserIdMapper(
077                    com.liferay.portal.kernel.model.UserIdMapper userIdMapper) {
078                    return getService().addUserIdMapper(userIdMapper);
079            }
080    
081            /**
082            * Creates a new user ID mapper with the primary key. Does not add the user ID mapper to the database.
083            *
084            * @param userIdMapperId the primary key for the new user ID mapper
085            * @return the new user ID mapper
086            */
087            public static com.liferay.portal.kernel.model.UserIdMapper createUserIdMapper(
088                    long userIdMapperId) {
089                    return getService().createUserIdMapper(userIdMapperId);
090            }
091    
092            /**
093            * Deletes the user ID mapper from the database. Also notifies the appropriate model listeners.
094            *
095            * @param userIdMapper the user ID mapper
096            * @return the user ID mapper that was removed
097            */
098            public static com.liferay.portal.kernel.model.UserIdMapper deleteUserIdMapper(
099                    com.liferay.portal.kernel.model.UserIdMapper userIdMapper) {
100                    return getService().deleteUserIdMapper(userIdMapper);
101            }
102    
103            /**
104            * Deletes the user ID mapper with the primary key from the database. Also notifies the appropriate model listeners.
105            *
106            * @param userIdMapperId the primary key of the user ID mapper
107            * @return the user ID mapper that was removed
108            * @throws PortalException if a user ID mapper with the primary key could not be found
109            */
110            public static com.liferay.portal.kernel.model.UserIdMapper deleteUserIdMapper(
111                    long userIdMapperId)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    return getService().deleteUserIdMapper(userIdMapperId);
114            }
115    
116            public static com.liferay.portal.kernel.model.UserIdMapper fetchUserIdMapper(
117                    long userIdMapperId) {
118                    return getService().fetchUserIdMapper(userIdMapperId);
119            }
120    
121            public static com.liferay.portal.kernel.model.UserIdMapper getUserIdMapper(
122                    long userId, java.lang.String type)
123                    throws com.liferay.portal.kernel.exception.PortalException {
124                    return getService().getUserIdMapper(userId, type);
125            }
126    
127            /**
128            * Returns the user ID mapper with the primary key.
129            *
130            * @param userIdMapperId the primary key of the user ID mapper
131            * @return the user ID mapper
132            * @throws PortalException if a user ID mapper with the primary key could not be found
133            */
134            public static com.liferay.portal.kernel.model.UserIdMapper getUserIdMapper(
135                    long userIdMapperId)
136                    throws com.liferay.portal.kernel.exception.PortalException {
137                    return getService().getUserIdMapper(userIdMapperId);
138            }
139    
140            public static com.liferay.portal.kernel.model.UserIdMapper getUserIdMapperByExternalUserId(
141                    java.lang.String type, java.lang.String externalUserId)
142                    throws com.liferay.portal.kernel.exception.PortalException {
143                    return getService().getUserIdMapperByExternalUserId(type, externalUserId);
144            }
145    
146            /**
147            * Updates the user ID mapper in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
148            *
149            * @param userIdMapper the user ID mapper
150            * @return the user ID mapper that was updated
151            */
152            public static com.liferay.portal.kernel.model.UserIdMapper updateUserIdMapper(
153                    com.liferay.portal.kernel.model.UserIdMapper userIdMapper) {
154                    return getService().updateUserIdMapper(userIdMapper);
155            }
156    
157            public static com.liferay.portal.kernel.model.UserIdMapper updateUserIdMapper(
158                    long userId, java.lang.String type, java.lang.String description,
159                    java.lang.String externalUserId) {
160                    return getService()
161                                       .updateUserIdMapper(userId, type, description, externalUserId);
162            }
163    
164            /**
165            * Returns the number of user ID mappers.
166            *
167            * @return the number of user ID mappers
168            */
169            public static int getUserIdMappersCount() {
170                    return getService().getUserIdMappersCount();
171            }
172    
173            /**
174            * Returns the OSGi service identifier.
175            *
176            * @return the OSGi service identifier
177            */
178            public static java.lang.String getOSGiServiceIdentifier() {
179                    return getService().getOSGiServiceIdentifier();
180            }
181    
182            /**
183            * Performs a dynamic query on the database and returns the matching rows.
184            *
185            * @param dynamicQuery the dynamic query
186            * @return the matching rows
187            */
188            public static <T> java.util.List<T> dynamicQuery(
189                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
190                    return getService().dynamicQuery(dynamicQuery);
191            }
192    
193            /**
194            * Performs a dynamic query on the database and returns a range of the matching rows.
195            *
196            * <p>
197            * 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.
198            * </p>
199            *
200            * @param dynamicQuery the dynamic query
201            * @param start the lower bound of the range of model instances
202            * @param end the upper bound of the range of model instances (not inclusive)
203            * @return the range of matching rows
204            */
205            public static <T> java.util.List<T> dynamicQuery(
206                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
207                    int end) {
208                    return getService().dynamicQuery(dynamicQuery, start, end);
209            }
210    
211            /**
212            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
213            *
214            * <p>
215            * 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.
216            * </p>
217            *
218            * @param dynamicQuery the dynamic query
219            * @param start the lower bound of the range of model instances
220            * @param end the upper bound of the range of model instances (not inclusive)
221            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
222            * @return the ordered range of matching rows
223            */
224            public static <T> java.util.List<T> dynamicQuery(
225                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
226                    int end,
227                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
228                    return getService()
229                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
230            }
231    
232            /**
233            * Returns a range of all the user ID mappers.
234            *
235            * <p>
236            * 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.
237            * </p>
238            *
239            * @param start the lower bound of the range of user ID mappers
240            * @param end the upper bound of the range of user ID mappers (not inclusive)
241            * @return the range of user ID mappers
242            */
243            public static java.util.List<com.liferay.portal.kernel.model.UserIdMapper> getUserIdMappers(
244                    int start, int end) {
245                    return getService().getUserIdMappers(start, end);
246            }
247    
248            public static java.util.List<com.liferay.portal.kernel.model.UserIdMapper> getUserIdMappers(
249                    long userId) {
250                    return getService().getUserIdMappers(userId);
251            }
252    
253            /**
254            * Returns the number of rows matching the dynamic query.
255            *
256            * @param dynamicQuery the dynamic query
257            * @return the number of rows matching the dynamic query
258            */
259            public static long dynamicQueryCount(
260                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
261                    return getService().dynamicQueryCount(dynamicQuery);
262            }
263    
264            /**
265            * Returns the number of rows matching the dynamic query.
266            *
267            * @param dynamicQuery the dynamic query
268            * @param projection the projection to apply to the query
269            * @return the number of rows matching the dynamic query
270            */
271            public static long dynamicQueryCount(
272                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
273                    com.liferay.portal.kernel.dao.orm.Projection projection) {
274                    return getService().dynamicQueryCount(dynamicQuery, projection);
275            }
276    
277            public static void deleteUserIdMappers(long userId) {
278                    getService().deleteUserIdMappers(userId);
279            }
280    
281            public static UserIdMapperLocalService getService() {
282                    if (_service == null) {
283                            _service = (UserIdMapperLocalService)PortalBeanLocatorUtil.locate(UserIdMapperLocalService.class.getName());
284    
285                            ReferenceRegistry.registerReference(UserIdMapperLocalServiceUtil.class,
286                                    "_service");
287                    }
288    
289                    return _service;
290            }
291    
292            private static UserIdMapperLocalService _service;
293    }