1   /**
2    * Copyright (c) 2000-2010 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   *
12   * 
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.model.ResourceCode;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ResourceCodeUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       ResourceCodePersistence
34   * @see       ResourceCodePersistenceImpl
35   * @generated
36   */
37  public class ResourceCodeUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static ResourceCode remove(ResourceCode resourceCode)
65          throws SystemException {
66          return getPersistence().remove(resourceCode);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static ResourceCode update(ResourceCode resourceCode, boolean merge)
73          throws SystemException {
74          return getPersistence().update(resourceCode, merge);
75      }
76  
77      public static void cacheResult(
78          com.liferay.portal.model.ResourceCode resourceCode) {
79          getPersistence().cacheResult(resourceCode);
80      }
81  
82      public static void cacheResult(
83          java.util.List<com.liferay.portal.model.ResourceCode> resourceCodes) {
84          getPersistence().cacheResult(resourceCodes);
85      }
86  
87      public static com.liferay.portal.model.ResourceCode create(long codeId) {
88          return getPersistence().create(codeId);
89      }
90  
91      public static com.liferay.portal.model.ResourceCode remove(long codeId)
92          throws com.liferay.portal.NoSuchResourceCodeException,
93              com.liferay.portal.SystemException {
94          return getPersistence().remove(codeId);
95      }
96  
97      /**
98       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
99       */
100     public static com.liferay.portal.model.ResourceCode update(
101         com.liferay.portal.model.ResourceCode resourceCode)
102         throws com.liferay.portal.SystemException {
103         return getPersistence().update(resourceCode);
104     }
105 
106     public static com.liferay.portal.model.ResourceCode updateImpl(
107         com.liferay.portal.model.ResourceCode resourceCode, boolean merge)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().updateImpl(resourceCode, merge);
110     }
111 
112     public static com.liferay.portal.model.ResourceCode findByPrimaryKey(
113         long codeId)
114         throws com.liferay.portal.NoSuchResourceCodeException,
115             com.liferay.portal.SystemException {
116         return getPersistence().findByPrimaryKey(codeId);
117     }
118 
119     public static com.liferay.portal.model.ResourceCode fetchByPrimaryKey(
120         long codeId) throws com.liferay.portal.SystemException {
121         return getPersistence().fetchByPrimaryKey(codeId);
122     }
123 
124     public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
125         long companyId) throws com.liferay.portal.SystemException {
126         return getPersistence().findByCompanyId(companyId);
127     }
128 
129     public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
130         long companyId, int start, int end)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByCompanyId(companyId, start, end);
133     }
134 
135     public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
136         long companyId, int start, int end,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException {
139         return getPersistence().findByCompanyId(companyId, start, end, obc);
140     }
141 
142     public static com.liferay.portal.model.ResourceCode findByCompanyId_First(
143         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.NoSuchResourceCodeException,
145             com.liferay.portal.SystemException {
146         return getPersistence().findByCompanyId_First(companyId, obc);
147     }
148 
149     public static com.liferay.portal.model.ResourceCode findByCompanyId_Last(
150         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.NoSuchResourceCodeException,
152             com.liferay.portal.SystemException {
153         return getPersistence().findByCompanyId_Last(companyId, obc);
154     }
155 
156     public static com.liferay.portal.model.ResourceCode[] findByCompanyId_PrevAndNext(
157         long codeId, long companyId,
158         com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.NoSuchResourceCodeException,
160             com.liferay.portal.SystemException {
161         return getPersistence()
162                    .findByCompanyId_PrevAndNext(codeId, companyId, obc);
163     }
164 
165     public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
166         java.lang.String name) throws com.liferay.portal.SystemException {
167         return getPersistence().findByName(name);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
171         java.lang.String name, int start, int end)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().findByName(name, start, end);
174     }
175 
176     public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
177         java.lang.String name, int start, int end,
178         com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().findByName(name, start, end, obc);
181     }
182 
183     public static com.liferay.portal.model.ResourceCode findByName_First(
184         java.lang.String name,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.NoSuchResourceCodeException,
187             com.liferay.portal.SystemException {
188         return getPersistence().findByName_First(name, obc);
189     }
190 
191     public static com.liferay.portal.model.ResourceCode findByName_Last(
192         java.lang.String name,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.NoSuchResourceCodeException,
195             com.liferay.portal.SystemException {
196         return getPersistence().findByName_Last(name, obc);
197     }
198 
199     public static com.liferay.portal.model.ResourceCode[] findByName_PrevAndNext(
200         long codeId, java.lang.String name,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.NoSuchResourceCodeException,
203             com.liferay.portal.SystemException {
204         return getPersistence().findByName_PrevAndNext(codeId, name, obc);
205     }
206 
207     public static com.liferay.portal.model.ResourceCode findByC_N_S(
208         long companyId, java.lang.String name, int scope)
209         throws com.liferay.portal.NoSuchResourceCodeException,
210             com.liferay.portal.SystemException {
211         return getPersistence().findByC_N_S(companyId, name, scope);
212     }
213 
214     public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
215         long companyId, java.lang.String name, int scope)
216         throws com.liferay.portal.SystemException {
217         return getPersistence().fetchByC_N_S(companyId, name, scope);
218     }
219 
220     public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
221         long companyId, java.lang.String name, int scope,
222         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
223         return getPersistence()
224                    .fetchByC_N_S(companyId, name, scope, retrieveFromCache);
225     }
226 
227     public static java.util.List<com.liferay.portal.model.ResourceCode> findAll()
228         throws com.liferay.portal.SystemException {
229         return getPersistence().findAll();
230     }
231 
232     public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
233         int start, int end) throws com.liferay.portal.SystemException {
234         return getPersistence().findAll(start, end);
235     }
236 
237     public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
238         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
239         throws com.liferay.portal.SystemException {
240         return getPersistence().findAll(start, end, obc);
241     }
242 
243     public static void removeByCompanyId(long companyId)
244         throws com.liferay.portal.SystemException {
245         getPersistence().removeByCompanyId(companyId);
246     }
247 
248     public static void removeByName(java.lang.String name)
249         throws com.liferay.portal.SystemException {
250         getPersistence().removeByName(name);
251     }
252 
253     public static void removeByC_N_S(long companyId, java.lang.String name,
254         int scope)
255         throws com.liferay.portal.NoSuchResourceCodeException,
256             com.liferay.portal.SystemException {
257         getPersistence().removeByC_N_S(companyId, name, scope);
258     }
259 
260     public static void removeAll() throws com.liferay.portal.SystemException {
261         getPersistence().removeAll();
262     }
263 
264     public static int countByCompanyId(long companyId)
265         throws com.liferay.portal.SystemException {
266         return getPersistence().countByCompanyId(companyId);
267     }
268 
269     public static int countByName(java.lang.String name)
270         throws com.liferay.portal.SystemException {
271         return getPersistence().countByName(name);
272     }
273 
274     public static int countByC_N_S(long companyId, java.lang.String name,
275         int scope) throws com.liferay.portal.SystemException {
276         return getPersistence().countByC_N_S(companyId, name, scope);
277     }
278 
279     public static int countAll() throws com.liferay.portal.SystemException {
280         return getPersistence().countAll();
281     }
282 
283     public static ResourceCodePersistence getPersistence() {
284         if (_persistence == null) {
285             _persistence = (ResourceCodePersistence)PortalBeanLocatorUtil.locate(ResourceCodePersistence.class.getName());
286         }
287 
288         return _persistence;
289     }
290 
291     public void setPersistence(ResourceCodePersistence persistence) {
292         _persistence = persistence;
293     }
294 
295     private static ResourceCodePersistence _persistence;
296 }