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 com.liferay.portal.model.UserIdMapper create(
30          long userIdMapperId) {
31          return getPersistence().create(userIdMapperId);
32      }
33  
34      public static com.liferay.portal.model.UserIdMapper remove(
35          long userIdMapperId)
36          throws com.liferay.portal.NoSuchUserIdMapperException,
37              com.liferay.portal.SystemException {
38          return getPersistence().remove(userIdMapperId);
39      }
40  
41      public static com.liferay.portal.model.UserIdMapper remove(
42          com.liferay.portal.model.UserIdMapper userIdMapper)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(userIdMapper);
45      }
46  
47      /**
48       * @deprecated Use <code>update(UserIdMapper userIdMapper, boolean merge)</code>.
49       */
50      public static com.liferay.portal.model.UserIdMapper update(
51          com.liferay.portal.model.UserIdMapper userIdMapper)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(userIdMapper);
54      }
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        userIdMapper the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when userIdMapper is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public static com.liferay.portal.model.UserIdMapper update(
70          com.liferay.portal.model.UserIdMapper userIdMapper, boolean merge)
71          throws com.liferay.portal.SystemException {
72          return getPersistence().update(userIdMapper, merge);
73      }
74  
75      public static com.liferay.portal.model.UserIdMapper updateImpl(
76          com.liferay.portal.model.UserIdMapper userIdMapper, boolean merge)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(userIdMapper, merge);
79      }
80  
81      public static com.liferay.portal.model.UserIdMapper findByPrimaryKey(
82          long userIdMapperId)
83          throws com.liferay.portal.NoSuchUserIdMapperException,
84              com.liferay.portal.SystemException {
85          return getPersistence().findByPrimaryKey(userIdMapperId);
86      }
87  
88      public static com.liferay.portal.model.UserIdMapper fetchByPrimaryKey(
89          long userIdMapperId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(userIdMapperId);
91      }
92  
93      public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
94          long userId) throws com.liferay.portal.SystemException {
95          return getPersistence().findByUserId(userId);
96      }
97  
98      public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
99          long userId, int start, int end)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().findByUserId(userId, start, end);
102     }
103 
104     public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
105         long userId, int start, int end,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().findByUserId(userId, start, end, obc);
109     }
110 
111     public static com.liferay.portal.model.UserIdMapper findByUserId_First(
112         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.NoSuchUserIdMapperException,
114             com.liferay.portal.SystemException {
115         return getPersistence().findByUserId_First(userId, obc);
116     }
117 
118     public static com.liferay.portal.model.UserIdMapper findByUserId_Last(
119         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
120         throws com.liferay.portal.NoSuchUserIdMapperException,
121             com.liferay.portal.SystemException {
122         return getPersistence().findByUserId_Last(userId, obc);
123     }
124 
125     public static com.liferay.portal.model.UserIdMapper[] findByUserId_PrevAndNext(
126         long userIdMapperId, long userId,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.NoSuchUserIdMapperException,
129             com.liferay.portal.SystemException {
130         return getPersistence()
131                    .findByUserId_PrevAndNext(userIdMapperId, userId, obc);
132     }
133 
134     public static com.liferay.portal.model.UserIdMapper findByU_T(long userId,
135         java.lang.String type)
136         throws com.liferay.portal.NoSuchUserIdMapperException,
137             com.liferay.portal.SystemException {
138         return getPersistence().findByU_T(userId, type);
139     }
140 
141     public static com.liferay.portal.model.UserIdMapper fetchByU_T(
142         long userId, java.lang.String type)
143         throws com.liferay.portal.SystemException {
144         return getPersistence().fetchByU_T(userId, type);
145     }
146 
147     public static com.liferay.portal.model.UserIdMapper findByT_E(
148         java.lang.String type, java.lang.String externalUserId)
149         throws com.liferay.portal.NoSuchUserIdMapperException,
150             com.liferay.portal.SystemException {
151         return getPersistence().findByT_E(type, externalUserId);
152     }
153 
154     public static com.liferay.portal.model.UserIdMapper fetchByT_E(
155         java.lang.String type, java.lang.String externalUserId)
156         throws com.liferay.portal.SystemException {
157         return getPersistence().fetchByT_E(type, externalUserId);
158     }
159 
160     public static java.util.List<Object> findWithDynamicQuery(
161         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
162         throws com.liferay.portal.SystemException {
163         return getPersistence().findWithDynamicQuery(dynamicQuery);
164     }
165 
166     public static java.util.List<Object> findWithDynamicQuery(
167         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
168         int end) throws com.liferay.portal.SystemException {
169         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
170     }
171 
172     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll()
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findAll();
175     }
176 
177     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
178         int start, int end) throws com.liferay.portal.SystemException {
179         return getPersistence().findAll(start, end);
180     }
181 
182     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
183         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException {
185         return getPersistence().findAll(start, end, obc);
186     }
187 
188     public static void removeByUserId(long userId)
189         throws com.liferay.portal.SystemException {
190         getPersistence().removeByUserId(userId);
191     }
192 
193     public static void removeByU_T(long userId, java.lang.String type)
194         throws com.liferay.portal.NoSuchUserIdMapperException,
195             com.liferay.portal.SystemException {
196         getPersistence().removeByU_T(userId, type);
197     }
198 
199     public static void removeByT_E(java.lang.String type,
200         java.lang.String externalUserId)
201         throws com.liferay.portal.NoSuchUserIdMapperException,
202             com.liferay.portal.SystemException {
203         getPersistence().removeByT_E(type, externalUserId);
204     }
205 
206     public static void removeAll() throws com.liferay.portal.SystemException {
207         getPersistence().removeAll();
208     }
209 
210     public static int countByUserId(long userId)
211         throws com.liferay.portal.SystemException {
212         return getPersistence().countByUserId(userId);
213     }
214 
215     public static int countByU_T(long userId, java.lang.String type)
216         throws com.liferay.portal.SystemException {
217         return getPersistence().countByU_T(userId, type);
218     }
219 
220     public static int countByT_E(java.lang.String type,
221         java.lang.String externalUserId)
222         throws com.liferay.portal.SystemException {
223         return getPersistence().countByT_E(type, externalUserId);
224     }
225 
226     public static int countAll() throws com.liferay.portal.SystemException {
227         return getPersistence().countAll();
228     }
229 
230     public static UserIdMapperPersistence getPersistence() {
231         return _persistence;
232     }
233 
234     public void setPersistence(UserIdMapperPersistence persistence) {
235         _persistence = persistence;
236     }
237 
238     private static UserIdMapperPersistence _persistence;
239 }