1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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.ResourceAction;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ResourceActionUtil.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       ResourceActionPersistence
34   * @see       ResourceActionPersistenceImpl
35   * @generated
36   */
37  public class ResourceActionUtil {
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 ResourceAction remove(ResourceAction resourceAction)
65          throws SystemException {
66          return getPersistence().remove(resourceAction);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static ResourceAction update(ResourceAction resourceAction,
73          boolean merge) throws SystemException {
74          return getPersistence().update(resourceAction, merge);
75      }
76  
77      public static void cacheResult(
78          com.liferay.portal.model.ResourceAction resourceAction) {
79          getPersistence().cacheResult(resourceAction);
80      }
81  
82      public static void cacheResult(
83          java.util.List<com.liferay.portal.model.ResourceAction> resourceActions) {
84          getPersistence().cacheResult(resourceActions);
85      }
86  
87      public static com.liferay.portal.model.ResourceAction create(
88          long resourceActionId) {
89          return getPersistence().create(resourceActionId);
90      }
91  
92      public static com.liferay.portal.model.ResourceAction remove(
93          long resourceActionId)
94          throws com.liferay.portal.NoSuchResourceActionException,
95              com.liferay.portal.SystemException {
96          return getPersistence().remove(resourceActionId);
97      }
98  
99      /**
100      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
101      */
102     public static com.liferay.portal.model.ResourceAction update(
103         com.liferay.portal.model.ResourceAction resourceAction)
104         throws com.liferay.portal.SystemException {
105         return getPersistence().update(resourceAction);
106     }
107 
108     public static com.liferay.portal.model.ResourceAction updateImpl(
109         com.liferay.portal.model.ResourceAction resourceAction, boolean merge)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().updateImpl(resourceAction, merge);
112     }
113 
114     public static com.liferay.portal.model.ResourceAction findByPrimaryKey(
115         long resourceActionId)
116         throws com.liferay.portal.NoSuchResourceActionException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByPrimaryKey(resourceActionId);
119     }
120 
121     public static com.liferay.portal.model.ResourceAction fetchByPrimaryKey(
122         long resourceActionId) throws com.liferay.portal.SystemException {
123         return getPersistence().fetchByPrimaryKey(resourceActionId);
124     }
125 
126     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
127         java.lang.String name) throws com.liferay.portal.SystemException {
128         return getPersistence().findByName(name);
129     }
130 
131     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
132         java.lang.String name, int start, int end)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().findByName(name, start, end);
135     }
136 
137     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
138         java.lang.String name, int start, int end,
139         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
140         throws com.liferay.portal.SystemException {
141         return getPersistence().findByName(name, start, end, orderByComparator);
142     }
143 
144     public static com.liferay.portal.model.ResourceAction findByName_First(
145         java.lang.String name,
146         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147         throws com.liferay.portal.NoSuchResourceActionException,
148             com.liferay.portal.SystemException {
149         return getPersistence().findByName_First(name, orderByComparator);
150     }
151 
152     public static com.liferay.portal.model.ResourceAction findByName_Last(
153         java.lang.String name,
154         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155         throws com.liferay.portal.NoSuchResourceActionException,
156             com.liferay.portal.SystemException {
157         return getPersistence().findByName_Last(name, orderByComparator);
158     }
159 
160     public static com.liferay.portal.model.ResourceAction[] findByName_PrevAndNext(
161         long resourceActionId, java.lang.String name,
162         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163         throws com.liferay.portal.NoSuchResourceActionException,
164             com.liferay.portal.SystemException {
165         return getPersistence()
166                    .findByName_PrevAndNext(resourceActionId, name,
167             orderByComparator);
168     }
169 
170     public static com.liferay.portal.model.ResourceAction findByN_A(
171         java.lang.String name, java.lang.String actionId)
172         throws com.liferay.portal.NoSuchResourceActionException,
173             com.liferay.portal.SystemException {
174         return getPersistence().findByN_A(name, actionId);
175     }
176 
177     public static com.liferay.portal.model.ResourceAction fetchByN_A(
178         java.lang.String name, java.lang.String actionId)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().fetchByN_A(name, actionId);
181     }
182 
183     public static com.liferay.portal.model.ResourceAction fetchByN_A(
184         java.lang.String name, java.lang.String actionId,
185         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
186         return getPersistence().fetchByN_A(name, actionId, retrieveFromCache);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll()
190         throws com.liferay.portal.SystemException {
191         return getPersistence().findAll();
192     }
193 
194     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
195         int start, int end) throws com.liferay.portal.SystemException {
196         return getPersistence().findAll(start, end);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
200         int start, int end,
201         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().findAll(start, end, orderByComparator);
204     }
205 
206     public static void removeByName(java.lang.String name)
207         throws com.liferay.portal.SystemException {
208         getPersistence().removeByName(name);
209     }
210 
211     public static void removeByN_A(java.lang.String name,
212         java.lang.String actionId)
213         throws com.liferay.portal.NoSuchResourceActionException,
214             com.liferay.portal.SystemException {
215         getPersistence().removeByN_A(name, actionId);
216     }
217 
218     public static void removeAll() throws com.liferay.portal.SystemException {
219         getPersistence().removeAll();
220     }
221 
222     public static int countByName(java.lang.String name)
223         throws com.liferay.portal.SystemException {
224         return getPersistence().countByName(name);
225     }
226 
227     public static int countByN_A(java.lang.String name,
228         java.lang.String actionId) throws com.liferay.portal.SystemException {
229         return getPersistence().countByN_A(name, actionId);
230     }
231 
232     public static int countAll() throws com.liferay.portal.SystemException {
233         return getPersistence().countAll();
234     }
235 
236     public static ResourceActionPersistence getPersistence() {
237         if (_persistence == null) {
238             _persistence = (ResourceActionPersistence)PortalBeanLocatorUtil.locate(ResourceActionPersistence.class.getName());
239         }
240 
241         return _persistence;
242     }
243 
244     public void setPersistence(ResourceActionPersistence persistence) {
245         _persistence = persistence;
246     }
247 
248     private static ResourceActionPersistence _persistence;
249 }