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.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
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#clearCache(ResourceAction)
47       */
48      public static void clearCache(ResourceAction resourceAction) {
49          getPersistence().clearCache(resourceAction);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<ResourceAction> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<ResourceAction> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static ResourceAction remove(ResourceAction resourceAction)
81          throws SystemException {
82          return getPersistence().remove(resourceAction);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static ResourceAction update(ResourceAction resourceAction,
89          boolean merge) throws SystemException {
90          return getPersistence().update(resourceAction, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.ResourceAction resourceAction) {
95          getPersistence().cacheResult(resourceAction);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.ResourceAction> resourceActions) {
100         getPersistence().cacheResult(resourceActions);
101     }
102 
103     public static com.liferay.portal.model.ResourceAction create(
104         long resourceActionId) {
105         return getPersistence().create(resourceActionId);
106     }
107 
108     public static com.liferay.portal.model.ResourceAction remove(
109         long resourceActionId)
110         throws com.liferay.portal.NoSuchResourceActionException,
111             com.liferay.portal.kernel.exception.SystemException {
112         return getPersistence().remove(resourceActionId);
113     }
114 
115     public static com.liferay.portal.model.ResourceAction updateImpl(
116         com.liferay.portal.model.ResourceAction resourceAction, boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getPersistence().updateImpl(resourceAction, merge);
119     }
120 
121     public static com.liferay.portal.model.ResourceAction findByPrimaryKey(
122         long resourceActionId)
123         throws com.liferay.portal.NoSuchResourceActionException,
124             com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().findByPrimaryKey(resourceActionId);
126     }
127 
128     public static com.liferay.portal.model.ResourceAction fetchByPrimaryKey(
129         long resourceActionId)
130         throws com.liferay.portal.kernel.exception.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)
136         throws com.liferay.portal.kernel.exception.SystemException {
137         return getPersistence().findByName(name);
138     }
139 
140     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
141         java.lang.String name, int start, int end)
142         throws com.liferay.portal.kernel.exception.SystemException {
143         return getPersistence().findByName(name, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
147         java.lang.String name, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149         throws com.liferay.portal.kernel.exception.SystemException {
150         return getPersistence().findByName(name, start, end, orderByComparator);
151     }
152 
153     public static com.liferay.portal.model.ResourceAction findByName_First(
154         java.lang.String name,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.NoSuchResourceActionException,
157             com.liferay.portal.kernel.exception.SystemException {
158         return getPersistence().findByName_First(name, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.ResourceAction findByName_Last(
162         java.lang.String name,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchResourceActionException,
165             com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence().findByName_Last(name, orderByComparator);
167     }
168 
169     public static com.liferay.portal.model.ResourceAction[] findByName_PrevAndNext(
170         long resourceActionId, java.lang.String name,
171         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172         throws com.liferay.portal.NoSuchResourceActionException,
173             com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence()
175                    .findByName_PrevAndNext(resourceActionId, name,
176             orderByComparator);
177     }
178 
179     public static com.liferay.portal.model.ResourceAction findByN_A(
180         java.lang.String name, java.lang.String actionId)
181         throws com.liferay.portal.NoSuchResourceActionException,
182             com.liferay.portal.kernel.exception.SystemException {
183         return getPersistence().findByN_A(name, actionId);
184     }
185 
186     public static com.liferay.portal.model.ResourceAction fetchByN_A(
187         java.lang.String name, java.lang.String actionId)
188         throws com.liferay.portal.kernel.exception.SystemException {
189         return getPersistence().fetchByN_A(name, actionId);
190     }
191 
192     public static com.liferay.portal.model.ResourceAction fetchByN_A(
193         java.lang.String name, java.lang.String actionId,
194         boolean retrieveFromCache)
195         throws com.liferay.portal.kernel.exception.SystemException {
196         return getPersistence().fetchByN_A(name, actionId, retrieveFromCache);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll()
200         throws com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence().findAll();
202     }
203 
204     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
205         int start, int end)
206         throws com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence().findAll(start, end);
208     }
209 
210     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
211         int start, int end,
212         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213         throws com.liferay.portal.kernel.exception.SystemException {
214         return getPersistence().findAll(start, end, orderByComparator);
215     }
216 
217     public static void removeByName(java.lang.String name)
218         throws com.liferay.portal.kernel.exception.SystemException {
219         getPersistence().removeByName(name);
220     }
221 
222     public static void removeByN_A(java.lang.String name,
223         java.lang.String actionId)
224         throws com.liferay.portal.NoSuchResourceActionException,
225             com.liferay.portal.kernel.exception.SystemException {
226         getPersistence().removeByN_A(name, actionId);
227     }
228 
229     public static void removeAll()
230         throws com.liferay.portal.kernel.exception.SystemException {
231         getPersistence().removeAll();
232     }
233 
234     public static int countByName(java.lang.String name)
235         throws com.liferay.portal.kernel.exception.SystemException {
236         return getPersistence().countByName(name);
237     }
238 
239     public static int countByN_A(java.lang.String name,
240         java.lang.String actionId)
241         throws com.liferay.portal.kernel.exception.SystemException {
242         return getPersistence().countByN_A(name, actionId);
243     }
244 
245     public static int countAll()
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getPersistence().countAll();
248     }
249 
250     public static ResourceActionPersistence getPersistence() {
251         if (_persistence == null) {
252             _persistence = (ResourceActionPersistence)PortalBeanLocatorUtil.locate(ResourceActionPersistence.class.getName());
253         }
254 
255         return _persistence;
256     }
257 
258     public void setPersistence(ResourceActionPersistence persistence) {
259         _persistence = persistence;
260     }
261 
262     private static ResourceActionPersistence _persistence;
263 }