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#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.kernel.exception.SystemException {
96          return getPersistence().remove(resourceActionId);
97      }
98  
99      public static com.liferay.portal.model.ResourceAction updateImpl(
100         com.liferay.portal.model.ResourceAction resourceAction, boolean merge)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getPersistence().updateImpl(resourceAction, merge);
103     }
104 
105     public static com.liferay.portal.model.ResourceAction findByPrimaryKey(
106         long resourceActionId)
107         throws com.liferay.portal.NoSuchResourceActionException,
108             com.liferay.portal.kernel.exception.SystemException {
109         return getPersistence().findByPrimaryKey(resourceActionId);
110     }
111 
112     public static com.liferay.portal.model.ResourceAction fetchByPrimaryKey(
113         long resourceActionId)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getPersistence().fetchByPrimaryKey(resourceActionId);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
119         java.lang.String name)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByName(name);
122     }
123 
124     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
125         java.lang.String name, int start, int end)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().findByName(name, start, end);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
131         java.lang.String name, int start, int end,
132         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence().findByName(name, start, end, orderByComparator);
135     }
136 
137     public static com.liferay.portal.model.ResourceAction findByName_First(
138         java.lang.String name,
139         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
140         throws com.liferay.portal.NoSuchResourceActionException,
141             com.liferay.portal.kernel.exception.SystemException {
142         return getPersistence().findByName_First(name, orderByComparator);
143     }
144 
145     public static com.liferay.portal.model.ResourceAction findByName_Last(
146         java.lang.String name,
147         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148         throws com.liferay.portal.NoSuchResourceActionException,
149             com.liferay.portal.kernel.exception.SystemException {
150         return getPersistence().findByName_Last(name, orderByComparator);
151     }
152 
153     public static com.liferay.portal.model.ResourceAction[] findByName_PrevAndNext(
154         long resourceActionId, 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()
159                    .findByName_PrevAndNext(resourceActionId, name,
160             orderByComparator);
161     }
162 
163     public static com.liferay.portal.model.ResourceAction findByN_A(
164         java.lang.String name, java.lang.String actionId)
165         throws com.liferay.portal.NoSuchResourceActionException,
166             com.liferay.portal.kernel.exception.SystemException {
167         return getPersistence().findByN_A(name, actionId);
168     }
169 
170     public static com.liferay.portal.model.ResourceAction fetchByN_A(
171         java.lang.String name, java.lang.String actionId)
172         throws com.liferay.portal.kernel.exception.SystemException {
173         return getPersistence().fetchByN_A(name, actionId);
174     }
175 
176     public static com.liferay.portal.model.ResourceAction fetchByN_A(
177         java.lang.String name, java.lang.String actionId,
178         boolean retrieveFromCache)
179         throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence().fetchByN_A(name, actionId, retrieveFromCache);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll()
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findAll();
186     }
187 
188     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
189         int start, int end)
190         throws com.liferay.portal.kernel.exception.SystemException {
191         return getPersistence().findAll(start, end);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
195         int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getPersistence().findAll(start, end, orderByComparator);
199     }
200 
201     public static void removeByName(java.lang.String name)
202         throws com.liferay.portal.kernel.exception.SystemException {
203         getPersistence().removeByName(name);
204     }
205 
206     public static void removeByN_A(java.lang.String name,
207         java.lang.String actionId)
208         throws com.liferay.portal.NoSuchResourceActionException,
209             com.liferay.portal.kernel.exception.SystemException {
210         getPersistence().removeByN_A(name, actionId);
211     }
212 
213     public static void removeAll()
214         throws com.liferay.portal.kernel.exception.SystemException {
215         getPersistence().removeAll();
216     }
217 
218     public static int countByName(java.lang.String name)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         return getPersistence().countByName(name);
221     }
222 
223     public static int countByN_A(java.lang.String name,
224         java.lang.String actionId)
225         throws com.liferay.portal.kernel.exception.SystemException {
226         return getPersistence().countByN_A(name, actionId);
227     }
228 
229     public static int countAll()
230         throws com.liferay.portal.kernel.exception.SystemException {
231         return getPersistence().countAll();
232     }
233 
234     public static ResourceActionPersistence getPersistence() {
235         if (_persistence == null) {
236             _persistence = (ResourceActionPersistence)PortalBeanLocatorUtil.locate(ResourceActionPersistence.class.getName());
237         }
238 
239         return _persistence;
240     }
241 
242     public void setPersistence(ResourceActionPersistence persistence) {
243         _persistence = persistence;
244     }
245 
246     private static ResourceActionPersistence _persistence;
247 }