1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  import com.liferay.portal.model.ResourceAction;
29  
30  import java.util.List;
31  
32  /**
33   * <a href="ResourceActionUtil.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * @author    Brian Wing Shun Chan
41   * @see       ResourceActionPersistence
42   * @see       ResourceActionPersistenceImpl
43   * @generated
44   */
45  public class ResourceActionUtil {
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
48       */
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65          int start, int end) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
71       */
72      public static ResourceAction remove(ResourceAction resourceAction)
73          throws SystemException {
74          return getPersistence().remove(resourceAction);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
79       */
80      public static ResourceAction update(ResourceAction resourceAction,
81          boolean merge) throws SystemException {
82          return getPersistence().update(resourceAction, merge);
83      }
84  
85      public static void cacheResult(
86          com.liferay.portal.model.ResourceAction resourceAction) {
87          getPersistence().cacheResult(resourceAction);
88      }
89  
90      public static void cacheResult(
91          java.util.List<com.liferay.portal.model.ResourceAction> resourceActions) {
92          getPersistence().cacheResult(resourceActions);
93      }
94  
95      public static com.liferay.portal.model.ResourceAction create(
96          long resourceActionId) {
97          return getPersistence().create(resourceActionId);
98      }
99  
100     public static com.liferay.portal.model.ResourceAction remove(
101         long resourceActionId)
102         throws com.liferay.portal.NoSuchResourceActionException,
103             com.liferay.portal.SystemException {
104         return getPersistence().remove(resourceActionId);
105     }
106 
107     /**
108      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
109      */
110     public static com.liferay.portal.model.ResourceAction update(
111         com.liferay.portal.model.ResourceAction resourceAction)
112         throws com.liferay.portal.SystemException {
113         return getPersistence().update(resourceAction);
114     }
115 
116     public static com.liferay.portal.model.ResourceAction updateImpl(
117         com.liferay.portal.model.ResourceAction resourceAction, boolean merge)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().updateImpl(resourceAction, merge);
120     }
121 
122     public static com.liferay.portal.model.ResourceAction findByPrimaryKey(
123         long resourceActionId)
124         throws com.liferay.portal.NoSuchResourceActionException,
125             com.liferay.portal.SystemException {
126         return getPersistence().findByPrimaryKey(resourceActionId);
127     }
128 
129     public static com.liferay.portal.model.ResourceAction fetchByPrimaryKey(
130         long resourceActionId) throws com.liferay.portal.SystemException {
131         return getPersistence().fetchByPrimaryKey(resourceActionId);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
135         java.lang.String name) throws com.liferay.portal.SystemException {
136         return getPersistence().findByName(name);
137     }
138 
139     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
140         java.lang.String name, int start, int end)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByName(name, start, end);
143     }
144 
145     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
146         java.lang.String name, int start, int end,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException {
149         return getPersistence().findByName(name, start, end, obc);
150     }
151 
152     public static com.liferay.portal.model.ResourceAction findByName_First(
153         java.lang.String name,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.NoSuchResourceActionException,
156             com.liferay.portal.SystemException {
157         return getPersistence().findByName_First(name, obc);
158     }
159 
160     public static com.liferay.portal.model.ResourceAction findByName_Last(
161         java.lang.String name,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.NoSuchResourceActionException,
164             com.liferay.portal.SystemException {
165         return getPersistence().findByName_Last(name, obc);
166     }
167 
168     public static com.liferay.portal.model.ResourceAction[] findByName_PrevAndNext(
169         long resourceActionId, java.lang.String name,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.NoSuchResourceActionException,
172             com.liferay.portal.SystemException {
173         return getPersistence()
174                    .findByName_PrevAndNext(resourceActionId, name, obc);
175     }
176 
177     public static com.liferay.portal.model.ResourceAction findByN_A(
178         java.lang.String name, java.lang.String actionId)
179         throws com.liferay.portal.NoSuchResourceActionException,
180             com.liferay.portal.SystemException {
181         return getPersistence().findByN_A(name, actionId);
182     }
183 
184     public static com.liferay.portal.model.ResourceAction fetchByN_A(
185         java.lang.String name, java.lang.String actionId)
186         throws com.liferay.portal.SystemException {
187         return getPersistence().fetchByN_A(name, actionId);
188     }
189 
190     public static com.liferay.portal.model.ResourceAction fetchByN_A(
191         java.lang.String name, java.lang.String actionId,
192         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
193         return getPersistence().fetchByN_A(name, actionId, retrieveFromCache);
194     }
195 
196     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll()
197         throws com.liferay.portal.SystemException {
198         return getPersistence().findAll();
199     }
200 
201     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
202         int start, int end) throws com.liferay.portal.SystemException {
203         return getPersistence().findAll(start, end);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
207         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException {
209         return getPersistence().findAll(start, end, obc);
210     }
211 
212     public static void removeByName(java.lang.String name)
213         throws com.liferay.portal.SystemException {
214         getPersistence().removeByName(name);
215     }
216 
217     public static void removeByN_A(java.lang.String name,
218         java.lang.String actionId)
219         throws com.liferay.portal.NoSuchResourceActionException,
220             com.liferay.portal.SystemException {
221         getPersistence().removeByN_A(name, actionId);
222     }
223 
224     public static void removeAll() throws com.liferay.portal.SystemException {
225         getPersistence().removeAll();
226     }
227 
228     public static int countByName(java.lang.String name)
229         throws com.liferay.portal.SystemException {
230         return getPersistence().countByName(name);
231     }
232 
233     public static int countByN_A(java.lang.String name,
234         java.lang.String actionId) throws com.liferay.portal.SystemException {
235         return getPersistence().countByN_A(name, actionId);
236     }
237 
238     public static int countAll() throws com.liferay.portal.SystemException {
239         return getPersistence().countAll();
240     }
241 
242     public static ResourceActionPersistence getPersistence() {
243         if (_persistence == null) {
244             _persistence = (ResourceActionPersistence)PortalBeanLocatorUtil.locate(ResourceActionPersistence.class.getName());
245         }
246 
247         return _persistence;
248     }
249 
250     public void setPersistence(ResourceActionPersistence persistence) {
251         _persistence = persistence;
252     }
253 
254     private static ResourceActionPersistence _persistence;
255 }