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