1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  
26  /**
27   * <a href="UserIdMapperUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       UserIdMapperPersistence
36   * @see       UserIdMapperPersistenceImpl
37   * @generated
38   */
39  public class UserIdMapperUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.UserIdMapper userIdMapper) {
42          getPersistence().cacheResult(userIdMapper);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.UserIdMapper> userIdMappers) {
47          getPersistence().cacheResult(userIdMappers);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.UserIdMapper create(
55          long userIdMapperId) {
56          return getPersistence().create(userIdMapperId);
57      }
58  
59      public static com.liferay.portal.model.UserIdMapper remove(
60          long userIdMapperId)
61          throws com.liferay.portal.NoSuchUserIdMapperException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(userIdMapperId);
64      }
65  
66      public static com.liferay.portal.model.UserIdMapper remove(
67          com.liferay.portal.model.UserIdMapper userIdMapper)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(userIdMapper);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(UserIdMapper, boolean merge)}.
74       */
75      public static com.liferay.portal.model.UserIdMapper update(
76          com.liferay.portal.model.UserIdMapper userIdMapper)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(userIdMapper);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  userIdMapper the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when userIdMapper is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.UserIdMapper update(
94          com.liferay.portal.model.UserIdMapper userIdMapper, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(userIdMapper, merge);
97      }
98  
99      public static com.liferay.portal.model.UserIdMapper updateImpl(
100         com.liferay.portal.model.UserIdMapper userIdMapper, boolean merge)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(userIdMapper, merge);
103     }
104 
105     public static com.liferay.portal.model.UserIdMapper findByPrimaryKey(
106         long userIdMapperId)
107         throws com.liferay.portal.NoSuchUserIdMapperException,
108             com.liferay.portal.SystemException {
109         return getPersistence().findByPrimaryKey(userIdMapperId);
110     }
111 
112     public static com.liferay.portal.model.UserIdMapper fetchByPrimaryKey(
113         long userIdMapperId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(userIdMapperId);
115     }
116 
117     public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
118         long userId) throws com.liferay.portal.SystemException {
119         return getPersistence().findByUserId(userId);
120     }
121 
122     public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
123         long userId, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUserId(userId, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
129         long userId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUserId(userId, start, end, obc);
133     }
134 
135     public static com.liferay.portal.model.UserIdMapper findByUserId_First(
136         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.NoSuchUserIdMapperException,
138             com.liferay.portal.SystemException {
139         return getPersistence().findByUserId_First(userId, obc);
140     }
141 
142     public static com.liferay.portal.model.UserIdMapper findByUserId_Last(
143         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.NoSuchUserIdMapperException,
145             com.liferay.portal.SystemException {
146         return getPersistence().findByUserId_Last(userId, obc);
147     }
148 
149     public static com.liferay.portal.model.UserIdMapper[] findByUserId_PrevAndNext(
150         long userIdMapperId, long userId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.NoSuchUserIdMapperException,
153             com.liferay.portal.SystemException {
154         return getPersistence()
155                    .findByUserId_PrevAndNext(userIdMapperId, userId, obc);
156     }
157 
158     public static com.liferay.portal.model.UserIdMapper findByU_T(long userId,
159         java.lang.String type)
160         throws com.liferay.portal.NoSuchUserIdMapperException,
161             com.liferay.portal.SystemException {
162         return getPersistence().findByU_T(userId, type);
163     }
164 
165     public static com.liferay.portal.model.UserIdMapper fetchByU_T(
166         long userId, java.lang.String type)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().fetchByU_T(userId, type);
169     }
170 
171     public static com.liferay.portal.model.UserIdMapper fetchByU_T(
172         long userId, java.lang.String type, boolean retrieveFromCache)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().fetchByU_T(userId, type, retrieveFromCache);
175     }
176 
177     public static com.liferay.portal.model.UserIdMapper findByT_E(
178         java.lang.String type, java.lang.String externalUserId)
179         throws com.liferay.portal.NoSuchUserIdMapperException,
180             com.liferay.portal.SystemException {
181         return getPersistence().findByT_E(type, externalUserId);
182     }
183 
184     public static com.liferay.portal.model.UserIdMapper fetchByT_E(
185         java.lang.String type, java.lang.String externalUserId)
186         throws com.liferay.portal.SystemException {
187         return getPersistence().fetchByT_E(type, externalUserId);
188     }
189 
190     public static com.liferay.portal.model.UserIdMapper fetchByT_E(
191         java.lang.String type, java.lang.String externalUserId,
192         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
193         return getPersistence()
194                    .fetchByT_E(type, externalUserId, retrieveFromCache);
195     }
196 
197     public static java.util.List<Object> findWithDynamicQuery(
198         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findWithDynamicQuery(dynamicQuery);
201     }
202 
203     public static java.util.List<Object> findWithDynamicQuery(
204         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
205         int end) throws com.liferay.portal.SystemException {
206         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
207     }
208 
209     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll()
210         throws com.liferay.portal.SystemException {
211         return getPersistence().findAll();
212     }
213 
214     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
215         int start, int end) throws com.liferay.portal.SystemException {
216         return getPersistence().findAll(start, end);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
220         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findAll(start, end, obc);
223     }
224 
225     public static void removeByUserId(long userId)
226         throws com.liferay.portal.SystemException {
227         getPersistence().removeByUserId(userId);
228     }
229 
230     public static void removeByU_T(long userId, java.lang.String type)
231         throws com.liferay.portal.NoSuchUserIdMapperException,
232             com.liferay.portal.SystemException {
233         getPersistence().removeByU_T(userId, type);
234     }
235 
236     public static void removeByT_E(java.lang.String type,
237         java.lang.String externalUserId)
238         throws com.liferay.portal.NoSuchUserIdMapperException,
239             com.liferay.portal.SystemException {
240         getPersistence().removeByT_E(type, externalUserId);
241     }
242 
243     public static void removeAll() throws com.liferay.portal.SystemException {
244         getPersistence().removeAll();
245     }
246 
247     public static int countByUserId(long userId)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().countByUserId(userId);
250     }
251 
252     public static int countByU_T(long userId, java.lang.String type)
253         throws com.liferay.portal.SystemException {
254         return getPersistence().countByU_T(userId, type);
255     }
256 
257     public static int countByT_E(java.lang.String type,
258         java.lang.String externalUserId)
259         throws com.liferay.portal.SystemException {
260         return getPersistence().countByT_E(type, externalUserId);
261     }
262 
263     public static int countAll() throws com.liferay.portal.SystemException {
264         return getPersistence().countAll();
265     }
266 
267     public static UserIdMapperPersistence getPersistence() {
268         return _persistence;
269     }
270 
271     public void setPersistence(UserIdMapperPersistence persistence) {
272         _persistence = persistence;
273     }
274 
275     private static UserIdMapperPersistence _persistence;
276 }